Dec 16 2008

Choose the right VPS to host your busy websites

Published by Jiwei at 12:47 pm under Internet, Software

I have a few busy websites running Wordpress, phpBB, phpList, eTicket, Magento and other PHP/MySQL based scripts. I get close to 1M hits a month with a peak observed at 9 hits/second.  A shared hosting won’t work for me anymore.  A dedicated server is too expensive and perhaps an over-kill. So I set off to find a VPS (Virtual Private Server) 8 month ago.  It’s a quest full of frustrations and learning.  I’ll write my experience down here in hope that it can be of some use to others about to start a similar quest.  I’ll cover two primary issues:

  • Picking the right VPS, and
  • Running a light system

VPSLink referral/promotion code: CSR42P 10% lifetime discount.

How to pick the right VPS

I first started with a HostIcan VPS-Rage (512MB RAM) using Virtuozzo virtualization. It came with a reseller package which I don’t need and it gave me a lot of headache in setting things up. The performance of the applications was unpredictable, in the sense that response latency could be unbearably long (>15 seconds) or reasonably fast (~1 second). Apache log showed many child processes being terminated. I wasn’t sure whether this was because of either my VPS being deprived of CPU or hiccups of Apache.

The last straw came when I changed the MySQL root password and the monitoring software kept restarting MySQL every 10~15 mins.  And I was demanded $30 to reset MySQL password.  No, I wouldn’t give in to this type of bullying behavior and decided to move on.  To make it the worst experience to me, HostICan won’t refund the remaining 6 month fee.  Their “Risk Free Money Back Guarantee” only applies to the first 30 days. Buyer beware!

Virtuozzo/OpenVZ gives you a bit speed but not stability

After realizing that life with a VPS is a bumpy ride, I tried to understand virtualization better. Virtuozzo is the commercial version of OpenVZ by Parallels. It runs a single instance of OS and claims to offer the highest levels of density, performance and manageability.  However, a fatal drawback is that each Virtuozzo VPS does not have virtual memory, but rather some additional burstable RAM. The burstable RAM are shared by all VPS on the same server.

When RAM on a server is exhausted, malloc() return an error and it is upto applications to handle the error gracefully.  Without exception, applications terminate with or without core dump.  When memory leak is still common (e.g. in PHP) and server setup is done by armatures (e.g. configuring 256 Apache processes), the chance for RAM exhaustion is pretty high.  This may explain why I saw many Apache child process termination on my HostIcan VPS.

Xen is the right choice

While stability being an issue with Virtuozzo or OpenVZ based VPS, the alternative is Xen. Xen is fundamentally different from Virtuozzo or OpenVZ.  Xen provides a hardware emulation and each VPS runs its own instance of OS, with virtual memory. When the allotted RAM is used up, the OS starts swapping.  It slows down the system but no sudden death occurs.  This is the same predictable behaviour of a dedicated server.  The following diagrams from VPSLink.com explains the differences pretty well.

After much search and research, I found VPSLink which has good reviews and reasonable pricing. BTW, when checking out hosting companies, it’s useful to have a read of their facilities and look at the server room pictures.  Pay particular attention the rack structure, heat vents, raised floor and wiring neatness. I managed to filter out a couple of hosting company showing Wal-mart racks on wheel, bare floor, hairy wiring and Linksys routers.

I signed up for VPSLink Link-4 Xen package ($30/month, 512M RAM) and installed Fedora 8.  Fedora 8 is in the same blood line of the vetted Redhat Enterprise Linux 5 (Fedora 11 will be in EL6 to be released 2010).  I have faith in its stability as I deployed multi-million dollar servers with Redhat EL5 to top tier mobile operators around the world before.

So far, VPSLink’s service is excellent. I asked for IP address reverse mapping and it was done in 10 minutes. If you want to sign up with a VPSLink package, use the referral/promotion code CSR42P.  You’ll get a 10% lifetime discount and I’ll get some credit to my package. Don’t feel obliged if there’s a better deal.

Read the Part 2 of this quest: Speedy ride on a VPS with Lighttpd

  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • YahooMyWeb
  • Technorati
  • Google Bookmarks

Related posts

7 responses so far

