ext4 optimization

1. data commit time:

by adding “commit=120” to the Ext4 mount options means telling Ext4 to keep data in memory for 120 seconds then write them all to the harddisk at once.

2. “noatime” and “nodiratime”

when accessing any file, Ext4 by default write it’s last access time to the disk. Which is kinda slow to do a write for each read operation. By adding “noatime” Ext4 will not write files access time and that will show a real improvement when reading a lot of files at the same time. “nodiratime” is the same as “noatime” but for directories.

3. “noop” I/O scheduler

Linux use CFQ by default, but after reading a lot about the best I/O scheduler for both SSD and HDD drives, the “NOOP” scheduler turned out to be the fastest.

tune2fs -o journal_data_writeback /dev/sda2
vi /etc/fstab

Leave a Reply

Your email address will not be published.