[WBEL-users] Question on mysql

John Hinton webmaster@ew3d.com
Tue, 27 Jul 2004 09:05:18 -0400


Johnny Hughes wrote:


>>
> BTW ... When there are 113 threads running mysqld using ps -mef ... 
> there is only 1 mysqld in top.  There are 113 different mysqld  
> threads running, all with the user as mysql (all with a different PID) 
> ... but top only shows 1 ... it shows the main thread that creates the 
> others, but not the other threads.
>
> This is because of a change in the default behavior in top and not a 
> problem with mysqld ... at least for me.
>
> If you press the Shift-H command while in top (to show all threads), 
> you should see all mysqld processes in top.
>
> When idle, I normally have 2 mysql threads running.

EUREKA!!! There they are! U da man!

Yup, I guess I was just sitting with an old OS and have a lot of 
catching up to do. But, I must admit, I did not want to go to Apache 2 
until this year, so RH7.2 was my choice.

I have a LOT of writes coming in to mysql and some of the queries are 
executed maybe in 50 variants. Therefore, threading was just a normal 
way of life on the 7.2 system. I normally watch via top, as these are up 
and down at all times. Much easier to let it refresh every few seconds 
than sit here and to the ps command ever few seconds. What I find funny, 
is that top is hiding threads of mysqld, but I see multiple versions of 
saslauthd, sendmail, apache, kjournald and so on. I suppose sasl for 
instance is set to start 5 instances by default as I seem to always see 
5? But in the case of sendmail and apache, the numbers vary under top 
without the shift-H. So, I'm left wondering why the difference?

Thanks for that shift-H tip! Assuming top's reporting was the same, I 
never would have been looking for that. Especially when combined with 
the above confusion.

Thanks,
John Hinton <about to start into the next 'why' thread>