Home » Questions » Computers [ Ask a new question ]

Linux: mount options to improve performance on slow HDDs?

Linux: mount options to improve performance on slow HDDs?

I encounter a performance problem with two HDDs. One is fast but mounted remotely through NFS, the other is local (ext4) but slow.

Asked by: Guest | Views: 37
Total answers/comments: 1
Guest [Entry]

"What do you need the drive to do? Performance often varies by file system type & what task is being performed.

Setting noatime on your partition or changing to a reiserfs might give some small performance boost, but you might create NFS problems for yourself. If the local ext4 disk is slower than an NFS mount, I think something else is going on. I think you need to see what else is going on in your system that is keeping your disk from getting around to your write tasks. Consider looking at what is doing all this writing. Lets say something is pounding /tmp. Moving /tmp to it's own partition would help with the rest of your local partitions.

You may be suffering from a need to defrag your drive. Although linux filesystems don't suffer from fragmentation as dramatically as NTFS, they do fragment over time. Since ext4 defrag is not too straightforward (kernel mode required), you might just reformat since you seemed willing to try a new file system type.

Mount settings to try:

noatime & nodiratime

no acl
data=writeback,nobh
delalloc - which should already be the default - no need to set.
commit=N The default is 5 seconds, good for safety, 'bad' for performance. Setting it to higher values might cause you to lose 'N' seconds of work if your machine crashes. Journaling still preserved, so the disk is unaffected.
inode_readahead=n
max_batch_time=N"