[lkml]   [2001]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Threads FAQ entry incomplete
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).

Mean runqueue 4.93 (18) 7.25 (23) 8.21 (35)
length (max)

runqueue lock 2.4% 9.6% 47.2%

Mean lock hold 1.5us 2.2us 3.9us

Mean lock wait 2.8us 3.9us 10us

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
IBM Linux Technology Center
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:55    [W:0.047 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site