[lkml]   [2002]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: MYSQL,Linux & large threads number
On Fri, 15 Mar 2002, Peter Zaitsev wrote:

> Hello mysql,
> Some time ago I wrote about slow down of mysql with large number of
> threads, which is quite common in Linux-Apache-Mysql-PHP enviroment.
> The test was simulating the worst case of concurrency - all the
> threads are modified global variable in a loop 5000000 times in
> total, using standard mutex for synchronization. The yeild is used
> in a loop to force even more fair distribution of lock usage by
> threads and increase context switches, therefore it did not change
> much with large number of threads. I.e with 64 threads time without
> yeild is 1:33.5

> For Next test I'll try to use Ingo's scheduler to see if it helps to
> solve the problem, also I'll try to test real mysql server to see
> which slowdown it will have.

I think it would be instructive to try using NGPT and either a patched
kernel or 2.4.19-pre3 which has the extra system calls included. I make no
predictions, but large improvements have been noted with a large number of

> CODE: (Dumb one just for test)
> #include <stdio.h>
> #include <pthread.h>
> #include <time.h>
> #define NUM_TH 1000

You might want to read this from the command line as an option and malloc
the vecors. Just a thought, I'm bad at guessing how lare a test I may want
to run.

bill davidsen <>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

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 13:25    [W:0.035 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site