I encounter a performance problem with two HDDs. One is fast but mounted remotely through NFS, the other is local (ext4) but slow.
No, exchanging the two drives is not an option, because it would make the installation on the other system suffer from it.
I have the subjective impression that most of the performance loss is happening during the writing of cached data (in both cases: local and remote).
An other empirical evidence is that sync
takes always less that a second, even after lots of writing. Again, for me it means: the write cache is too small, or is used too little, or similar.
The question is: can I improve performance with some mount options?
I have found in mount's man page some option which might have to do with performance: max_batch_time
, delalloc
. But I can't guess what's the default, what they do, ...
Additional question: Is there a chance of improving performance by reformatting an ext4 partition with different options?
Answer
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
No comments:
Post a Comment