1

I have a simple Wordpress site on a VPS that isn't performing well.

AWStats says:

~ 500k page views per month:

~ 50-80k unique visitors per month

~ 500-800 GB bandwidth per month (lots of JPG, PNG images)

It runs on a VPS with 1GB ram. When I check top, httpd appears and disappears mostly in alternate refreshes. Sometimes 1 instance, sometimes 2 or 3.

top - 13:06:41 up 2 days, 12:02,  1 user,  load average: 2.44, 2.80, 2.79
Tasks:  88 total,   1 running,  87 sleeping,   0 stopped,   0 zombie
Cpu(s): 35.6%us,  9.1%sy,  0.0%ni, 55.0%id,  0.3%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1048576k total,   431376k used,   617200k free,        0k buffers
Swap:        0k total,        0k used,        0k free,    76412k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 8860 apache    20   0  366m  71m 3936 S 19.3  7.0   0:00.60 httpd
23046 apache    20   0  356m  59m 1868 S 14.0  5.8   4:49.68 httpd
19844 mysql     20   0  450m  72m 3888 S  4.0  7.1   1:35.55 mysqld
 9998 root      20   0 50572 4512 2532 S  0.7  0.4   0:00.02 in.proftpd
  538 root      20   0  5932  264  160 D  0.3  0.0   3:08.23 syslogd
 1245 postfix   20   0 56304 1088  668 S  0.3  0.1   0:15.38 qmgr
 2808 root      20   0 56488 2716 1884 S  0.3  0.3   0:00.11 smtp
 9915 root      20   0 85296 5548 3052 S  0.3  0.5   0:00.02 in.proftpd
 9920 root      20   0 85292 5544 3052 S  0.3  0.5   0:00.02 in.proftpd
 9972 root      20   0 85284 5440 2964 S  0.3  0.5   0:00.03 in.proftpd
10013 root      20   0 50572 4480 2504 S  0.3  0.4   0:00.01 in.proftpd

I am using a stopwatch to time the responsiveness of the Wordpress web-admin-panel. Method: I click "Pages" and I wait for the browser spinner to stop, then I click "Dashboard" and I wait for the spinner to stop, and repeat between "Pages" and "Dashboard". My finding is that each complete load takes between 6 seconds and 14 seconds. This is worse than normal, right?

  • 1
    A VPS with 1GB does not tell us enough. Nor does top by itself. Sorry. It may be that your hosting plan is not enough as it is configured. The good new is, you still probably do not need much. Any properly configured server should do it, however, a VPS is not a server. It is a fraction of a server. Even a simple blade should seriously outperform what you have now. It is possible that there is some performance stuff you can do. For example, with more memory you can allocate memory to caching within MySQL and Apache which makes a huge difference. – closetnoc Mar 7 '16 at 5:59
  • 1
    Looks like there is no problem with server. My guess is, it could be latency or not cached properly. WP has lots of cache plugin. – Mani Mar 7 '16 at 6:08
  • 1
    This is unfortunately too broad to answer since it really depends on the content that you're serving. I'd suggest looking at a waterfall under the Network tab in the Developer Tools of Chrome versus using a stopwatch so you'll be able to see not only the total load time, but the time required for each resource, which will give you a better idea of what might be taking the most amount of time to request and load. Take a look at my answer here on how to access that. – dan Mar 7 '16 at 6:28
  • WP is a bit of a hog. It's schema is not fully normalized or optimized. If you are running off of a single HD, that is okay, however, there is potential for an I/O bottle neck on a shared device. Many VPS are not raids. Linux does run well with less memory, however, I always recommend at least 2gig of memory. Also, do not confuse a WP plug-in as being equal to giving Apache and MySQL cache memory. With larger caches, my site actually runs faster the more it is hit. As well, it really is about throughput. The more CPU cores available the better. This allows more concurrent processes to run. – closetnoc Mar 7 '16 at 7:18