7 Responses to “Choose the right VPS to host your busy websites”

  1. Qinon 04 Feb 2009 at 4:57 am

    Huhhhh

    [Reply]

  2. Ronaldon 23 Mar 2009 at 5:04 pm

    Thanks for the review. I signed up today and used your referal code.

    This is my first vps, so hopefully all goes well.

    [Reply]

  3. Jiweion 24 Mar 2009 at 4:51 am

    Let me know if you run into any problem with VPSLink VPS. I may have bumped into the same issue and can give you a hand.

    [Reply]

  4. Emaon 12 Nov 2009 at 9:29 am

    A question:

    My Hostican VPS are stopping/killing the mysql server each day now. They say it hit the memory limit. Now I have 512 MB RAM. I paid for the management plan and their support help was to restart the server which I can do by myself. So my 30 days are not finnished yet, I ordered 1 year directly. I hope I can get back the money. Is VPSLink, their Plan 5 (Link 5) good? I have 2-3 sites which use php and mysql. 3000 unique visitors to the biggest of them.

    Can I handle the accounts online or must I login to the server (SSH) each time. I like the WHM controlpanel and Cpanel for the accounts. Do they give this?

    I really need some advice here! So boring to buy something and it’s not working… :(

    Appreciate any advices.

    [Reply]

    Jiwei Reply:

    Ema,

    It’s unfortunate that we followed down the same path. My HostIcan VPS MySQL was dying regularly. I was demanded a fee before they looked at it.

    Stay clear from Virtuozzo. Choose Xen. You lose a bit of speed but gain much needed stability. I have a little less number of visitors per day (~2000) than you. My VP Link4 handles that without a sweat.

    VPS provide Cpanel (WHM too, not 100% certain) for a small monthly fee. I’m a commandline guy, a habit formed over years.

    When sign up with VPSLink, use referral code CSR42P. You’ll get a 10% lifetime discount and I’ll get some credit to my hosting review. The Lifetime discount works in my recent renew.

    If you want to get refund from HostIcan, you need to act fast. Good luck!

    [Reply]

    Ema Reply:

    Thanks for that quick reply. I am thinking about this and I am now thinking I will sign up for the Plan 5 and move my heavy site there. I have 6 days before my 30 days ends on Hostican. I guess I can leave the smaller sites on HostICan then. I am OK that they took my money but that’s life then sometimes :) . Better to keep it then start to fight for not so big money.

    Do you know about the Hostname entry when creating my account? Is that a new domainname or one I own now. I can not take the one on Hostican but I have some domains registered on GoDaddy. Or will they register a new domain name?

    Would you recommend to order for 1 year. I did that with Hostican and now this happened…

    As I thought the WHM was included in Plan 5 but they also write about some license for it, hard to understand and how much that cost if so. Not so clear info on the site.

    Of course I will use your affiliate code friend.

    You don’t have a article about optimizing mysql in php? Maybe there’s something I did wrong when coding. I do like most others I believe, I include the open mysql database in the header and close the connection in the footer. Any advices on that? I am searching on Google for that also.

    [Reply]

    Jiwei Reply:

    The hostname entry on VPSlink is a name for your reference. Anything will do. VPSlink package doesn’t come with domain name, another trap for getting more future revenue and increasing the barrier-to-exit. It’s cheaper using GoDaddy.

    I signed up for one year term and am now on the 2nd year. Their service is top notch. I have nothing to complain about.

    Regarding mysql optimization, because mysql is running on local, connection time is minimal. You’re following good practice, but it doesn’t improve performance much. The more important things are mysql buffer size, table index, etc. I found the mysql tuning on this page helpful http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:PerformanceFastCGI
    I didn’t follow it to the letter given my VPS only 512MB RAM. So you need to adjust as you go.

    OReilly has a good book on MySQL performance tuning, that I used to have and lost in lending.

    BTW, one sort of mistake I made was choosing Fedora, which I only realized after over a year. Updating packages becomes difficult. By all means, Fedora is beta software. Updating core has its own risks. If you’re on Redhat line, use CentOs instead which has a lot stable and long-term support.

    Hope these help.

Trackback URI | Comments RSS

Leave a Reply

Spam protection by WP Captcha-Free