Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Issue 5254002: CHROMIUM: config: enable cgroup-based group scheduling (Closed)

Created:
10 years, 1 month ago by Mandeep Singh Baines
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, sleffler+cc_chromium.org, vbendeb+kernel_chromium.org, vb+kernel_google.com, msb+croskernel_chromium.org
Visibility:
Public.

Description

CHROMIUM: config: enable cgroup-based group scheduling Group scheduling can have a dramatic impact on interactive response: http://www.phoronix.com/scan.php?page=article&item=linux_2637_video I think a reasonable group scheduling policy for ChromiumOS would be to put the active tab processes into a "foreground" group and the backgrounds tabs into a "background" group. To simulate this, I did the following: sudo mkdir -p /tmp/cgroup/cpu sudo mount -t cgroup cgroup /tmp/cgroup/cpu -o cpu sudo mkdir -m 0777 /tmp/cgroup/cpu/user cd /tmp/cgroup/cpu/user mkdir foreground mkdir background for i in `ps -ef | grep chrome | grep -v grep | awk '{ print $2 }'`; do echo $i > foreground/tasks done To simulate background tab processing I used 20 soaker threads: $ cat busy.c int main(int argc, char * argv[]) { int x = 0; while (1) { x++; if (x % 1000000 == 0) { sched_yield(); } } return 0; } Which I than ran in the background: echo $$ > background/tasks for i in `seq 20`; do busy & done For the non-cgroup test case, I just did: for i in `seq 20`; do busy & done Then in the browser I ran the SunSpider 0.9.1 JavaScript benchmark. Without cgroups (i.e. without this patch) I get: 16954.8ms +/- 1.4% With cgroups (i.e. this patch) and a background/foreground grouping I get: 2040.3ms +/- 2.0% So I get an 8.3 X speedup using cgroups! BUG=9288 TEST=See above. Signed-off-by: Mandeep Singh Baines <msb@chromium.org>; Change-Id: I16c87499dfe35ff5b2f5353e68db447b9ce10ddc Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=a87ecbb

Patch Set 1 #

Patch Set 2 : Rebase to latest kernel. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -2 lines) Patch
M chromeos/config/config.common.chromeos View 1 8 chunks +14 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Mandeep Singh Baines
10 years, 1 month ago (2010-11-22 21:54:18 UTC) #1
Mandeep Singh Baines
PTAL. Updated to latest kernel. Since this CL was originally sent out, we disabled CGROUPS. ...
9 years, 11 months ago (2011-01-10 23:23:11 UTC) #2
Greg Spencer (Chromium)
LGTM, but I'm no kernel expert.
9 years, 11 months ago (2011-01-11 23:42:29 UTC) #3
Mandeep Singh Baines
ping Will, Olof, would like to have one of you two review also.
9 years, 11 months ago (2011-01-13 00:02:58 UTC) #4
Olof Johansson
9 years, 11 months ago (2011-01-13 05:17:29 UTC) #5
Seems like we're turning CGROUPS on and off on a weekly basis these days. :-)

I'm OK with enabling it myself. Looks like there's some potential benefits in
doing it. So LGTM.

Powered by Google App Engine
This is Rietveld 408576698