php forum
php mysql forum
php mysql smarty
 
Topic Options
#267022 - 01/16/04 11:59 AM 6.4 ultra high CPU usage ??
kestral Offline
Power User

Registered: 05/07/03
Posts: 96

   6.4 ultra high CPU usage ?? to Del.icio.us Add to del.icio.us
  Digg 6.4 ultra high CPU usage ?? Digg it
We just recently upgraded to 6.4 and Im now being told we're using a heck of a lot of cpu. How 'normal' are these numbers and what can be done to scale back this cpu hit like this?<br /><br />last pid: 65592; load averages: 0.42, 0.37, 0.33 up 23+15:53:37 06:31:58 <br />63 processes: 3 running, 60 sleeping <br />CPU states: 53.9% user, 0.0% nice, 36.0% system, 0.0% interrupt, 10.1% idle <br />Mem: 50M Active, 496M Inact, 137M Wired, 48K Cache, 112M Buf, 319M Free <br />Swap: 2032M Total, 2032M Free <br /> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND <br />38076 mysql 45 0 19064K 15200K RUN 405:00 49.80% 49.80% mysqld <br /><br /><br />At the time, I had<br />There are 72 registered and 18 anonymous users online. <br />With on line settings set to 30 minutes. I have since scaled that back to 10 minutes.<br /><br />Input is sorely needed, we can NOT afford a dedicated server here.

Top
#267023 - 01/16/04 02:50 PM Re: 6.4 ultra high CPU usage ?? [Re: 24hourcampfire]
DrChaos Offline
Coder

Registered: 09/12/03
Posts: 816
Loc: Hollywood Florida.
I am totally guessing here but did you check to use "persistant connections"? I was told one time that it could lead to problems on some larger boards...
_________________________
DrChaos
LeetGamers

Top
#267024 - 01/16/04 05:50 PM Re: 6.4 ultra high CPU usage ?? [Re: Duck]
navaho Offline
Veteran

Registered: 10/05/00
Posts: 2517
Loc: navahoville! :D
BSD box. 63 processes, only 3 running. Load is under one, which means that over the last few minutes you had almost no processes that had to wait in queue. Your not using much memory to speak of. <br /><br />It does look like your mysql is maybe using a bit more CPU than you would like, but that top snippet shows us nothing really. <br /><br />Next time you run into this we'll need more than what you've shown. All that says is that mysql is using a lot of process. Doesn't say who is using mysql or what they are using it for. Doesn't help us troubleshoot.<br /><br />Here's what will. - <br /><br />Next time this happens have them log into mysql and run the following<br /><br />show processlist;<br /><br />Then post the entire processlist as it appears. That will show which query is slow, who is running it, and what kind of connections you have. We can go from there, it'll help a lot.<br /><br />It would also help a lot if you posted a link to the site so we can take a look at your settings, useage patters, etc.
_________________________
Picture perfect penmanship here.

Top
#267025 - 01/16/04 07:42 PM Re: 6.4 ultra high CPU usage ?? [Re: zerind]
kestral Offline
Power User

Registered: 05/07/03
Posts: 96
DrChaos , persistant connections are off. We're not using them.<br /><br /><br />[]navaho said:<br />BSD box. 63 processes, only 3 running. Load is under one, which means that over the last few minutes you had almost no processes that had to wait in queue. Your not using much memory to speak of. <br /><br />It does look like your mysql is maybe using a bit more CPU than you would like, but that top snippet shows us nothing really. <br /><br />Next time you run into this we'll need more than what you've shown. All that says is that mysql is using a lot of process. Doesn't say who is using mysql or what they are using it for. Doesn't help us troubleshoot.<br /><br />Here's what will. - <br /><br />Next time this happens have them log into mysql and run the following<br /><br />show processlist;<br /><br />Then post the entire processlist as it appears. That will show which query is slow, who is running it, and what kind of connections you have. We can go from there, it'll help a lot.<br /><br />It would also help a lot if you posted a link to the site so we can take a look at your settings, useage patters, etc. [/]<br /><br />Im not very familiar with using commands in mysql, I merely type : [:"red"]show processlist; [/] as it appears in red ?

Top
#267026 - 01/16/04 10:21 PM Re: 6.4 ultra high CPU usage ?? [Re: 24hourcampfire]
kestral Offline
Power User

Registered: 05/07/03
Posts: 96
ysql> show processlist ; <br />+-------+--------+--------------------------------+---------+ <br />| Id | User | Host | db | Command | Time | State | Info | <br />+-------+--------+--------------------------------+---------+ <br />| 87665 | admin | localhost | rebuild | Query | 0 | NULL | show processlist | <br />| 87722 | dbuser | hosting23.digitalprinceton.net | rebuild | Query | 0 | Sorting result | <br /> SELECT B_Number <br /> FROM w3t_Posts <br /> WHERE B_Topic = 1 <br /> AND B_Board | <br />| 87723 | dbuser | hosting23.digitalprinceton.net | rebuild | Query | 0 | Sorting result | <br /> SELECT B_Number <br /> FROM w3t_Posts <br /> WHERE B_Topic = 1 <br /> AND B_Board | <br />+-------+--------+--------------------------------+---------+

Top
#267027 - 01/17/04 03:44 AM Re: 6.4 ultra high CPU usage ?? [Re: 24hourcampfire]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
There are only two executed queries, which should not be the problem.<br /><br />You should run this command when you're experiencing problems with the server (high cpu usage). The processlist should be a lot longer then.
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#267028 - 01/20/04 08:10 PM Re: 6.4 ultra high CPU usage ?? [Re: -Fusion-]
kestral Offline
Power User

Registered: 05/07/03
Posts: 96
Ok, 47 users on line tonight. Forum goes down.<br /><br />I did show processlist; and got two items. <br /><br />One command shows 'sleep' the other is query.<br /><br />?? What to think! I have no idea !

Top
#267029 - 01/21/04 02:40 AM Re: 6.4 ultra high CPU usage ?? [Re: 24hourcampfire]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
Mhh, that doesn't sound bad. No query is locked and the mysql server shouldn't be busy with two queries at the same time.
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#267030 - 02/09/05 09:46 AM Re: 6.4 ultra high CPU usage ?? [Re: 24hourcampfire]
Tacman Offline
Lurker

Registered: 02/09/05
Posts: 1
I found this thread searching for "high CPU MySQL" and discovered that all the threads about this had to do with FreeBSD. We were having exactly the same problem, and had optimized our tables, dropped our full-text indexes, researched all our queries and everything else, and even with no slow queries, and few processes running, we were at 98% CPU usage.<br /><br />Eventually I found two key links, and the solution:<br /><br />http://dev.mysql.com/doc/mysql/en/freebsd.html<br /><br />and <br /><br />http://jeremy.zawodny.com/blog/archives/000697.html<br /><br />The solution: update FreeBSD to Release 5, or re-compile MySQL with WITH_LINUXTHREADS=yes<br /><br />This appears to have solved the problem for us.<br /><br />Tac

Top


Top Posters Last 30 Days
AllenAyres 12
Gizmo 10
S7ARBVCK 2
Cambridge 1
Murphdog 1
MattUK 1
Kevin H 1
Who's Online
0 Registered (), 32 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
BeyondCompare v3.00
by blaaskaak
Yesterday at 02:46 PM
Noob - need help, or a reality check!
by Gizmo
09/04/08 03:21 AM
Here I am! Rock me like a Hurricane!
by AllenAyres
09/02/08 03:05 PM
[7.x] Generic Page Outside of forum directory
by Gizmo
08/30/08 05:43 PM
Team UBBDev Rides Again!
by Gizmo
08/28/08 11:45 PM
Multiple Identity Detector
by MattUK
08/28/08 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
veedubb8, twentyseven, Claus1, welcomeback1, Paug
13327 Registered Users

 

 

 
fusionbb message board php hacks