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

Re: Storage tuning



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]?
> 
> 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.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


Reply to: