From: Roman Gushchin <klamm@yandex-team.ru>
To: LKML <linux-kernel@vger.kernel.org>,
mingo@redhat.com, peterz@infradead.org, tkhai@yandex.ru
Subject: Real-time scheduling policies and hyper-threading
Date: Thu, 24 Apr 2014 22:16:12 +0400 [thread overview]
Message-ID: <36851398363372@webcorp2g.yandex-team.ru> (raw)
Hello!
I spend some time investigating why switching runtime* tasks to real-time scheduling policies increases
response time dispersion, while the opposite is expected.
The main reason is hyper-threading. rt-scheduler tries only to load all logical CPUs, selecting topologically
closest when the current is busy. If hyper-threading is enabled, this strategy is counter-productive:
tasks are suffering on busy HT-threads when there is a plenty of idle physical cores.
Also, rt-scheduler doesn't try to balance rt load between physical CPUs. It's significant because of
turbo-boost and frequency scaling technologies: per-core performance depends on the number of
idle cores in the same physical cpu.
Are there any known solutions of this problem except disabling hyper-threading and frequency scaling at all?
Are there any common plans to enhance the load balancing algorithm in the rt-scheduler?
Does anyone use rt-scheduler for runtime-like cpu-bound tasks?
Why just don't use CFS? :-)
Rt-scheduler with modified load balancing shows much better results.
I have a prototype (still incomplete and with many dirty hacks), that shows 10-15%
performance increase in our production.
(*) A simplified model can be described as following:
there is one process per machine, with one thread, that receives request from network and puts them into queue;
n (n ~ NCPU + 1) worker threads, that get requests from the queue and handle them.
Load is cpu-bound, tens of milliseconds per request. Typical CPU load is between 40% and 70%.
A typical system has two physical x86-64 cpus with 8-16 physical cores each (x2 with hyper-threading).
Thanks,
Roman
next reply other threads:[~2014-04-24 18:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 18:16 Roman Gushchin [this message]
2014-04-24 18:58 ` Peter Zijlstra
2014-04-24 20:16 ` Kirill Tkhai
2014-04-24 20:24 ` Peter Zijlstra
2014-04-25 11:12 ` Roman Gushchin
2014-04-25 11:04 ` Roman Gushchin
2014-04-25 13:16 ` Peter Zijlstra
2014-04-25 15:02 ` Roman Gushchin
2014-04-25 15:11 ` Peter Zijlstra
2014-04-25 16:19 ` Roman Gushchin
2014-04-25 15:16 ` Peter Zijlstra
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=36851398363372@webcorp2g.yandex-team.ru \
--to=klamm@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tkhai@yandex.ru \
/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®