mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pawel Dziekonski <dzieko@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: CPU scheduler question/problem
Date: Thu, 22 Jan 2009 22:34:45 +0100	[thread overview]
Message-ID: <2cd4df870901221334n7e242e79ka961f899c03c70cb@mail.gmail.com> (raw)

Hello,

all my compute intensive processes stick to one core,
whatever I put in /proc/sys/kernel/sched_min_granularity_ns - big number,
small number.

yes, I read /usr/src/linux/Documentation/scheduler/sched-design-CFS.txt
and yes, I did google about CFS tuning. no, I'm not a kernel developer. ;-)

also creation of cpu.shares does not help.

kernels tested:
2.6.27.7-9-default from openSUSE 11.1 distro
and vanilla 2.6.18.1.

this is a very simple test showing openssl performance:

dd if=/dev/zero bs=1M count=10000 | \
openssl enc -k qqqq -aes-128-cbc | \
pv > /dev/null

(you can skip pv if you like or not have it installed)

when I start top or pidstat I see that all of them run on the same core
and are competing for CPU time (pv 2%, dd 15%, openssl 83%).
to workaround this problem I use taskset to place processes on different cores:

taskset -c 0 dd if=/dev/zero bs=1M count=10000 | \
taskset -c 1 ./openssl enc -k qqqq -aes-128-cbc | \
taskset -c 2 pv > /dev/null

now the benchmark runs on 3 different cores and gives waaay better results
(115 MB/s compared to 185 MB/s).

another example: I start a computing application (quantum chemistry) that spawns
four processes that share workload. it happens very often that 2 processes share
same core for a moment and then jump to another core. taskset -p helps but it is
very inconvenient.

I am not using cpufreq.

question: is there a way to better balance processes over different
cores and do it
automagically? automating is necessary because I plan do build a compute cluster
with a batch system.

thanks in advance!

ps. my system is openSUSE 11.1 on Intel Core i7 CPU 940, HT enabled.
pps. I am not subscribed to LKML - please CC me - thanks!

             reply	other threads:[~2009-01-22 21:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22 21:34 Pawel Dziekonski [this message]
2009-01-23 15:40 ` Peter Zijlstra
2009-01-26 13:48   ` Pawel Dziekonski
2009-01-26 13:55     ` Peter Zijlstra
2009-01-26 22:55     ` Ingo Molnar
2009-01-27 16:04       ` Pawel Dziekonski
     [not found] <2cd4df870902031544h5f0b4e59na2c0a0804125dd9a@mail.gmail.com>
     [not found] ` <2cd4df870902040600r2974362r4e9eabf2608b05b4@mail.gmail.com>
     [not found]   ` <20090204142455.GE4411@elte.hu>
     [not found]     ` <2cd4df870902040751l19332473ic36e2642723f5ec8@mail.gmail.com>
     [not found]       ` <20090205192502.GC27422@elte.hu>
     [not found]         ` <2cd4df870902051514k31582fbal11113b37b756dda0@mail.gmail.com>
     [not found]           ` <1233914595.10894.1.camel@laptop>
     [not found]             ` <20090206155311.GQ18368@elte.hu>
     [not found]               ` <2cd4df870902061444p335a9433l73fe6e820ec11c6@mail.gmail.com>
     [not found]                 ` <20090209122538.GI17782@elte.hu>
     [not found]                   ` <2cd4df870902091056v7287e53fx8e7c8c5599b856b3@mail.gmail.com>
2009-02-11  9:06                     ` Yinghai Lu

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=2cd4df870901221334n7e242e79ka961f899c03c70cb@mail.gmail.com \
    --to=dzieko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®