Previous Thread
Next Thread
Print Thread
Rate Thread
6.4 ultra high CPU usage ?? #267022
01/16/2004 12:59 PM
01/16/2004 12:59 PM
Joined: May 2003
Posts: 96
K
kestral Offline OP
Power User
kestral  Offline OP
Power User
K
Joined: May 2003
Posts: 96
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?

last pid: 65592; load averages: 0.42, 0.37, 0.33 up 23+15:53:37 06:31:58
63 processes: 3 running, 60 sleeping
CPU states: 53.9% user, 0.0% nice, 36.0% system, 0.0% interrupt, 10.1% idle
Mem: 50M Active, 496M Inact, 137M Wired, 48K Cache, 112M Buf, 319M Free
Swap: 2032M Total, 2032M Free
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
38076 mysql 45 0 19064K 15200K RUN 405:00 49.80% 49.80% mysqld


At the time, I had
There are 72 registered and 18 anonymous users online.
With on line settings set to 30 minutes. I have since scaled that back to 10 minutes.

Input is sorely needed, we can NOT afford a dedicated server here.

Sponsored Links
Re: 6.4 ultra high CPU usage ?? [Re: 24hourcampfire] #267023
01/16/2004 3:50 PM
01/16/2004 3:50 PM
Joined: Sep 2003
Posts: 816
Hollywood Florida.
D
DrChaos Offline
Coder
DrChaos  Offline
Coder
D
Joined: Sep 2003
Posts: 816
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...

Re: 6.4 ultra high CPU usage ?? [Re: Duck] #267024
01/16/2004 6:50 PM
01/16/2004 6:50 PM
Joined: Oct 2000
Posts: 2,518
navahoville! :D
N
navaho Offline
Veteran
navaho  Offline
Veteran
N
Joined: Oct 2000
Posts: 2,518
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.

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.

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.

Here's what will. -

Next time this happens have them log into mysql and run the following

show processlist;

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.

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.
Re: 6.4 ultra high CPU usage ?? [Re: zerind] #267025
01/16/2004 8:42 PM
01/16/2004 8:42 PM
Joined: May 2003
Posts: 96
K
kestral Offline OP
Power User
kestral  Offline OP
Power User
K
Joined: May 2003
Posts: 96
DrChaos , persistant connections are off. We're not using them.


[]navaho said:
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.

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.

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.

Here's what will. -

Next time this happens have them log into mysql and run the following

show processlist;

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.

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. [/]

Im not very familiar with using commands in mysql, I merely type : [:"red"]show processlist; [/] as it appears in red ?

Re: 6.4 ultra high CPU usage ?? [Re: 24hourcampfire] #267026
01/16/2004 11:21 PM
01/16/2004 11:21 PM
Joined: May 2003
Posts: 96
K
kestral Offline OP
Power User
kestral  Offline OP
Power User
K
Joined: May 2003
Posts: 96
ysql> show processlist ;
+-------+--------+--------------------------------+---------+
| Id | User | Host | db | Command | Time | State | Info |
+-------+--------+--------------------------------+---------+
| 87665 | admin | localhost | rebuild | Query | 0 | NULL | show processlist |
| 87722 | dbuser | hosting23.digitalprinceton.net | rebuild | Query | 0 | Sorting result |
SELECT B_Number
FROM w3t_Posts
WHERE B_Topic = 1
AND B_Board |
| 87723 | dbuser | hosting23.digitalprinceton.net | rebuild | Query | 0 | Sorting result |
SELECT B_Number
FROM w3t_Posts
WHERE B_Topic = 1
AND B_Board |
+-------+--------+--------------------------------+---------+

Sponsored Links
Re: 6.4 ultra high CPU usage ?? [Re: 24hourcampfire] #267027
01/17/2004 4:44 AM
01/17/2004 4:44 AM
Joined: Dec 2000
Posts: 1,545
Germany
A
Astaran Offline
Addict
Astaran  Offline
Addict
A
Joined: Dec 2000
Posts: 1,545
Germany
There are only two executed queries, which should not be the problem.

You should run this command when you're experiencing problems with the server (high cpu usage). The processlist should be a lot longer then.

Re: 6.4 ultra high CPU usage ?? [Re: -Fusion-] #267028
01/20/2004 9:10 PM
01/20/2004 9:10 PM
Joined: May 2003
Posts: 96
K
kestral Offline OP
Power User
kestral  Offline OP
Power User
K
Joined: May 2003
Posts: 96
Ok, 47 users on line tonight. Forum goes down.

I did show processlist; and got two items.

One command shows 'sleep' the other is query.

?? What to think! I have no idea !

Re: 6.4 ultra high CPU usage ?? [Re: 24hourcampfire] #267029
01/21/2004 3:40 AM
01/21/2004 3:40 AM
Joined: Dec 2000
Posts: 1,545
Germany
A
Astaran Offline
Addict
Astaran  Offline
Addict
A
Joined: Dec 2000
Posts: 1,545
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.

Re: 6.4 ultra high CPU usage ?? [Re: 24hourcampfire] #267030
02/09/2005 10:46 AM
02/09/2005 10:46 AM
Joined: Feb 2005
Posts: 1
T
Tacman Offline
Lurker
Tacman  Offline
Lurker
T
Joined: Feb 2005
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.

Eventually I found two key links, and the solution:

http://dev.mysql.com/doc/mysql/en/freebsd.html

and

http://jeremy.zawodny.com/blog/archives/000697.html

The solution: update FreeBSD to Release 5, or re-compile MySQL with WITH_LINUXTHREADS=yes

This appears to have solved the problem for us.

Tac


Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with, and recommend, the following Web Hosts:
· Stable Host
· Blue Host
· Interserver.net
Visit Us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,938
Joined: January 2000
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,448
Posts293,484
Members13,793
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 25,587
JoshPet 11,330
Rick 8,373
LK 7,396
Lord Dexter 6,503
Gizmo 5,938
Greg Hard 5,533
Top Posters(30 Days)
isaac 4
Today's Statistics
Currently Online 685
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 18
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2018 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.6.2
(Preview build 20180611.dev)
Page Time: 0.036s Queries: 15 (0.009s) Memory: 3.2864 MB (Peak: 3.4632 MB) Zlib enabled. Server Time: 2018-06-19 01:19:51 UTC