All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gene Heskett <gene.heskett@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Juliusz Chroboczek <jch@pps.jussieu.fr>,
	Con Kolivas <kernel@kolivas.org>, ck list <ck@vds.kolivas.org>,
	Bill Davidsen <davidsen@tmr.com>, Willy Tarreau <w@1wt.eu>,
	William Lee Irwin III <wli@holomorphy.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Nick Piggin <npiggin@suse.de>, Mike Galbraith <efault@gmx.de>,
	Arjan van de Ven <arjan@infradead.org>,
	Peter Williams <pwil3058@bigpond.net.au>,
	Thomas Gleixner <tglx@linutronix.de>,
	caglar@pardus.org.tr
Subject: Re: [report] renicing X, cfs-v5 vs sd-0.46
Date: Mon, 23 Apr 2007 13:19:59 -0400	[thread overview]
Message-ID: <200704231320.00068.gene.heskett@gmail.com> (raw)
In-Reply-To: <alpine.LFD.0.98.0704230805510.9964@woody.linux-foundation.org>

On Monday 23 April 2007, Linus Torvalds wrote:
>On Mon, 23 Apr 2007, Ingo Molnar wrote:
>> You are completely right in the case of traditional schedulers.
>
>And apparently I'm completely right with CFS too.
>
>> Using CFS-v5, with Xorg at nice 0, the context-switch rate is low:
>>
>> procs -----------memory---------- ---swap-- -----io---- --system--
>> -----cpu------ r  b   swpd   free   buff  cache   si   so    bi    bo   in
>>   cs us sy id wa st 2  0      0 472132  13712 178604    0    0     0    32
>>  113  170 83 17  0  0  0 2  0      0 472172  13712 178604    0    0     0 
>>    0  112  184 85 15  0  0  0 2  0      0 472196  13712 178604    0    0  
>>   0     0  108  162 83 17  0  0  0 1  0      0 472076  13712 178604    0  
>>  0     0     0  115  189 86 14  0  0  0
>
>Around 170 context switches per second.
>
>> Renicing X to -10 increases context-switching, but not dramatically so,
>> because it is throttled by CFS:
>>
>> procs -----------memory---------- ---swap-- -----io---- --system--
>> -----cpu------ r  b   swpd   free   buff  cache   si   so    bi    bo   in
>>   cs us sy id wa st 4  0      0 475752  13492 176320    0    0     0    64
>>  116 1498 85 15  0  0  0 4  0      0 475752  13492 176320    0    0     0 
>>    0  107 1488 84 16  0  0  0 4  0      0 475752  13492 176320    0    0  
>>   0     0  140 1514 86 14  0  0  0 4  0      0 475752  13492 176320    0  
>>  0     0     0  107 1477 85 15  0  0  0 4  0      0 475752  13492 176320  
>>  0    0     0     0  122 1498 84 16  0  0  0
>
>Did you even *look* at your own numbers? Maybe you looked at "interrpts".
>The context switch numbers go from 170 per second, to 1500 per second!
>
>If that's not "dramatically so", I don't know what is! Just how many
>orders of magnitude worse does it have to be, to be "dramatic"? Apparently
>one order of magnitude isn't "dramatic"?
>
>So you were wrong. The fact that it was still "usable" is a good
>indication, but how about just admitting that you were wrong, and that
>renicing X is the *WRONG*THING*TO*DO*.
>
>Just don't do it. It's wrong. It was wrong with the old schedulers, it's
>wrong with the new scheduler, it's just WRONG.
>
>It was a hack, and it's a failed hack. And the fact that you don't seem to
>realize that it's a failure, even when your OWN numbers clearly show that
>it's failed, is a bit scary.
>
>		Linus

This message prompted me to do some checking in re context switches myself, 
and I've come to the conclusion that there could be a bug in vmstat itself.

Run singly the context switching is reasonable even for a -19 niceness of x, 
its only showing about 200 or so on the first loop of vmstat.  But throw in 
the -n 1 arguments and it goes crazy on the second and subsequent loops.

X nice=0
[root@coyote ~]# vmstat -n 1
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa 
st
 3  0    324  62836  37952 518080    0    0   786   446  474  201 10  4 82  4  
0
 0  0    324  62712  37952 518080    0    0     0     0 1309 2361  2  5 93  0  
0
 2  0    324  62712  37952 518080    0    0     0     0 1275 2203  2  4 94  0  
0
 0  0    324  62744  37952 518080    0    0     0     0 1305 2224  1  2 97  0  
0
 0  0    324  62744  37952 518080    0    0     0     0 1291 2232  0  1 99  0  
0

X nice=-10
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa 
st
 3  0    324  62432  38052 518080    0    0   784   445  476  205 10  4 82  4  
0
 0  0    324  62432  38052 518080    0    0     0     0 1190 3223  1  1 98  0  
0
 2  0    324  62440  38052 518080    0    0     0     0 1209 3210  2  3 95  0  
0
 0  0    324  62316  38060 518080    0    0     0   232 1201 3355  3  4 92  1  
0
 2  0    324  62316  38060 518080    0    0     0     0 1207 2794  1  2 97  0  
0

X nice=10
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa 
st
 4  0    324  62372  38184 518132    0    0   783   445  477  209 10  4 82  4  
0
 0  0    324  62372  38192 518132    0    0     0   272 1318 2262  0  3 97  0  
0
 0  0    324  62372  38192 518132    0    0     0     0 1293 2249  1  4 95  0  
0
 0  0    324  62248  38192 518132    0    0     0     0 1280 2443  4  2 94  0  
0
 0  0    324  62248  38192 518132    0    0     0     4 1294 2272  0  3 97  0  
0

Now, I have NDI which set of figures is the true set, but please note that in 
all 3 cases the reported values for cs didn't scale up and down all that much 
if separated out into 1st pass, and subsequent passes.

And, even with X nice=10, the system is still fairly smooth and usable.

This is with 2.6.21-rc7-CFS-v5 I built late last evening.  At Xnice=10 I just 
played a game of patience to watch the card animations and they were 
absolutely acceptably smooth. (and I won it in about 112 moves :)

>From this users viewpoint, it (cfs-v5) works, and works very well indeed, and 
it deserves a place as one of 3 selectable options in mainline.  The other 2 
being the existing mainline way, & Con K's sd-0.45 or later.  Both of these 
seem to be very large enhancements to the user experience over current 
mainline, which I'd discuss in terms borrowed from Joanne Dow.  Comparatively 
speaking, mainline has a very high vacuum.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Jayne: "Let's move this conversation in a not-Jayne's-fault direction."
				--Episode #14, "Objects in Space"

  parent reply	other threads:[~2007-04-23 17:20 UTC|newest]

Thread overview: 150+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20 14:04 [patch] CFS scheduler, v4 Ingo Molnar
2007-04-20 21:37 ` Gene Heskett
2007-04-21 20:47   ` S.Çağlar Onur
2007-04-22  1:22     ` Gene Heskett
2007-04-20 21:39 ` mdew .
2007-04-21  6:47   ` Ingo Molnar
2007-04-21  7:55     ` [patch] CFS scheduler, v4, for v2.6.20.7 Ingo Molnar
2007-04-21 12:12 ` [REPORT] cfs-v4 vs sd-0.44 Willy Tarreau
2007-04-21 12:40   ` Con Kolivas
2007-04-21 13:02     ` Willy Tarreau
2007-04-21 15:46   ` Ingo Molnar
2007-04-21 16:18     ` Willy Tarreau
2007-04-21 16:34       ` Linus Torvalds
2007-04-21 16:42         ` William Lee Irwin III
2007-04-21 18:55           ` Kyle Moffett
2007-04-21 19:49             ` Ulrich Drepper
2007-04-21 23:17               ` William Lee Irwin III
2007-04-21 23:35               ` Linus Torvalds
2007-04-22  1:46                 ` Ulrich Drepper
2007-04-22  7:02                   ` William Lee Irwin III
2007-04-22  7:17                     ` Ulrich Drepper
2007-04-22  8:48                       ` William Lee Irwin III
2007-04-22 16:16                         ` Ulrich Drepper
2007-04-23  0:07                           ` Rusty Russell
2007-04-21 16:53         ` Willy Tarreau
2007-04-21 16:53         ` Ingo Molnar
2007-04-21 16:57           ` Willy Tarreau
2007-04-21 18:09           ` Ulrich Drepper
2007-04-21 17:03       ` Geert Bosch
2007-04-21 15:55   ` Con Kolivas
2007-04-21 16:00     ` Ingo Molnar
2007-04-21 16:12       ` Willy Tarreau
2007-04-21 16:39       ` William Lee Irwin III
2007-04-21 17:15       ` Jan Engelhardt
2007-04-21 19:00         ` Ingo Molnar
2007-04-22 13:18           ` Mark Lord
2007-04-22 13:27             ` Ingo Molnar
2007-04-22 13:30               ` Mark Lord
2007-04-25  8:16               ` Pavel Machek
2007-04-25  8:22                 ` Ingo Molnar
2007-04-25 10:19                 ` Alan Cox
2007-04-21 22:54       ` Denis Vlasenko
2007-04-22  0:08         ` Con Kolivas
2007-04-22  4:58           ` Mike Galbraith
2007-04-21 23:59       ` Con Kolivas
2007-04-22 13:04         ` Juliusz Chroboczek
2007-04-22 23:24           ` Linus Torvalds
2007-04-23  1:34             ` Nick Piggin
2007-04-23 15:56               ` Linus Torvalds
2007-04-23 19:11                 ` Ingo Molnar
2007-04-23 19:52                   ` Linus Torvalds
2007-04-23 20:33                     ` Ingo Molnar
2007-04-23 20:44                       ` Ingo Molnar
2007-04-23 21:03                         ` Ingo Molnar
2007-04-23 21:53                       ` Guillaume Chazarain
2007-04-24  7:04                       ` Rogan Dawes
2007-04-24  7:31                         ` Ingo Molnar
2007-04-24  8:25                           ` Rogan Dawes
2007-04-24 15:03                             ` Chris Friesen
2007-04-24 15:07                               ` Rogan Dawes
2007-04-24 15:15                                 ` Chris Friesen
2007-04-24 23:55                                 ` Peter Williams
2007-04-25  9:29                                 ` Ingo Molnar
2007-04-23 22:48                     ` Jeremy Fitzhardinge
2007-04-24  0:59                       ` Li, Tong N
2007-04-24  1:57                         ` Bill Huey
2007-04-24 18:01                           ` Li, Tong N
2007-04-24 21:27                         ` William Lee Irwin III
2007-04-24 22:18                           ` Bernd Eckenfels
2007-04-25  1:22                           ` Li, Tong N
2007-04-25  6:05                             ` William Lee Irwin III
2007-04-25  9:44                             ` Ingo Molnar
2007-04-25 11:58                               ` William Lee Irwin III
2007-04-25 20:13                                 ` Willy Tarreau
2007-04-26 17:57                                   ` Li, Tong N
2007-04-26 19:18                                     ` Willy Tarreau
2007-04-28 15:12                                       ` Bernd Eckenfels
2007-04-26 23:26                                     ` William Lee Irwin III
2007-04-24  3:46                     ` Peter Williams
2007-04-24  4:52                       ` Arjan van de Ven
2007-04-24  6:21                         ` Peter Williams
2007-04-24  6:36                           ` Ingo Molnar
2007-04-24  7:00                             ` Gene Heskett
2007-04-24  7:08                               ` Ingo Molnar
2007-04-24  6:45                                 ` David Lang
2007-04-24  7:24                                   ` Ingo Molnar
2007-04-24 14:38                                     ` Gene Heskett
2007-04-24 17:44                                       ` Willy Tarreau
2007-04-25  0:30                                         ` Gene Heskett
2007-04-25  0:32                                         ` Gene Heskett
2007-04-24  7:12                                 ` Gene Heskett
2007-04-24  7:14                                   ` Ingo Molnar
2007-04-24 14:36                                     ` Gene Heskett
2007-04-24  7:25                                 ` Ingo Molnar
2007-04-24 14:39                                   ` Gene Heskett
2007-04-24 14:42                                   ` Gene Heskett
2007-04-24  7:33                                 ` Ingo Molnar
2007-04-26  0:51                             ` SD renice recommendation was: " Con Kolivas
2007-04-24 15:08                     ` Ray Lee
2007-04-25  9:32                       ` Ingo Molnar
2007-04-23 20:05                   ` Willy Tarreau
2007-04-24 21:05                   ` 'Scheduler Economy' prototype patch for CFS Ingo Molnar
2007-04-23  2:42             ` [report] renicing X, cfs-v5 vs sd-0.46 Ingo Molnar
2007-04-23 15:09               ` Linus Torvalds
2007-04-23 17:19                 ` Gene Heskett
2007-04-23 17:19                 ` Gene Heskett [this message]
2007-04-23 19:48                 ` Ingo Molnar
2007-04-23 20:56                   ` Michael K. Edwards
2007-04-22 13:23         ` [REPORT] cfs-v4 vs sd-0.44 Mark Lord
2007-04-21 18:17   ` Gene Heskett
2007-04-22  1:26     ` Con Kolivas
2007-04-22  2:07       ` Gene Heskett
2007-04-22  8:07     ` William Lee Irwin III
2007-04-22 11:11       ` Gene Heskett
2007-04-22  1:51   ` Con Kolivas
2007-04-21 20:35 ` [patch] CFS scheduler, v4 S.Çağlar Onur
2007-04-22  8:30 ` Michael Gerdau
2007-04-23 22:47   ` Ingo Molnar
2007-04-23  1:12 ` [patch] CFS scheduler, -v5 Ingo Molnar
2007-04-23  1:25   ` Nick Piggin
2007-04-23  2:39     ` Gene Heskett
2007-04-23  3:08       ` Ingo Molnar
2007-04-23  2:55     ` Ingo Molnar
2007-04-23  3:22       ` Nick Piggin
2007-04-23  3:43         ` Ingo Molnar
2007-04-23  4:06           ` Nick Piggin
2007-04-23  7:10             ` Ingo Molnar
2007-04-23  7:25               ` Nick Piggin
2007-04-23  7:35                 ` Ingo Molnar
2007-04-23  9:25             ` Ingo Molnar
2007-04-23  3:19   ` [patch] CFS scheduler, -v5 (build problem - make headers_check fails) Zach Carter
2007-04-23 10:03     ` Ingo Molnar
2007-04-23  5:16   ` [patch] CFS scheduler, -v5 Markus Trippelsdorf
2007-04-23  5:27     ` Markus Trippelsdorf
2007-04-23  6:21       ` Ingo Molnar
2007-04-25 11:43         ` Srivatsa Vaddagiri
2007-04-25 12:51           ` Ingo Molnar
2007-04-23 12:20   ` Guillaume Chazarain
2007-04-23 12:36     ` Ingo Molnar
2007-04-24 16:54   ` Christian Hesse
2007-04-25  9:25     ` Ingo Molnar
2007-04-25 10:51       ` Christian Hesse
2007-04-25 10:56         ` Ingo Molnar
2007-04-23  9:28 ` crash with CFS v4 and qemu/kvm (was: [patch] CFS scheduler, v4) Christian Hesse
2007-04-23 10:18   ` Ingo Molnar
2007-04-23 10:18     ` Ingo Molnar
2007-04-24 10:54     ` Christian Hesse
2007-04-24 10:54       ` Christian Hesse
     [not found] <8c1Z0-5Lw-29@gated-at.bofh.it>
     [not found] ` <8cWMV-8vr-3@gated-at.bofh.it>
     [not found]   ` <8d8uH-1sm-3@gated-at.bofh.it>
     [not found]     ` <8dawR-4zw-21@gated-at.bofh.it>
2007-04-23 18:52       ` [report] renicing X, cfs-v5 vs sd-0.46 Niel Lambrechts
2007-04-24  1:51         ` Gene Heskett

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=200704231320.00068.gene.heskett@gmail.com \
    --to=gene.heskett@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=caglar@pardus.org.tr \
    --cc=ck@vds.kolivas.org \
    --cc=davidsen@tmr.com \
    --cc=efault@gmx.de \
    --cc=jch@pps.jussieu.fr \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    --cc=pwil3058@bigpond.net.au \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=w@1wt.eu \
    --cc=wli@holomorphy.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.