[WBEL-users] Question on mysql

Johnny Hughes mailing-lists@hughesjr.com
Tue, 27 Jul 2004 07:22:20 -0500


--=-CzAds1RBpECfRQHYDlZq
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Tue, 2004-07-27 at 06:45, Johnny Hughes wrote:

> On Mon, 2004-07-26 at 19:13, John Hinton wrote: 
> 
> > Vincent.Raffensberger@dtn.com wrote:
> > 
> > >Just a guess here:
> > >The ps utility changed it's default display options since your old 
> > >version.  Use '-m' to see the threads.
> > >
> > >If that was it, you may want to make an alias in bashrc so you won't 
> > >forget the '-m' every time:
> > >alias ps='ps -m'
> > >  
> > >
> > Nice trick! I didn't know that.
> > 
> > But, unfortunately I was watching it thru top to get somewhat of a 
> > realtime view. Still, never more than one mysqld running at a time, 
> > while under less load on the same machine, RH7.2 saw it as needing 
> > sometimes 5 or 6 instances.
> > 
> > So, I'm still looking for a cure or reason.
> > 
> > Best,
> > John Hinton
> 
> John,
> When I run a test on my webserver (using the apache benchmark program
> {/usr/bin/ab}), I get many (most was 113) copies of 
> /usr/libexec/mysqld (using this command to measure: ps -mef | grep -c
> mysqld).  I installed the default version of mysql/httpd/php
> (currently mysql 3.23.58-1, httpd 2.0.46-32, php 4.3.2-11.1).
> 
> The /etc/my.conf is also default.
> 

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.


Johnny Hughes
HughesJR.com


--=-CzAds1RBpECfRQHYDlZq
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.10">
</HEAD>
<BODY>
On Tue, 2004-07-27 at 06:45, Johnny Hughes wrote:
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#737373"><I>On Mon, 2004-07-26 at 19:13, John Hinton wrote: 
    <BLOCKQUOTE TYPE=CITE>
<PRE>Vincent.Raffensberger@dtn.com wrote:

&gt;Just a guess here:
&gt;The ps utility changed it's default display options since your old 
&gt;version.  Use '-m' to see the threads.
&gt;
&gt;If that was it, you may want to make an alias in bashrc so you won't 
&gt;forget the '-m' every time:
&gt;alias ps='ps -m'
&gt;  
&gt;
Nice trick! I didn't know that.

But, unfortunately I was watching it thru top to get somewhat of a 
realtime view. Still, never more than one mysqld running at a time, 
while under less load on the same machine, RH7.2 saw it as needing 
sometimes 5 or 6 instances.

So, I'm still looking for a cure or reason.

Best,
John Hinton</PRE>
    </BLOCKQUOTE>
    John,<BR>
    When I run a test on my webserver (using the apache benchmark program {/usr/bin/ab}), I get many (most was 113) copies of&nbsp; /usr/libexec/mysqld (using this command to measure: ps -mef | grep -c mysqld).&nbsp; I installed the default version of mysql/httpd/php (currently mysql 3.23.58-1, httpd 2.0.46-32, php 4.3.2-11.1).<BR>
    <BR>
    The /etc/my.conf is also default.<BR>
    </I></FONT><BR>
</BLOCKQUOTE>
BTW ... When there are 113 threads running mysqld using ps -mef ... there is only 1 mysqld in top.&nbsp; There are 113 different mysqld&nbsp; 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.<BR>
<BR>
This is because of a change in the default behavior in top and not a problem with mysqld ... at least for me.<BR>
<BR>
If you press the Shift-H command while in top (to show all threads), you should see all mysqld processes in top. <BR>
<BR>
When idle, I normally have 2 mysql threads running.
<PRE><TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
</TR>
<TR>
</TR>
<TR>
<TD>
<BR>
</TD>
</TR>
</TABLE>

<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
Johnny Hughes<BR>
<A HREF="http://www.hughesjr.com"><U>HughesJR.com</U></A>
</TD>
</TR>
</TABLE>

</PRE>
</BODY>
</HTML>

--=-CzAds1RBpECfRQHYDlZq--