1) Consider disabling access time updates
mount -o noatime
Each time a file system is read or written, an access timestamp is updated for that file, which causes a read and write for the metadata of that file. On a busy file syste, this can cause a large number of writes. On a journalled filesystem, the access timestamps must be written to the on-disk journal as well.
2) Mount ext3/ext4 filesystem with longer period between journal commits
mount -o commit=15
- default is 5 seconds
- Longer may improve performance but result in more lost data if system crashes.
3) Using Directory Indexing
This feature improves file access in large directories or directories containing many files by using hashed binary trees to store the directory information. It's perfectly safe to use.
Note : Make sure any filesystems are cleanly unmounted before altering them with the tune2fs or e2fsck utilities
a) Unmount the filesystem
b) tune2fs -O dir_index /dev/sda2
This will only take effect with directories created on that filesystem after tune2fs is run
c) In order to apply this to currently existing directories, we must run the e2fsck utility to optimize and reindex the directories on the filesystem
e2fsck -D -f /dev/sda2
No comments:
Post a Comment