[Bugme-new] [Bug 33962] New: Automatic process group scheduling breaks "niceness" behaviour

bugzilla-daemon at bugzilla.kernel.org bugzilla-daemon at bugzilla.kernel.org
Tue Apr 26 03:07:53 PDT 2011


https://bugzilla.kernel.org/show_bug.cgi?id=33962

           Summary: Automatic process group scheduling breaks "niceness"
                    behaviour
           Product: Process Management
           Version: 2.5
    Kernel Version: 2.6.38
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Scheduler
        AssignedTo: mingo at elte.hu
        ReportedBy: hslists at zoznam.sk
        Regression: No


If SCHED_AUTOGROUP is set, the nice value is not respected across cgroups.

Simple scenario:

A) Without SCHED_AUTOGROUP:

1. Open two terminals
2. In first terminal run: 'yes > /dev/null'
3. In second terminal run: 'nice -n 19 yes > /dev/null'

Observe with 'top' that 'yes' with nice 19 gets significantly less portion of
CPU time than the other one.  Which is good and expected.


B) With SCHED_AUTOGROUP turned on:

1. Open two terminals
2. In first terminal run: 'yes > /dev/null'
3. In second terminal run: 'nice -n 19 yes > /dev/null'

Observe with 'top' that 'yes' with nice 19 gets *equal* portion of CPU time as
the other one with nice 0.  IMO, not so good and expected.


Expected behaviour is that in B) the CPU time between the two 'yes' processes
is distributed exactly as in A).

Of course, this is a very simple scenario; with one process within each cgroup.
 What the behaviour would be with more processes, each with *different* nice
value, in a same cgroup, may not be so trivial to decide and it may be a topic
for discussion.  But whatever will be decided, the basic scenario described
here should always work as if SCHED_AUTOGROUP was turned off.

One possible general behaviour could be that each cgroup will have an internal
(or virtual) nice value itself, computed as an average of nice values of all
processes within a cgroup.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Bugme-new mailing list