public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Threads FAQ entry incomplete
@ 2001-06-20 17:48 Mike Kravetz
  2001-06-20 18:59 ` Rodrigo Ventura
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Kravetz @ 2001-06-20 17:48 UTC (permalink / raw)
  To: linux-kernel

I would take exception with the following statements in the FAQ:

"However, the Linux scheduler is designed to work well with a small
number of running threads. Best results are obtained when the number
of running theads equals the number of processors."

I agree that the Linux scheduler is designed to work well with
a small number of threads.  However, when the number of processors
is no longer small, the Linux scheduler starts to suffer if the
number of threads equals the number of processors.  For example
consider the following data from TPC-H benchmark runs (2.4.3 kernel).

                      2-CPU          4-CPU          8-CPU
-------------------------------------------------------------
Mean runqueue         4.93 (18)      7.25 (23)      8.21 (35)
length (max)

runqueue lock         2.4%           9.6%           47.2%
contention

Mean lock hold        1.5us          2.2us          3.9us
time

Mean lock wait        2.8us          3.9us          10us
time

Note that in the 2 and 4 CPU cases, the run queue length is
aprox 2x the number of CPUs and the scheduler seems to perform
reasonably well with respect to locking.  In the 8 CPU case,
the number of tasks is aprox equal to the number of CPUs yet
scheduler performance has gone downhill.

-- 
Mike Kravetz                                 mkravetz@sequent.com
IBM Linux Technology Center

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

end of thread, other threads:[~2001-06-21  0:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-20 17:48 Threads FAQ entry incomplete Mike Kravetz
2001-06-20 18:59 ` Rodrigo Ventura
2001-06-20 19:42   ` Charles Cazabon
2001-06-20 23:00     ` J.D. Bakker
2001-06-20 22:53       ` Charles Cazabon
2001-06-21  0:50       ` D. Stimits

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