login
Header Space

 
 

Re: [patch] CFS scheduler, -v19

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: <linux-kernel@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, Mike Galbraith <efault@...>, Arjan van de Ven <arjan@...>, Thomas Gleixner <tglx@...>, Dmitry Adamushko <dmitry.adamushko@...>, Srivatsa Vaddagiri <vatsa@...>
Date: Sunday, July 8, 2007 - 1:46 pm

Hi Ingo !

On Fri, Jul 06, 2007 at 07:33:19PM +0200, Ingo Molnar wrote:

Interestingly, I also noticed the possibility of O(1) task pickup when
playing with v18, but did not detect any noticeable improvement with it.
Of course, it depends on the workload and I probably didn't perform the
most relevant tests.

V19 works very well here on 2.6.20.14. I could start 32k busy loops at
nice +19 (I exhausted the 32k pids limit), and could still perform normal
operations. I noticed that 'vmstat' scans all the pid entries under /proc,
which takes ages to collect data before displaying a line. Obviously, the
system sometimes shows some short latencies, but not much more than what
you get from and SSH through a remote DSL connection.

Here's a vmstat 1 output :

 r  b  w   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id
32437  0  0      0 809724    488   6196    0    0     1     0  135     0 24 72 4
32436  0  0      0 811336    488   6196    0    0     0     0  717     0 78 22 0
32436  0  0      0 812956    488   6196    0    0     0     0  727     0 79 21 0
32436  0  0      0 810164    400   6196    0    0     0     0  707     0 80 20 0
32436  0  0      0 815116    400   6436    0    0     0     0  769     0 77 23 0
32436  0  0      0 811644    400   6436    0    0     0     0  715     0 80 20 0

Amusingly, I started mpg123 during this test and it skipped quite a bit.
After setting all tasks to SCHED_IDLE, it did not skip anymore. All this
seems to behave like one could expect.

I also started 30k processes distributed in 130 groups of 234 chained by pipes
in which one byte is passed. I get an average of 8000 in the run queue. The
context switch rate is very low and sometimes even null in this test, maybe
some of them are starving, I really do not know :

 r  b  w   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id
7752  0  1      0 656892    244   4196    0    0     0     0  725     0 16 84  0
7781  0  1      0 656768    244   4196    0    0     0     0  724     0 16 84  0
8000  0  1      0 656916    244   4196    0    0     0     0 2631     0  9 91  0
8025  0  1      0 656916    244   4196    0    0     0     0 2023     0 11 89  0
8083  0  1      0 659124    244   4196    0    0     0     0 3379     0 10 90  0
8054  0  1      0 658752    244   4196    0    0     0     0  726     0 17 83  0

With fewer of them, I can achieve very high context switch rates, well above
what I got with v18 (around 515k) :

 r  b  w   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id
48  0  0      0 1977580   5196  49900    0    0     0    28  261 579893 23 77  0
44  0  0      0 1977580   5196  49900    0    0     0     0  253 578454 17 83  0
48  0  0      0 1977580   5196  49900    0    0     0     0  254 574118 22 78  0
41  0  0      0 1977580   5196  49900    0    0     0     0  253 579261 23 77  0

(this is still on my dual athlon 1.5 GHz).

In my tree, I have replaced the rbtree with the ebtree we talked about,
but it did not bring any performance boost because, eventhough insert()
and delete() are faster, the scheduler is already quite good at avoiding
them as much as possible, mostly relying on rb_next() which has the same
cost in both trees. All in all, the only variations I noticed were caused
by cacheline alignment when I tried to reorder fields in the eb_node. So
I will stop my experimentations here since I don't see any more room for
improvement.


Hmmm that must be why I do not have /proc/sched_debug anymore ;-)


Done !

Cheers,
Willy

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch] CFS scheduler, -v19, Ingo Molnar, (Fri Jul 6, 1:33 pm)
Re: [patch] CFS scheduler, -v19, Ed Tomlinson, (Sat Jul 14, 1:19 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Mon Jul 16, 5:17 am)
Re: [patch] CFS scheduler, -v19, Ed Tomlinson, (Mon Jul 16, 7:10 am)
Re: [patch] CFS scheduler, -v19, Mike Galbraith, (Sun Jul 15, 1:25 am)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Mon Jul 16, 4:00 am)
Re: [patch] CFS scheduler, -v19, Markus, (Sun Jul 15, 8:53 am)
Re: [patch] CFS scheduler, -v19, Mike Galbraith, (Sun Jul 15, 3:46 pm)
Re: [patch] CFS scheduler, -v19, Markus, (Sun Jul 15, 5:11 pm)
Re: [patch] CFS scheduler, -v19, Mike Galbraith, (Mon Jul 16, 2:42 am)
Re: [patch] CFS scheduler, -v19, Markus, (Sat Jul 14, 7:34 am)
Re: [patch] CFS scheduler, -v19, Markus, (Sat Jul 14, 11:11 am)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Mon Jul 16, 5:41 am)
Re: [patch] CFS scheduler, -v19, Markus, (Mon Jul 16, 1:59 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Tue Jul 17, 3:37 am)
Re: [patch] CFS scheduler, -v19, Markus, (Tue Jul 17, 9:06 am)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Tue Jul 17, 1:06 pm)
Re: [patch] CFS scheduler, -v19, Markus, (Tue Jul 17, 3:42 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Tue Jul 17, 4:09 pm)
Re: [patch] CFS scheduler, -v19, Linus Torvalds, (Tue Jul 17, 4:37 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Tue Jul 17, 4:43 pm)
Re: [patch] CFS scheduler, -v19, Markus, (Tue Oct 16, 8:02 pm)
Re: [patch] CFS scheduler, -v19, Markus, (Thu Aug 9, 1:34 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Fri Aug 10, 3:46 am)
Re: [patch] CFS scheduler, -v19, Markus, (Tue Aug 14, 1:15 pm)
Re: [patch] CFS scheduler, -v19, Markus, (Fri Jul 20, 6:26 pm)
Re: [patch] CFS scheduler, -v19, Markus, (Tue Jul 17, 6:03 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Tue Jul 17, 1:13 pm)
Re: [patch] CFS scheduler, -v19, Mike Galbraith, (Tue Jul 10, 4:08 am)
Re: [patch] CFS scheduler, -v19, Bill Davidsen, (Wed Jul 11, 1:26 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Wed Jul 11, 4:55 pm)
Re: [patch] CFS scheduler, -v19, Bill Davidsen, (Fri Jul 13, 5:19 pm)
Re: [patch] CFS scheduler, -v19, Chuck Ebbert, (Mon Jul 16, 5:34 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Mon Jul 16, 5:55 pm)
Re: [patch] CFS scheduler, -v19, Ian Kent, (Tue Jul 17, 1:01 am)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Tue Jul 17, 3:45 am)
Re: [patch] CFS scheduler, -v19, Linus Torvalds, (Wed Jul 18, 12:03 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Thu Jul 19, 4:16 am)
Re: [patch] CFS scheduler, -v19, Bill Davidsen, (Wed Jul 18, 5:37 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Thu Jul 19, 10:32 am)
Re: [patch] CFS scheduler, -v19, Bill Davidsen, (Thu Jul 19, 10:32 pm)
Re: [patch] CFS scheduler, -v19, Bill Davidsen, (Thu Jul 19, 1:06 pm)
Re: [patch] CFS scheduler, -v19, Bill Davidsen, (Thu Jul 19, 1:26 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Thu Jul 19, 1:42 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Thu Jul 19, 1:17 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Thu Jul 19, 1:10 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Thu Jul 19, 4:53 am)
Re: [patch] CFS scheduler, -v19, Ian Kent, (Wed Jul 18, 1:31 pm)
RE: [patch] CFS scheduler, -v19, David Schwartz, (Tue Jul 17, 5:16 pm)
RE: [patch] CFS scheduler, -v19, Ian Kent, (Wed Jul 18, 1:59 am)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Wed Jul 18, 3:54 am)
Re: [patch] CFS scheduler, -v19, Linus Torvalds, (Wed Jul 18, 1:23 pm)
Re: [patch] CFS scheduler, -v19, Bill Davidsen, (Wed Jul 18, 9:50 am)
Re: [patch] CFS scheduler, -v19, Chuck Ebbert, (Tue Jul 17, 12:30 pm)
Re: [patch] CFS scheduler, -v19, Ian Kent, (Tue Jul 17, 7:17 am)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Tue Jul 17, 1:16 pm)
Re: [patch] CFS scheduler, -v19, Bill Davidsen, (Tue Jul 17, 9:24 pm)
Re: [patch] CFS scheduler, -v19, Ian Kent, (Wed Jul 18, 2:19 am)
Re: [patch] CFS scheduler, -v19, Bill Davidsen, (Tue Jul 17, 12:22 am)
Re: [patch] CFS scheduler, -v19, Bill Davidsen, (Thu Jul 12, 8:41 am)
Re: [patch] CFS scheduler, -v19, Willy Tarreau, (Sun Jul 8, 1:46 pm)
Re: [patch] CFS scheduler, -v19, Ingo Molnar, (Mon Jul 9, 6:39 pm)
Re: [patch] CFS scheduler, -v19, Willy Tarreau, (Tue Jul 17, 5:44 pm)
speck-geostationary