1

I had a couple machines where I used OpenVZ and recently, on newer versions of Debian (Jessie), I've been using LXC.

I need a way of giving one container priority on host I/O resources, I could do this on OpenVZ and I find that I can do this with LXD only (which from what I know, only works on Ubuntu) with:

lxc config set my-container limits.disk.priority 10

But as Debian doesn't have LXD, is there a way I can prioritize I/O using LXC in Debian Jessie?

gtbono
  • 237
  • 3
  • 8

1 Answers1

0

As LXD is just a "frontend" for / to LXC, this is not really a question about LXD.

Actually this is done (in the background) via control groups (cgroups), which is a

Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes.

and leveraging the blkio subsystem which

controls and monitors access to I/O on block devices by tasks in cgroups. Writing values to some of these pseudofiles limits access or bandwidth, and reading values from some of these pseudofiles provides information on I/O operations.

should give you your expected results.

There are multiple parameters which are tuneable, for details have a look at the documentation at kernel.org as well. Over here you'll find specific examples related to LXC.

gxx
  • 5,591
  • 2
  • 22
  • 42