I am looking at the SD I/O bandwidth. It shows that there is a constant write process, at around 45-55 kB/sec. Probably this is part of the normal process of writhing the position of the planes in the web page location, but I am worried about wear of the SD card.
I did the following to alleviate this issue, at least in my mind.
First I edited /etc/fstab (sudo nano /etc/fstab) to add this line:
none /var/log tmpfs size=1M,noatime 0 0
Secondly I have tuned the write caching of the linux kernel by editeding /etc/sysctl.d/local.conf (sudo nano /etc/sysctl.d/local.conf). It was nothing there, so I added:
vm.dirty_background_ratio=20 vm.dirty_ratio=40 vm.dirty_writeback_centisecs=6000 vm.dirty_expire_centisecs=6000
To see all the settings use:
vm.dirty_background_ratio – This is the percentage of RAM that can be filled with dirty memory pages before it is written to disk. The default value on Raspbian is 10.
vm.dirty_ratio – This is the maximum amount of RAM that can be filled with dirty pages before writing the dirty memory pages to disk. The default value on Raspbian is 20.
Can we make the web page file to be part of a RAM tmpfs drive (symlinked)? I am thinking about the whole folders
/var/log/ and, if present,
LE: After the above changes the “Disk I/O bandwidth” changed to 29.4kB/sec.