TransWikia.com

Filesystem performance tuning options for ext3

Server Fault Asked on January 27, 2021

I have a brand new server w/48G RAM which I am going to use as a DB server. I don’t expect problems with disk reads, but I definitely would like to optimize for write intensive load patterns.

The OS is RHEL 5.6 and the FS is ext3, I’ve added “noatime” and “data=writeback” to /etc/fstab already and the latter option helped to reduce LA a lot. My next goal is to optimize the pdflush process wherever possible. I tried to apply tweaks mentioned here, but to no avail. Probably this information is just outdated.

What are my further options? Should I continue experimenting with pdflush or maybe it’s better just to leave it as is? I tend to lower dirty_ratio and dirty_background_ratio sysctl values to increase I/O smoothness but these values seem to be not related to performance, the load pattern in Munin under stress test is basically the same.

Should I also try different I/O scheduler? Can I benefit from having lots of RAM in a write intensive setup at all? I understand that disk I/O speed and latency are nothing to do with the RAM, but my goal is not to magically write to disk faster, but to increase system stability and to implement some kind of graceful degradation.

Let’s say I have good backups and can accept further data consistency tradeoffs like “data=writeback”.
Thank you.

3 Answers

Is ext3 a requirement? You have the XFS filesystem as an option, which may work better for your workload. What is the underlying storage setup? What are your measured results compared to the storage system's capabilities (e.g. have you identified the bottleneck?)? Try the other I/O scheduler elevator settings. I prefer noop for certain direct-attached storage arrays and deadline for others. Test and measure for your particular application.

Correct answer by ewwhite on January 27, 2021

You should look at your file system alignment, especially with RAID, and especially with SSDs, to avoid unnecessary read and write amplification. This will affect performance, and in case of SSDs, longevity. Optimal alignment is workload dependent. You should check what page size your chosen database uses, and tune accordingly.

Disclosure: link above is to an article I wrote on this exact subject.

Answered by Gordan Bobic on January 27, 2021

What is your disk setup like? If you're using a hardware RAID array, you can set the stride and stripe-width options for optimal file system alignment.

Additionally, if you have a battery backed caching controller you can set the nobarrier option at mount.

Answered by Kendall on January 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP