Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: CPU Optimization?
PostPosted: Sun Mar 21, 2010 9:03 pm 
Offline
Senior Newbie

Joined: Tue Feb 02, 2010 9:46 pm
Posts: 5
Just wondering if you guys could offer some Optimization tips.

Linode 1440
CPU usage is usually around 60-70% But when my traffic gets high it averages about 140%. It still runs smoothly but I don't think its fair if im constantly above my allotted 100%.

So any tips? It's a Wordpress based site - I'm running wp-supercache on it and that done a lot of good.


Top
   
 Post subject:
PostPosted: Mon Mar 22, 2010 11:16 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
You're allotted 400% to use as you wish, not 100%. Your CPU usage is only 15-18% of available, spiking to 35%. It's not exactly at the level where you should be concerned...

Do you have MySQL set up properly with a query cache and the like? Have you tried installing a PHP cache like APC? These two things alone, if you're not doing them, can make an enormous difference.


Top
   
 Post subject:
PostPosted: Mon Mar 22, 2010 6:12 pm 
Offline
Senior Newbie

Joined: Tue Feb 02, 2010 9:46 pm
Posts: 5
Quote:
Do you have MySQL set up properly with a query cache and the like? Have you tried installing a PHP cache like APC? These two things alone, if you're not doing them, can make an enormous difference.


I have set up MySQL properly to the best of my knowledge. As for the query cache and APC I have no installed. Although I assume APC is like Wp-Supercache.

I shall look into this thank you (do you happen to know any ways of figuring out if MySQL was badly configured? Or how to reconfigure it on high settings.)

Okay set up APC and in the process locked myself out. Pretty sure APC has nothing to do with connections though.


Top
   
 Post subject:
PostPosted: Mon Mar 22, 2010 6:52 pm 
Offline
Senior Member
User avatar

Joined: Sun Mar 23, 2008 10:10 am
Posts: 71
Website: http://frontseed.com/
Raven917 wrote:
I have set up MySQL properly to the best of my knowledge. As for the query cache and APC I have no installed. Although I assume APC is like Wp-Supercache.

Your assumption is wrong. APC is a php opcode cacher which compiles php scripts into bytecode and caches them for faster execution.
On the contrary WP Super Cache generates static html files from WP pages reducing the time needed to serve Wordpress pages.

However I don't use neither WordPress nor APC I suggest you try using both as they can both speed up page generation (supercache pre-generates pages, but APC can speed up this pre-generation)


Top
   
 Post subject:
PostPosted: Mon Mar 22, 2010 11:17 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Before jumping in to optimize everything, run top (or htop) for a few minutes and find out which process is responsible for the majority of your CPU usage. Is it Apache or MySQL or both? Focus your efforts on the biggest offender. Also pay attention to the "wa" column near the top of the "top" output. If this figure is high, you're hitting the disk too much.

WP-Super-Cache generates static files, which Apache then serves directly without ever hitting PHP. Looks like a case where lighttpd or nginx would come in handy, if you can make the rewrite rules work properly.


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


Who is online

Users browsing this forum: No registered users and 1 guest


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