My VPS ubuntu server is very slow

Posted by askmike on Server Fault See other posts from Server Fault or by askmike
Published on 2012-09-07T08:16:03Z Indexed on 2012/09/07 9:39 UTC
Read the original article Hit count: 176

Filed under:
|

I just installed a frech copy of Ubuntu 12.04 on my vps because my old installation was very slow, unfortunately this did not fix the problem.

With slow I mean requests for my PHP websites take a long time, very slow (30 sec per request) to slow (3+ sec per request). When it's really bad SSH is also laggish.

The websites are:

slow?

very slow: Here is a picture of loading a clean install of wordpress
slow: here is a picture of loading a small PHP based website

the vps

The VPS has 256mb ram and an 25GB hdd. Besides serving the 2 small websites it isn't doing anything AFAIK.

What have I installed

  • Clean Ubuntu server 12.04
  • LAMP stack
  • few things like git and nodejs (not using both)
  • ossec (because I thought my server was getting hammered)
  • munin

What I already tried / done

  • I installed munin so that I could watch io speed and such. The problem is that I don't know where to look for in the munin report.
  • I checked logs and don't see anything strange (although I don't really know where to look for besides strange / repetitive errors and GET requests).
  • I configured Apache MPM to:

    <IfModule mpm_prefork_module>
         StartServers          5
         MinSpareServers       5
         MaxSpareServers      10
         MaxClients           40
         MaxRequestsPerChild   0
    </IfModule>
    

    (apache is using prefork, the default)

Stats

I copied the munin report as it appeared at 4:50 last night to a site hosted on a shared webhost. Note that tonight my mysql crashed somewhere after 1:00 (which is a new problem altogether), so therefor the graph for last night might look strange.

Can anyone help me get my VPS up to normal speed?

EDIT:

Thanks for the replies.

The VPS is 10 bucks a month and is from directvps.nl (Dutch host and I'm also dutch).

I did two speed tests for disk IO:

$ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
1073741824 bytes (1.1 GB) copied, 23.1506 s, 46.4 MB/s

$ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
1073741824 bytes (1.1 GB) copied, 39.3796 s, 27.3 MB/s

Anyway: how can I prove to my VPS host that it is to slow? I can understand a server being busy slowing a website down. But 5-30 sec loadtime for a normal PHP webpage?

© Server Fault or respective owner

Related posts about vps

Related posts about ubuntu-12.04