Knowledgebase

Outgrown Server or Wordpress?

Posted by ridesign, 10-30-2010, 05:24 PM
I have a wordpress site with 77,000 posts, and the server becomes really slow at times with the load going to 40. Wordpress is running with hypercache, and has about 100-200 posts added every day. I have a few sites on my VPS server on clustered.net which I have read good reviews about. The server is running XEN, with cpanel/whm, php5.3.3 The server spec is: 3.0Ghz - 8 cpu's 2048MB RAM, and 2048MB SWAP Apache 2.2 WHM/Cpanel Centos 5.5 I have installed eaccelerator with a cache size of 150mb The mysql database for this site is 280mb. The "wp_posts" table is 180mb with 77,000 rows, and the "wp_postmeta" table has 388,626 rows. If I try to run optimize the database in phpmyadmin the server load becomes high and the website becomes very slow. And phpmyadmin becomes inaccessible. Have I outgrown wordpress, with this many posts, or my server, or something not right on my server?

Posted by RandomThoughts, 10-30-2010, 05:57 PM
Have you tried tuning MySQL with MySQL Tuner? http://blog.mysqltuner.com/

Posted by ridesign, 11-01-2010, 07:30 PM
yes my support said they have optimised using that

Posted by drspliff, 11-01-2010, 11:30 PM
During peak times how many concurrent users and average # of requests per second are you pushing?

Posted by angathan, 11-02-2010, 04:43 AM
what is the webserver you are using? What is the avg. no of request per second? If you are using apache, then what are the modules enabled in it?

Posted by ridesign, 11-02-2010, 05:41 AM
Apache 2.2 Centos 5.5 3.0Ghz - 8 cpu's 2048MB RAM, and 2048MB SWAP How do I get avg. no of request per second?

Posted by Vinayak_Sharma, 11-02-2010, 06:24 AM
Use memcache and nginx, you will see improvement. Is this a cPanel server?

Posted by Dregond Rahl, 11-02-2010, 08:15 AM
I agree, you should switch to nginx and toss Apache/cpanel out the window. Works much better. Also look into the W3Total Cache plugin for memcache/APC support (I find APC better)

Posted by JohnnyUtah, 11-02-2010, 08:47 AM
Have you tried a CDN solution... that will decrease your load by 50%... all your images/files are served offsite. Works wonders.

Posted by ridesign, 11-02-2010, 08:14 PM
Yes, it a cpanel server. Is ngnix compatible with cpanel/whm? thanks

Posted by Vinayak_Sharma, 11-02-2010, 08:20 PM
Yes it is, I am already running nginx on multiple servers.

Posted by UNIXy, 11-02-2010, 09:04 PM
I'm not sure what everyone is talking about with Nginx or CDN. It reads like regurgitated solutions to unrelated problems. The sheer number of edits against the posts table along with the traffic is what's causing the load spikes - not just the visitor increase. The WP wp_posts issue is known and is apparent with large blogs with multiple posts (and post editors). So here's the root cause of the slowdown. wp_posts is a MySQL table using the MyISAM storage engine (with a field of type full-text). What this means is that every time there's an update for a row in this table (post editing), the whole table is locked. When a table is locked, select queries depending on that table have to wait for the update to complete before getting a chance to run. This means that guests/ visitors find themselves waiting for the WP pages to load (wp_posts dependency). The accumulation of SELECT queries against the locked posts table causes the load average to sky rocket (artificially) - jobs in runnable state waiting to run. Ok, what next? InnoDB is not an option either. It doesn't support full-text fields, yet. With Oracle now owning Sun, which owns MySQL, there could be delay in making InnoDB support full-text columns (means problem solved). What to do in the mean time? I can think of two solutions to this issue. But I need to ask, how do your editors post? Do they use an offline editors or using WP's editor? What budget can you potentially allocate for a fix? Regards Joe / UNIXY

Posted by Ramprage, 11-02-2010, 09:15 PM
As unixy mentioned Wordpress has issues with large sites and multiple authors. A good blog read about it is here: http://www.allthingscahill.com/2008/...s-scalability/ Actually a CDN might be overkill. You could setup a reverse proxy with Nginx to offload the Apache requests of all the extra garbage (CSS, Images, Javascript) to a different machine. This will allow more resources to your primary server to do what it's suppose to. See this: http://kovyrin.net/2006/05/18/nginx-as-reverse-proxy/



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Syris Tech Server One (Views: 626)
Media Temple Down? (Views: 576)
Install Wildfly cPanel (Views: 558)


Language:

Client Login

Email

Password

Remember Me

Search