Host CPU speed test – HostGator vs VPSLink vs WiredTree

While reading through WHT, I came across a neat little tidbit.

It’s a bit of PHP code that can be used to get an idea as to how fast the processor is on the machine your websites are hosted on – or at least the speed you have available to you. A thanks to “webpan” of the WHT forums for putting up the code he used for his LiquidWeb test.

Basically, you create a php file that looks like this:

<?php
$startTime = microtime(true);
for ($i=0;$i<500;$i++) {
$j++;
for ($k=0;$k<10000;$k++) {
$j++;}
}
$endTime = microtime(true);
$delta = $endTime – $startTime;

echo “total time: $delta seconds.n”;

//phpinfo();
?>

Call it “test.php” or something, and put it somewhere on your webserver – then browse and run it. You could modify it to do some more stressful math, but don’t go crazy.

I tried it on 3 hosts, and here were my results:

time in seconds

time in seconds – lower is better

Each test was run at 3 different time periods during the day. To make things a little more readable the times for each run are only shown to 2 decimal points. The variance here is the sum of the deviations from the average of all 3 tests.

 

 

You’ll notice the following:

  • WiredTree came out on top, and VPSLink wasn’t far behind. HostGator was the slowest.
  • Each run was *very* similar. There was almost no variance, indicating that none of the host machines seem to suffer from high CPU loads at certain points of the day.

 

But what does it all mean, Basil? (obligatory Austin Powers quote)

Well, as far as processor-intensive PHP tasks go, the WiredTree and VPSLink VPS’s are likely to be quicker, and pump out the results faster. In all likelihood they’re simply using faster processors than HostGator. There could very well be other reasons that HostGator came behind, but the fact of the matter is that there’s more processor speed/power available to both VPS scripts.

Does this mean that HostGator’s slow/bad?

Not at all.

There are so many factors that come into play, that you can’t base a host decision on one type of test. HostGator’s got a lot of servers, and I can guarantee you they’re not all the same. The same probably holds true of the VPS providers. If someone gets a brand-spanking-new machine, it’ll be faster than the old machines. It’s a “luck of the draw” thing as far as which machine you’re put on.

You also have to consider that there are many other things that come into play when you’re looking at how long it takes for a page to load somewhere. There are many things that go into tuning a server. A server that’s strapped for RAM, a poorly tuned MySQL database, a server that’s always waiting on IO, a server connected to the network with a 10Mbps port that’s being maxed out, the server location, and the datacenter’s connectivity are just a few examples of things that can really affect how long it takes for a page to load on the viewer’s end.

 

The test subjects (aka “You Rigged the Test!”)

I’ll be the first to admit that these weren’t necessarily level playing fields. Here were the candidates:

HostGator
Shared hosting plan
Apache/FCGI/SuExec

VPSLink
Link-4 VPS – Xen
Apache/SuPHP/SuExec

WiredTree
1024 VPS – Virtuozzo
LiteSpeed/LSAPI/SuExec

The way it typically works for PHP speed is this:
DSO > FastCGI >SuPHP
Litespeed’s PHP server’s a little tough to put in there although most of the info out there seems to indicate it may be faster than all the above. I have no way of knowing whether the speed of the above test is affected much by the engine serving up the PHP, although I’d expect the effect to be marginal in a test like this.

 

3 Comments | Leave a Comment

  1. Andrew Straw on October 8, 2009 - click here to reply
    Be careful with VPSLink -- they gave me an Acceptable Use Policy violation for high CPU and Disk IO usage and shut down my website. (Despite the fact that they list movie encoding on their Xen information webpage.) I switched providers because of that. You may see my full review of VPSLink at http://www.web-hosting-top.com/web-hosting/web-hosting-top.vpslink.com-reviews
  2. Paul on January 10, 2010 - click here to reply
    Thanks for posting this. I suspected hostgator was slowing down my website and I have just bought VPS link. If you go into Google webmaster it shows you how slow your PC is, therefore it is a good indication if your host is giving you a slow server.
  3. sandeep on October 14, 2016 - click here to reply
    also tested wiredtree VPS
    SSD 3000
    $70/month
    and gets this result
    total time: 0.924275875092 seconds.n
    total time: 0.951939821243 seconds.n
    total time: 0.916054964066 seconds.n

Leave a Comment

You can use an alias and fake email. However, if you choose to use a real email, "gravatars" are supported. You can check the privacy policy for more details.