4

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?

3
  • Do you have the ext4 drive formatted with extents support?
    – Broam
    Dec 4, 2009 at 15:59
  • I have formatted it with Opensuse's default options from Yast. I'm very sure it's enabled. Dec 4, 2009 at 16:17
  • How slow is slow? If you don't measure, you can't know if you are already very close at the hw highest performance (if so, your only option is to buy new hw - otherwise you can spend time trying to optimize your settings)
    – Davide
    Dec 4, 2009 at 16:26

2 Answers 2

7

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:

  1. 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
1
  • 1
    "noatime" also has the same effect of "nodiratime", no need to use both parameters. lwn.net/Articles/245002
    – user337945
    Jun 23, 2014 at 17:27
1

I use noatime to decrease the overall write-access time.

1
  • Yes, I'm already using noatime and nodiratime and data=writeback. Dec 4, 2009 at 16:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .