public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.17 absurd number of context switches
@ 2001-12-28 16:35 Jeffrey W. Baker
  2001-12-28 17:02 ` Alan Cox
  2001-12-29  3:06 ` Anton Tinchev
  0 siblings, 2 replies; 14+ messages in thread
From: Jeffrey W. Baker @ 2001-12-28 16:35 UTC (permalink / raw)
  To: linux-kernel


Here's a slice of vmstat 1 on my 2-way x86, 2GB main memory machine
running Postgres 7.2beta4 on Linux 2.4.17:
                                                           cpu
r b w                                bi  bo  in    cs us sy id
7 0 0 371612 58272 18576 1568896 0 0  0 168 414 33113 49 38 13
9 0 0 371612 59168 18576 1568900 0 0  0  64 215 32143 56 36  8
5 0 0 371612 58532 18576 1568924 0 0  0 696 363 33553 52 41  7
8 0 0 371612 59344 18576 1568956 0 0 16 240 374 34237 52 38  9
3 0 0 371612 58860 18576 1568996 0 0  0 128 254 31848 51 38 11
6 0 0 371612 59172 18576 1568996 0 0  0  64 234 36340 56 30 14
3 0 0 371612 59092 18576 1569004 0 0  0 232 204 32065 48 42 11
                                                ^^^^^
Check out those figures for context switches!  30,000 switches per second
with only three runnable processes and practically no block I/O seems
quite high to me.  You can also see that the system is spending half its
time in the kernel, presumably in the scheduler.  Postgres is barely
getting any CPU time at all, and the performance suffers noticeably.

Is this a scheduler worst-case, something to be expected, or something I
can work around?

Please CC me since vger's majordomo is an impossible chunk of shit.

-jwb


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2001-12-29 20:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-28 16:35 2.4.17 absurd number of context switches Jeffrey W. Baker
2001-12-28 17:02 ` Alan Cox
2001-12-28 17:07   ` Davide Libenzi
2001-12-28 17:14     ` Stephan von Krawczynski
2001-12-28 17:22       ` Davide Libenzi
2001-12-28 17:43         ` Alan Cox
2001-12-28 17:43           ` Davide Libenzi
2001-12-28 17:37     ` Alan Cox
2001-12-28 17:33       ` Davide Libenzi
2001-12-28 17:45         ` Alan Cox
2001-12-28 17:44   ` Jeffrey W. Baker
2001-12-28 18:06     ` Davide Libenzi
2001-12-29 20:49   ` Jeffrey W. Baker
2001-12-29  3:06 ` Anton Tinchev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox