Lxc config set my-container limits.disk.priority

Hi there!

As stated in the documentation:
lxc config set my-container limits.disk.priority
sets the priority setting from 1-10

However, i could not find anywhere if the maximum priority is 1 or 10.
I also could not find an explanation of what this parameter does, other than “set it to 10 if you are overselling”

Please help me understand it, I want to prioritize DB reads and writes.

Thank you!

For the .priority keys, 0 is lowest, 10 is highest.

Worth noting that these days I wouldn’t expect disk.priority to do much at all, the reason being that most distributions and block devices don’t use an I/O scheduler that’s capable of setting request priorities.

1 Like

Thank you @stgraber

I’m using Ubuntu 20.04 server on top of dedicated, non-virtualized bare-metal servers with SATA SSD’s and/or U2 NVMe’s (Hetzner’s “enterprise-grade” hardware). Do you think the priority would be respected?

Almost certainly not. Only the cfq/bfq scheduler supports IO weight and pretty much everything today uses noop (none).

grep "" /sys/class/block/*/queue/scheduler

But I suspect everything will show [none] meaning the noop scheduler is in use.

1 Like
grep "" /sys/class/block/*/queue/scheduler

That’s exactly what it is showing indeed…
Thanx!