Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Jul 12, 2008 5:18 am 
Offline
Newbie

Joined: Sat Jul 12, 2008 5:08 am
Posts: 4
Running a CentOS-5.0 image on a Linode 540 on the Atlanta DC (atlanta43). mysqld is hogging CPU like crazy. Consuming anywhere from 99% to 250% (or more) CPU has now become the norm for mysqld. I have tried all mysql optimisation tricks I could find. No relief. I've also cut down the limit on processes Apache can spawn to serve requests. Persistent connections is enabled. I am simply stumped.

A while back the Linode crashed when the kernel invoked the oom-killer. The oom-killer, trying to reclaim memory, took down the entire system. Not completely sure whether it has happened again since that time, but I'm ripping my way through logs.

Clues, suggestions? I'd really appreciate any I can get. Thanks!

--
Ayaz Ahmed Khan


Top
   
PostPosted: Sat Jul 12, 2008 5:38 am 
Offline
Senior Newbie

Joined: Tue May 20, 2008 10:33 am
Posts: 17
ayaz wrote:
Clues, suggestions? I'd really appreciate any I can get. Thanks!


Is mysql going crazy or are your sites just being hit hard?


Top
   
 Post subject:
PostPosted: Sat Jul 12, 2008 8:36 am 
Offline
Senior Newbie

Joined: Mon Jun 23, 2008 5:04 pm
Posts: 12
You enabled and checked the slow query log, also enabled the queries with no index's log?

Just takes 1 query to slow the whole boat down....


Top
   
 Post subject:
PostPosted: Sat Jul 12, 2008 8:36 am 
Offline
Senior Newbie

Joined: Mon Jun 23, 2008 5:04 pm
Posts: 12
Also you looked into and properly using the mysql cache?


Top
   
PostPosted: Sat Jul 12, 2008 12:01 pm 
Offline
Newbie

Joined: Sat Jul 12, 2008 5:08 am
Posts: 4
josephb wrote:
Is mysql going crazy or are your sites just being hit hard?


The website gets traffic, but I wouldn't call it _heavy_. On average, it receives around 43K hits per day. There is nothing else running. The system serves a standard WordPress installation.

I don't know why but mysqld shouldn't be claiming that much CPU that much of the time. Have I bumped into a limitation of the Linode/Xen?

--
Ayaz Ahmed Khan


Top
   
PostPosted: Sat Jul 12, 2008 12:08 pm 
Offline
Senior Member

Joined: Tue Apr 27, 2004 5:10 pm
Posts: 212
ayaz wrote:
The system serves a standard WordPress installation.


Are you running the WP-Super-Cache plugin? If not, you certainly *should* be. It's one of the few "standard" plugins I require people run if they're using WP on my server.


Top
   
 Post subject:
PostPosted: Sat Jul 12, 2008 12:14 pm 
Offline
Newbie

Joined: Sat Jul 12, 2008 5:08 am
Posts: 4
Wizzard wrote:
You enabled and checked the slow query log, also enabled the queries with no index's log?

Just takes 1 query to slow the whole boat down....
Also you looked into and properly using the mysql cache?


Thanks. Yup, all that you mention is enabled and running, except the 'no index log' part. I'll follow up with that.

--
Ayaz Ahmed Khan


Top
   
PostPosted: Sat Jul 12, 2008 12:18 pm 
Offline
Newbie

Joined: Sat Jul 12, 2008 5:08 am
Posts: 4
anderiv wrote:
Are you running the WP-Super-Cache plugin? If not, you certainly *should* be. It's one of the few "standard" plugins I require people run if they're using WP on my server.


Thanks, Anderiv. Not the WP-Super-Cache plugin, but WP-Cache is plugged in. Also, the static content from WP has been moved such that it is now being served by another host altogether (not part of the Linode). This was done desperately in the hopes that the CPU usage may stablise. But, no dice.

--
Ayaz Ahmed Khan


Top
   
PostPosted: Sun Jul 13, 2008 6:35 am 
Offline
Senior Newbie

Joined: Tue May 20, 2008 10:33 am
Posts: 17
ayaz wrote:
The website gets traffic, but I wouldn't call it _heavy_. On average, it receives around 43K hits per day. There is nothing else running. The system serves a standard WordPress installation.


One of the sites I host has 150k uniques and 2million hits a month, my Linode 540 doesn't even blink.

I'd be enabling some mysql caching, and query logging to see where things are going wrong.


Top
   
PostPosted: Sun Jul 13, 2008 9:19 pm 
Offline
Newbie

Joined: Mon May 12, 2008 9:04 pm
Posts: 4
ayaz wrote:
Have I bumped into a limitation of the Linode/Xen?
--
Ayaz Ahmed Khan

Don't think so. I run a site on the same server, atlanta43 and heavily use a table that has up to 1'500,000 uniques. I will probably get around 4k hits per day. The 540 linode, same as said by josephb, doesn't "even blink". You are missing something. This is surely not a mysql or Linode/Xen bug nor a specific problem with atlanta43.


Top
   
 Post subject:
PostPosted: Mon Jul 14, 2008 1:31 am 
Offline
Senior Member
User avatar

Joined: Tue Aug 17, 2004 11:37 pm
Posts: 262
Website: http://www.our-lan.com
WLM: nf@our-lan.com
Location: Brisbane, Australia
Id be interested to see the my.cnf and apache/http configs for those of you that said you get 10k+ hits a day.. Just for my own corisoty, to see how yours is optimised vs mine :)

_________________
ServerAdmin - www.our-lan.com
"Diplomacy is the art of saying nice doggy whilst looking for a really big stick"
"In my experiece, any attempt to make any system idiot proof will only challenge God to make a better idiot"


Top
   
 Post subject:
PostPosted: Mon Jul 14, 2008 12:44 pm 
Offline
Senior Member

Joined: Thu Apr 03, 2008 12:02 am
Posts: 103
AOL: derole
search the mysql bug database.
i remember reading about this problem a while ago where a buggy startup script would make mysqld spin the CPU at 100%.

i don't have a link right now, will update this thread if i find it.


Top
   
 Post subject:
PostPosted: Mon Oct 06, 2008 7:35 am 
Offline
Newbie

Joined: Mon Oct 06, 2008 7:34 am
Posts: 3
same here, using Debian Etch :(

Edit: fixed - It was because of crazy mysql query in WordPress plugin.

ImageImage
Fixed at 20h :oops: ..what can make one DISTINCT :)


Top
   
 Post subject:
PostPosted: Mon Nov 10, 2008 2:00 pm 
Offline
Junior Member

Joined: Fri Oct 22, 2004 6:40 am
Posts: 20
I'm having a slow mysql issue too!

I'm re-importing a 250MB mysqldump file and my problem is Disk I/O is slowing me down. It seems to go in short bursts and then waits for a bit and then does some more.

According to my stats I'm at about 2.0K for Disk IO.

Is that a high figure for a linode?

Is there any way to speed this up or is this normal?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group