-1

my website works fine the day; load average below 3 and cpu below 50%. enter image description here

but at night load average 18 and cpu 81% and the website become very very slow. enter image description here

Photos are showing the active visitors at night 734 and 219 the day

enter image description here the last photo shows the daily visitors from statecounter.com and i don't think that those numbers are true, i think my visitors are between 20000 and 30000.

i don't think the number of visitors is the problem.
i'm on a dedicated server:

  • CPU: Intel(R) Xeon(R) CPU E3-1245 V2 @ 3.40GHz
  • RAM: 31.32 Go
  • Disk: 2x 2 To SATA
  • Version PHP 5.3.3 mod FastCGI
  • MySQL 5.1.73
  • ionCube PHP Loader installed

Plugins used 17:

  • All In One SEO Pack
  • Autoptimize
  • Attachment Pages Redirect
  • Disqus Comment System
  • HTML Javascript Adder
  • iThemes Security
  • Post Tabs
  • Contact Form 7
  • No Image Link
  • Responsive Lightbox
  • User Role Editor
  • WordPress Related Posts
  • WP-PageNavi
  • WP-ReportPost
  • Wp Pagenavi Style
  • WP Smush.it
  • WP Super Cache

i do always update wordpress and plugins

i tried everything, disabling all plugins one by one, deleting them all, changing themes, installing wordpress again and again, moving from host to host but still the same problem. I contacted the host but they still don't find the problem.

i think it's a small problem in the server configuration that makes all these troubles.

  • So how does the system spends it resources? What are the bottle-necks? Is the database too slow? The disks? Not enough RAM? The load is a useless value on it's own. Get important information about your system. – Sven Jan 11 '15 at 12:45
  • Diagnosing this needs to be done from the command line - SSH into it and look at the output of 'top' and 'iotop' for starters. – Grant Jan 11 '15 at 14:11
  • What is the problem you are having? – Michael Hampton Jan 11 '15 at 15:59
0

Put the mysql server on a separate ssd vps / dedicated server in the same data centre using a private ip / vlan - take the mysql load off your webserver and at the same time increase mysql throughput due to ssd

Make sure your wp-super cache is saving the static html pages to a ram disk (/dev/shm/ on centos) - ram is always faster than disk

If searching all content is not necessary, restrict search to titles only as per https://wordpress.stackexchange.com/a/98602 - having to search through post content is very resource intensive with large numbers of posts

Implement some kind of database caching, using w3tc and disabling all options except db cache via apc/memcached for example - caching the db queries can drastically reduce mysql load

You didn't specify whether you are using apache or nginx. My own experience with moving to nginx/php-fpm from apache was the best move I ever made, in regards to lower cpu load and higher throughput plus better stability.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.