I am using for a while the ads-b receiver script to add dump978 reception to my Pi, so I decided to share my worries and solutions about it.
In the “Performance graphs” I always saw that the “Disc I/O IOPS” and “Disc I/O Bandwidth” where high. That meant 7.0 iops and 44kB/s.
For a 16GB SD card maybe it doesn’t mean a lot of wear, but I had an 8GB card die after one year. OK, I cannot be sure that happen because of this, but… I hated to see it.
Install the utility iotop with
sudo apt-get install iotop and use
sudo iotop -oPa
I noticed that a lot of I/O writes are because of the dump978, more precisely the writes in the folder “/var/www/html/dump978/data”.
I decided to make it a temporary folder, stored in RAM.
So I did
sudo nano /etc/fstab and added this line:
tmpfs /var/www/html/dump978/data tmpfs defaults,size=128M 0 0
After reboot, iotop disc write dropped close to zero.
Also, I have increased the cache write-back size, just to be safe from other processes.
Cache settings view with:
sysctl -a | grep dirty
vm.dirty_background_bytes = 0
vm.dirty_background_ratio = 10 > increase to 20
vm.dirty_bytes = 0
vm.dirty_expire_centisecs = 3000
vm.dirty_ratio = 20 > Increase to 40
vm.dirty_writeback_centisecs = 500
vm.dirtytime_expire_seconds = 43200
sudo nano /etc/sysctl.conf
sudo sysctl –f /etc/sysctl.conf