Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

EDIT 2:

I mailed the VPS host, and they think it's the amount of RAM. They offered a free up to 512MB for a limited time to see if that solves the problem.

I'll post the difference here.

share|improve this question
    
Can you post the result of: cat /proc/user_beancounters ? –  Ezeyme Sep 7 '12 at 8:34
    
@Ezeyme There is no /proc/user_beancounters on a Xen virtual machine. –  Michael Hampton Sep 7 '12 at 8:51
    
@Michael; ah, sorry, didn't say that it was Xen, I assumed Virtuozzo/OpenVZ... :( –  Ezeyme Sep 7 '12 at 8:55
    
that command does not work, I don't know if this is Xen or not. –  askmike Sep 7 '12 at 9:07
    
What has the web host to say about this? –  Michael Hampton Sep 7 '12 at 9:17
show 1 more comment

1 Answer 1

It is not your VPS per se, but from the chart it looks like your disc is TERRIBLY overloaded - your latency is 30x higher than it should be.

Either you are doing it do it, or someone else is doing it (another VPS) or the system in general is way too slow for the VPS it runs (not that rare on low end VPS that are cheap).

share|improve this answer
    
See post edit, how can I prove to my host this is the case? Is this expected for this price range VPS? –  askmike Sep 7 '12 at 9:12
    
I can not proove anythin - your own stats had latency of over 200ms, check the graphs you posted While I run a LOT of virtual machines (maybe 50 or so) I never rent 10 USD a month systems - I always buy or own the hosts and run my own virtualization layer on top, i.e. I control the host, the machines an drun it all in my operational control. The speeds tests look - "relatively fine", but your own graphs have BAD spikes, and those may crash it. my own VPS go over 500mb/second in disc IO when the host is not too busy. –  TomTom Sep 7 '12 at 13:05
    
I'm sorry, what I meant was what information do I need to tell my host that this is unacceptable? I was aiming to solve the speed issue and my host thinks the problem is in the RAM. I'm afraid I'm not in the position to spent that much money on a server at this moment. –  askmike Sep 7 '12 at 15:12
    
Well, show them the graphs you posted and point them to the latency spikes which should not be there. SImple as that -not a lot more information I can provide. –  TomTom Sep 14 '12 at 8:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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