LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "dAniel hAhler" <dhahler@googlemail.com>
To: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Regression with idle cpu cycle handling in 2.6.24 (compared to 2.6.22)
Date: Sat, 19 Jan 2008 15:52:44 +0100	[thread overview]
Message-ID: <bcadbdf50801190652s75f36b1ai422d8b12c5e8ff95@mail.gmail.com> (raw)
In-Reply-To: <bcadbdf50801190605s212ebe26n3035d8664554f636@mail.gmail.com>

Hello,

I've now found the reason and a workaround for this. Apparently, it's
related to CONFIG_FAIR_USER_SCHED and can be worked around by
assigning a really small value to the boinc users cpu_share (125 is
the uid of "boinc"):
$ echo 2 | sudo tee /sys/kernel/uids/125/cpu_share

While looking around, I've found the following patch, which seems to
address this:
http://www.ussg.iu.edu/hypermail/linux/kernel/0710.3/3849.html

It has been posted here, but without any response.

btw: writing 1 into "cpu_share" totally locks up the computer!


Cheers.

On Jan 19, 2008 3:05 PM, I wrote:
> Hello,
>
> I have BOINC running in the background with niceness 19.
> With a 2.6.22 kernel, only idle cpu cycles get assigned to this process, as
> expected.
>
> But with the 2.6.24 kernel, the BOINC process gets at least about half of
> all CPU cycles, even if there's another process (owned by another user)
> requesting CPU cycles (e.g. "cat /dev/urandom > /dev/null")
>
> This happens with the Ubuntu kernel (from Hardy) and the daily builds from
> http://kernel-archive.buildserver.net/debian-kernel/ (where I've just tested
> rc8 now).
>
> It appears that every user (here "boinc" and my user) get the same portion
> of the overall CPU cycles, regardless of the process niceness.
>
> Is this expected behaviour?
>
> I'm using an AMD64 3000+ processor. Please ask for additional information, if
> you need it (e.g. kernel config).
>
>
> TESTCASE:
> $ cat /dev/urandom > /dev/null &
> $ sudo -u another_user nice -n 19 python -c 'i = 0;
> while 1:
>   i += i
> '
>
> EXPECTED RESULT:
> The niced process should get nearly no CPU cycles.
>
> ACTUAL RESULT:
> The niced process gets about half of the CPU cycles (according to "top").
>
>
> The bug has been reported for Ubuntu on https://launchpad.net/bugs/177713
>
>
> --
> http://daniel.hahler.de/
>



-- 
http://daniel.hahler.de/

  reply	other threads:[~2008-01-19 14:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19 14:05 dAniel hAhler
2008-01-19 14:52 ` dAniel hAhler [this message]
2008-01-20  3:33   ` Dhaval Giani
2008-01-20  4:03     ` Dhaval Giani
2008-01-21 17:18     ` Srivatsa Vaddagiri
2008-01-22  1:59       ` dAniel hAhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bcadbdf50801190652s75f36b1ai422d8b12c5e8ff95@mail.gmail.com \
    --to=dhahler@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: Regression with idle cpu cycle handling in 2.6.24 (compared to 2.6.22)' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).