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've been switching hosts using a VPS each time and I'm just really not sure I'm finding the right VPS's. I've used a VPS from burst.net & rubyringtech and I just feel like it's slowly killing my site because of the slow speed. I really don't know if it's the network or the VPS itself but I really wish to fix this. When I TOP into the VPS peak times it shows this:

top - 03:18:56 up 16:33,  1 user,  load average: 1.33, 1.40, 1.33
Tasks:  30 total,   1 running,  29 sleeping,   0 stopped,   0 zombie
Cpu(s): 27.2%us, 13.6%sy,  0.0%ni, 59.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1048576k total,   679712k used,   368864k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

And pages take atleast a good 2-3 minutes to load. I have only like 50-60 members on the forum also. I had a shared hosting account and the forum was lightning fast.... Is a VPS a bad idea? :\

What should I do to fix this? I'm running lighttpd with xcache, and the latest mysql + php version. The server is a intel i7 2600 w/ 1gb uplink (I think the 1gb uplink is a lie because I've tested the network and the highest download speed I've seen was 20mb/s from a code.google page)


All in all I've seen people talking about linode. Should I try them? I honestly don't need a dedicated server yet it's only 50-70 members online. What should I do? I really want a VPS because I enjoy root access. Does anyone have any suggestions?

share|improve this question

migrated from webmasters.stackexchange.com Aug 2 '11 at 18:58

This question came from our site for pro webmasters.

1  
Holy crap, why is there 370M free, but none of it is being used as buffers or cache? You might want to pop over to ServerFault, something is very wrong here. –  Charles May 25 '11 at 0:01
    
I agree with @Charles. That is definitely not right for no memory to be used for cache, and is most likely the cause of your problems. –  Earlz Jun 24 '11 at 16:35

3 Answers 3

up vote 1 down vote accepted

I use Linode with Gentoo 32-bit. I also use vBulletin, with the supporting software for it being Apache, PHP, and MySQL.

It's been a long road of tweaking both Apache and MySQL; we're using the 768 MB Linode, and I've finished tweaking Apache for memory/CPU usage. Currently I'm still tweaking MySQL to allow for enough caching without using too much memory. I'm really close to the sweet spot for the VPS to where it doesn't really swap, but rather have Apache queue connections instead of filling up swap.

One option that has helped a bit is mod_pagespeed; we have a lot of pictures on the site, and a lot of small ones, and it certainly does help. Just updated to the latest SVN -- using the mod_pagespeed-9999 ebuild, did a quickpkg first -- and it has some nice new features.

Unlike a shared server, you will not be able to just "set it and forget it" like a Ronco Showtime Rotisseri; I see a lot of clients that think this is how it works, and it just isn't. You need to take time to tweak Apache (or whatever web server you use), tweak MySQL, and tweak PHP. I've not really used lighttpd, so can't really help you there; but if pages are taking 2-3 minutes to use, and lighttpd isn't having an issues, then MySQL is to blame.

I recently came across a client who was complaining of slowness on his site; it would take 50 seconds between page loads, yet when I checked his VPS, he had a 0.2 load with only about 15% memory used. So what was going on?

His Apache and MySQL were both horribly misconfigured. MySQL had no definitions for query_cache, thread_cache, and table_cache, effectively disabling those options. MySQL was doing no caching whatsoever. Apache had similiar issues; the MaxClients was set at 10, and he was seeing enough traffic to use a lot more than twice that. After I made the appropriate adjustments, then restarted MySQL and Apache, the site loaded blazing fast.

When tweaking MySQL, the free perl script called mysqltuner is very handy, but when you're tweaking it, keep in mind the maximum memory usage; don't set more available MySQL connections than your web server can use, and don't adjust the cache/size variables more than a portion of your available memory -- for example, MySQL on my Linode can theoretically use no more than 39% memory.

I hope the above helps and is informative. As a note, we've been on Linode for about 3 months now, migrating from Slicehost due to Slicehost being forced to migrate to RackSpace Cloud in the near future.

And one more thing (I'm sure I'll be back for more edits): I run mpm_event for Apache and mod_php for PHP.

share|improve this answer

I have had success with Rackspace Cloud servers (similar to a VPS). You maintain full root access and have the ability to scale up the server if needed. Performance has been quite good and if you need to put the database on its own server you have that option as well (costs more of course).

With Rackspace, you can sign up for an account without having to purchase any services and can spin up a virtual machine on demand. You are only charged for what you use, so if you only need a server for an hour, you only pay for an hour. Can be very handy for doing development or proof of concept work too.

share|improve this answer

I'm using Linode for my website and it's had a good track record for me. I personally love using Arch Linux x86-64. There are also a good amount of public "stack scripts" now which will set everything up for you, such as LAMP and similar. They also are one-up on most of the competition because they give you 512M of RAM, out of band access, huge choice of locations, and an easy DNS management interface for $20.

I've had a few minor downtime problems, but that was because of the physical machine I was on was unstable(but I've been migrated to another machine now), so I've had probably a total of about 30 minutes of downtime from them in the 1.5 years I've used them.

share|improve this answer

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.