Error writing to cgroup parameter cpu.rt_runtime_us
Asked Answered
L

1

4

I am trying to modify the real-time runtime parameter of a docker container process within a cgroup. I am following this tutorial: http://www.breakage.org/2014/08/22/using-sched_fifo-in-docker-containers-on-rhel/

Sometimes, the write to the docker-[ID].scope file works. Sometimes it returns the following error: echo: write error: Invalid argument

I'm trying to understand why this happens. Is there some sort of maximum that comes into play? More generally, is there a way to configure the process to be in the root cgroup or in a different cgroup such that this operation is guaranteed to succeed, or at least makes sense as to why it is succeeding or failing?

Edit: Centos 7.0.1406 Linux kernel 3.10.0-123.el7.x86_64

Edit: I'm running multiple containers and trying to accomplish the same goal within several of them (4-5)

Lian answered 13/2, 2015 at 5:51 Comment(0)
L
1

To answer my own question:

The equation in section 2.3 of this documentation seems to explain it:

http://lxr.free-electrons.com/source/Documentation/scheduler/sched-rt-group.txt?v=3.10

What seems to be happening is that the tutorial I referenced prompts the user to configure the majority of the real-time run-time allocation to a single container. I get the error message when configuring that same allocation to multiple containers. The error message indicates that there is less CPU "bandwidth" than is being requested, which makes sense considering 900000 us + 900000 us > the total of 950000 us.

I wish the kernel error was a little more useful than "invalid argument"...

Lian answered 13/2, 2015 at 19:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.