Note
Try with out pconnect and you will find there is little time lost if any!

-----Original Message-----
From: Felix Schueren [mailto:[EMAIL PROTECTED]]
Sent: 31 May 2001 10:37
To: Xavi Gracia
Cc: [EMAIL PROTECTED]
Subject: Re: Too much CPU Usage


Hey,

looks like you're using pconnects with a high timeout value. You have over
600 processes on the poor machine. 588 of those are sleeping, but they still
burn CPU cycles. Either switch your scripts from pconnect to plain connect
or lower the timeout value for inactive connections (in your my.cnf)  to
something below 5 minutes (the default is rather high, 4 or more hours).
This should fix you up in no time at all. :-)

Regards,

Felix


On Mon, May 28, 2001 at 11:28:21AM +0200, Xavi Gracia wrote:
> Hi !
> 
> I'm a novice mysql administrator and acording to my Web Hosting Provider,
my mysql daemon is loading the CPU too much. The web has currently two main
php scripts regarding the MySQL daemon.
> 
> The first one shows a banner using the PHPAdServer application ( no clicks
are registered, only shows the banner at the moment)
> 
> The second one is a poll system of my own, that "draw" a random poll from
the database ( there are currently 9 polls) and if the user clicks the Vote
button, the vote is registered at the database.
> 
> These two scripts are in the main page of the web, that has received
40,000 hits since the scripts have been incorporated, 15 days ago more or
less... the max_connections allowed by the mysql at the same time are 28.
> 
> What do you think it's the problem, an incorrect mysql configuration, the
hosting machine is a bit junkie or it's normal this CPU usage with these two
mysql access ?
> 
> Here do you have the system statistics regarding the mysqld task
> 
> last pid: 69299; load averages: 9.82, 11.98, 12.69 up 6+20:14:16 19:44:01
> 602 processes: 13 running, 588 sleeping, 1 zombie
> CPU states: 70.8% user, 0.0% nice, 29.2% system, 0.0% interrupt, 0.0% idle
> Mem: 355M Active, 45M Inact, 85M Wired, 16M Cache, 61M Buf, 1544K Free
> Swap: 1024M Total, 56M Used, 968M Free, 5% Inuse
> 
> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
> 510 gameswor 2 0 13804K 2844K poll 58.7H 39.75% 39.75% mysqld
> 
---end quoted text---

-- 
-----------------------------------------------------
Felix Schueren, Technology Services Manager (Germany)
        eMail:  [EMAIL PROTECTED]

ONE-2-ONE Advertising + Telecommunications GmbH
        ** Part of Host Europe Group **
Theodor-Heuss-Str. 92-100, 51149 Koeln, Germany
Telefon (01805) 6632-66 Telefax (01805) 6632-33
[EMAIL PROTECTED]     http://www.hosteurope.de
Geschaeftsfuehrer: Mike Behrendt, Abby Hardoon,
Frank Rejwan.   HR-Eintrag: AG Koeln, HRB 28495

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to