reduce_writes
Reduce writes: tmpfs for logging and /tmp
You will lose files in tmpfs after reboot! Use remote syslog for important logs if you log to tmpfs.
/etc/fstab
tmpfs /var/log tmpfs defaults,size=256m 0 0 tmpfs /tmp tmpfs defaults,size=64m 0 0
Large commit interval
You can change the ext4 journal commit interval to reduce writes.
Quote: https://www.kernel.org/doc/Documentation/filesystems/ext4.txt
commit=nrsec (*) Ext4 can be told to sync all its data and metadata every 'nrsec' seconds. The default value is 5 seconds. This means that if you lose your power, you will lose as much as the latest 5 seconds of work (your filesystem will not be damaged though, thanks to the journaling). This default value (or any low value) will hurt performance, but it's good for data-safety. Setting it to 0 will have the same effect as leaving it at the default (5 seconds). Setting it to very large values will improve performance.
Edit /etc/fstab and add a commit= key value pair.
/dev/mapper/vg_apu1-lv_root / ext4 defaults,noatime,errors=remount-ro,commit=60 1 1
reduce_writes.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1