[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Storage tuning



On 7/30/25 14:42, tomas@tuxteam.de wrote:
On Wed, Jul 30, 2025 at 01:47:53PM +0200, Greg wrote:
Hi there,

I have a "server" running 24/7 with a lot of RAM. I would like to speed up
disk system by giving much higher priority to reads and delaying writes.

YES, I KNOW THE RISK!

As I understand, there are two things to tune:

1. I/O Scheduler. The default is mq-deadline. Let say I have md_raid array
/dev/md0 consisting of /dev/sd[ab]. Should I keep it for both, md0 and
physical disks? Which I/O scheduler parameters should I change in case of
md0 and which in case of sd[ab]?

Any hints?

2. Kernel runtime parameters. As I understand I should focus on vm.dirty_*
parameters. My Idea is to set vm.dirty_ratio=70 and
vm.dirty_expire_centisecs to something like 10 to 60min. Should I change
anything else?

There is more to it: an application can explicitly request syncs to disc.

To tackle this, cf the package eatmydata (typically you use this one when
building throwaway VM/container images and want things to be fast, not
safe: you just rebuild anyway if things go south).

PS. Among others, I'm trying to learn something about Linux caching. So
please stick to above questions.

Sorry for the slight tangent, but fsync, O_DATASYNC and friends might trip
you up, so a heads-up seemed to be in order.

I did not realize that. It seems that the slowdowns are indeed caused by fsync. The best solution for me would be to disable fsync on selected file system. But, it is impossible. Only way I see to cache fsync write requests is to use hardware RAID controller with big cache.

Thank you both, Tomas and Dan for your valuable suggestions.

Regards
Greg


Reply to: