Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i'm running into a problem where writing to a file will cause a 5 to 15 second pause, this occurs only on writes. So far i have remounted the filesystem with data=writeback as an option, and set /sys/block/sdb/queue/max_sectors_kb to 64 to shorten the queue.

Are there any other things i can try to solve this ?

share|improve this question
    
Need more information. What sort of storage sub system? Are we talking about a single 7200rpm SATA drive or a RAID10 of 16 15k SAS drives? How full is the file system? –  3dinfluence Feb 11 '10 at 22:46

3 Answers 3

Are you reading and writing a large number of files?

mount -o remount,noatime,nodiratime /mountpoint

Can also help if you don't need to know the file's last access time.

Which IO scheduler are you using? Deadline/Anticipatory have some odd corner cases that will cause issues. CFQ is generally pretty good, but, the others might be better suited depending on your application: http://www.linux-mag.com/id/7564/2/

Are barriers enabled or disabled? Some controllers support barriers, but write performance suffers. mount -o remount,nobarrier /mountpoint or possibly mount -o remount,barrier=0 /mountpoint

share|improve this answer

I would recommend upgrading to ext4, you can do this in-place and it does have better write performance.

If you're reading and writing to the FS at the same time, then mounting with data=journal will improve performance dramatically.

The next thing to try is to tweak the bdflush paramater - to write dirty buffers more often.

You can check the disks you're writing to, if its a RAID array there could be problems with the drives; alternatively make sure the write cache is on.

share|improve this answer
    
While you can upgrade to EXT4 in place it's not the same as a new EXT4 file system. As it will lack a number of the new features in EXT4 like extents which improves performance when dealing with large files and helps reduce fragmentation. –  3dinfluence Feb 11 '10 at 22:53

Is your file system filled up. When file system space usage goes near 100% many file systems (and ext3 is not the worst) become slower and slower.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.