near identic installations, very different performance

I have two Linodes.

One 512 and one 768.

The 512 has the following installed:

Debian 5.0

MySQL 5.1

PHP 5.2.11 with PHP-FPM patched

Nginx 0.7.62 (stable)

The 768 has the following installed:

Ubuntu 10.04 LTS

MySQL 5.1

PHP 5.3.3 with PHP-FPM included

Nginx 0.8.52 (stable)

–-

So, I've been installing a very lean forum onto it just to measure performance and it was just stunning. I simply must be doing something seriously wrong here but fail to figure out what.

Logging on to the 512 gives:

0.013s with 10 queries

The exact same forum software installed on the 768 gives:

0.051s with 10 queries

Slower by factor of 4 (!!!!)

In fact, running PhpMyAdmin makes it even more apparent that the 512 is just a lot snappier.

The Linodes are placed in the same facility (east coast US) and both host machines report being "idle" i.e. the load on the machines seems just fine from what I can tell from the Linode Manager.

Pinging these Linodes from Europe where I sit gives the same result (just if anyone was curious).

So, I'm hoping anyone can have some idea as to what the culprit might be? I'm not a "super admin" so I could possibly have done a simple mistake here.

Can it be Ubuntu vs Debian? Really?

Grateful for any tips or help. Thanks.

5 Replies

Given that you're running different versions of PHP and Nginx, along with different versions of most everything else, a little variance isn't too surprising. However, the difference between 0.013s and 0.051s is only 38 milliseconds… that's probably within the margin of error for whatever measurement you're doing.

Check for other differences between the two, as well: different versions of your application, opcode caching or no, different sets of PHP modules loaded, etc… all of those will make a difference.

Thanks hoopycat.

I know this is not in any way a scientific comparison or anything like that.

However, just the "feel" of it, loading pictures etc etc from running the websites on the two different linodes tells the tale of one noticably slower than the other. That's inarguable.

Sure, there are different versions of most of the stuff, but from having looked more into it there are considerably more processes running on the Ubuntu than that of the Debian installation.

Anyway, thanks much for replying. I agree that 38 ms may seem small but the problem of "slowness" is real and any user visiting the two sites can feel the difference.

Given such differences in the top level applications, there's certainly plenty of room for differences to get introduced there. But for the sake of argument, assuming your "gut feel" is right and there's something more systemically slower about the system, a few things that I'd also consider might be:
* Has the 512 been up longer, and had more time to get more of its working set into memory/cache than the 768? It wouldn't be that unusual for a cold system to underperform a warm one. Do they perform more similarly immediately after a reboot? Or conversely, do they approach parity over time.

  • Any difference in filesystem types or kernel's? There have been various changes to how syncs are handled by filesystems/kernels over time that can affect certain operations, especially database related. A lot has been ext4-specific, but there's some generic stuff too at various points in the 2.6.3x series. I'd suggest testing with Linode 2.6.18 stable, but I don't think that works with 10.04, but at the least you might try to ensure the two systems are using the same kernel and thus subject to the same internals.

  • Any difference in filesystem journaling modes (e.g., ordered/writeback, with/without barriers) parameters or the kernel I/O scheduler (e.g., cfq, deadline, etc…). I can't keep track of which distribution is using which of the various settings by default, but at the least you could ensure the two systems are using the same ones when doing an A/B comparison.

  • It's possible one host just has busier neighbors, and any disk I/O is just going to be more expensive on that box. Can you detect any differences in average I/O wait percentage between the two? Something like munin might help identify that, or even just leaving top running and manually watching during some heavier use periods. I suppose CPU could be in contention too with busier neighbors but in my experience that's so rarely an issue on Linodes (whereas I/O capacity is much more often a bottleneck)
    – David

Not to mention such small "unimportant" details like settings of PHP, the database, and the webserver… diff -u, anyone?

Fwiw, I re-installed the 768 to be based on Debian Lenny.

Now it rocks!!!

I almost can't believe how it can be such a difference. I am probably doing something wrong setting up Ubuntu but with Debian it is showing the same performance as for the 512.

For the record, the 768 is running

Debian Lenny 5.0 on the latest ParaVirt from Linode.

MySQL 5.1

PHP 5.3.3

NginX 0.8.52

It's just as snappy as the 512 on the same config although a tad older software.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct