[Devel] Re: Write Error: No space left on device

Mukesh G mukgbv at gmail.com
Tue Oct 28 00:28:16 PDT 2008


Hi,

I need your help in clarifying some doubts...

I have setup a container for cpu. Within the container with a cpu.shares of
1024 (default), which is made up of 2 cpu containers (C2048; cpu.shares
2048) and (C1024: cpu.shares 1024).

Enclosing a cpubusy script that keeps the cpu busy performing some dumb
processing. 2 instances of this script is executed on a dual core Intel x86
systems (PIDS: 21804, 21805)

#!/usr/bin/perl

$goal = 2181818;

while (TRUE) {
        for ($i=0; $i<=$goal; $i++) {
                $x = 0.000001;
                $y = sin($x);
                $y = $y + 0.00001;

        }

        next;
        $y = $y + 0.01;
}

By default, I have observed the running process becomes part of the tasks of
the main container system. The cpu's are 100% utilized, which is correct as
both the processes are in the same container (i.e. the parent cpu
container).

I now add a running cpubusy script process (PID: 21804) to the C2048
container.

Behavior 1: I noticed that the cpu utilization is still 100%, even though I
was expecting a change in the cpu utilization as there is some enforced
isolation. Am I reading this right?

I now add the second cpubusy script process (PID: 21805) to the C1024
container

Behavior 2: I noticed that the cpu utilization still at 100%. This time I
was expecting a change in cpu utilization. Not sure where I am going wrong?

The cpubusy script is inherently single threaded so created 2 additional
cpubusy scripts to simulate more processes (PID: 21872, 21873). Now, I see
the utilization change.

PID 21804: 66%
PID 21805: 50%
PID 21872: 50%
PID 21873: 33%

Behavior 3: I was expecting PIDs 21872 and 21873 as they belong to the
parent cpu container to have higher cpu utilization. The results are
surpursing as shown above.

Now, I add the process with PID: 21872 to container system C1024 and process
with PID: 21873

PID 21804: 66%
PID 21873: 66%
PID 21805: 33%
PID 21873: 33%

Behavior 4: This is the expected behavior.

Thanks

Mukesh

On Thu, Sep 18, 2008 at 6:10 AM, Paul Menage <menage at google.com> wrote:

> On Wed, Sep 17, 2008 at 5:57 AM, Mukesh G <mukgbv at gmail.com> wrote:
> > a)Definition of cpu.shares?
> >    the default value is 1024. What is the max?
>
> See Documentation/scheduler/sched-design-CFS.txt
>
> > b) What is the relation between cpuset.cpu* values and cpu cgroup?
>
> None.
>
> > c) What is the relation between cpuset.mem* values and memory cgroup?
>
> None.
>
> Paul
>
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list