PHP/MySQL: T2000 as a heavy SAMP web server

In this first part of our T2000 review, we look at the T2000 as a heavy Apache, MySQL and PHP web server (or SAMP web server). You do not buy a T2000 to offer some basic web services or to serve up some static HTML.

There are two ways that the T2000 could be useful as a web server. The first one is to use Solaris zoning (a.k.a. "Solaris containers") techniques to run a lot of light/medium web servers in parallel virtual zones. As virtualisation is still something that requires quite a bit of expertise, and we didn't have much experience with Solaris Zones, we decided to test the second scenario.

As a side note, the T1 has a built-in support for a hardware called Hypervisor (which is a first for Sparc), which might make virtualisation quite a bit faster. It also makes OS support easier (once your OS can support running inside the Hypervisor, there'd be little porting left to do), except for new features. Basically, the Hypervisor virtualises the chipset, giving a consistent view to the OS. Sun is helping to make sure that Linux and BSD gets ported to the T1.

Back to our web server testing. The second scenario is a heavy web server, which gets a lot of traffic on dynamically generated content that requires quite a bit of number crunching.

We have two real world examples: one using JSP and Sybase, and the other one using PHP/MySQL. In this article, we like to introduce you to the first example.

The PHP test script retrieves hourly-stored weather information out of a MySQL database, which can be overviewed by month. An 'opening page' displays all months that are stored in the database, and if you open a 'detail page', the month you have selected is submitted by query string parameters.

On that new opened page, you see the following information for that month:
  • Overall Minimum, Maximum & Average Temperature for that month
  • Minimum, Maximum & Average Temperature by day and by night, for that month
  • Average temperatures for each day in that month
  • Minimum, Maximum & Average wind speed
  • percentages for the wind direction (for example: for 20% of the time, the wind direction was WEST, 10% SOUTHWEST, etc.)
  • the script execution time
Bert Devriese, who wrote the PHP script, explains how the script behaves:
"When the page is requested, first thing the script does is checking if all $_GET variables, such as 'm' and 'j' are set. If somebody requests the page without these $_GET variables, the script will not continue because it has insufficient parameters to continue.

Next thing that happens is the 'cache-file check'. I haven't used any type of PEAR class, or other frameworks that support caching, to enable caching in the weather-script. I simply check if the cache file exists (the cache file contains the regular HTML output that the browser of the client normally would receive), and if it's not older than one minute. If so, the file will be included, and the php 'exit' command will be executed so that the script thinks that it has 'ended' and the output will be sent to the browser.

If the cachefile does not exist, or if it's older than one minute, the script will simply continue, but the ob_start() function, to start 'output-buffering', will be executed. All regular scripts and several MySQL queries will be executed, and at the end of the file, a new file will be created with fopen($file,'w') (the 'w' makes sure that if the file already exists, it just will be blank and it will seem as if you're writing to a 'new' file. If the file does not exist already, it will be created). When the script ends, the output buffer contents will be retrieved with ob_get_contents(), and all this output will be written to the new cache-file with fwrite(). At the end, ob_end_flush() will flush the output buffer contents to the browser of the client..."

He included a nice diagram for us to make the process clearer.

For benchmarking, httperf was used in conjunction with autobench, a Perl script written by Julian T. J. Midgley, designed to run httperf against a server several times, with the number of requests per second increasing at each iteration. The output from the program enables us to see exactly how well the system being tested performs as the workload is gradually increased until it becomes saturated. In each case, the server was benchmarked with 5 requests per connection.

The Slim T1 CPU The T2000 as a heavy SAMP web server: the results
Comments Locked


View All Comments

  • phantasm - Wednesday, April 5, 2006 - link

    While I appreciate the review, especially the performance benchmarks between Solaris and Linux on like hardware, I can't help but feel this article falls short in terms of an enterprise class server review which, undoubtedly, a lot of enterprise class folks will be looking for.

    * Given the enterprise characteristics of the T2000 I would have liked to see a comparison against an HP DL385 and IBM x366.

    * The performance testing should have been done with the standard Opteron processors (versus the HE). The HP DL385 using non HE processors have nearly the same power and thermal characteristics as the T2000. DL385 is a 4A 1615 BTU system whereas the T2000 is a 4A 1365 BTU system.

    * The T2000 is difficient in serveral design areas. It has a tool-less case lid that is easily removable. However, our experience has been that it opens too easily and given the 'embedded kill switch' it immediately shuts off without warning. Closing the case requires slamming the lid shut several times.

    * The T2000 only supports *half height* PCI-E/X cards. This is an issue with using 3rd party cards.

    * Solaris installation has a nifty power savings feature enabled by default. However, rather than throtteling CPU speed or fans it simply shuts down to the OK prompt after 30 minutes of a 'threshold' not being met. Luckily this 'feature' can be disabled through the OS.

    * Power button -- I ask any T2000 owner to show me one that doesn't have a blue or black mark from a ball point pen on their power button. Sun really needs to make a more usable power button on these systems.

    * Disk drives -- The disk drives are not labeled with FRU numbers or any indication to size and speed.

    * Installing and configuring Solaris on a T2000 versus Linux on an x86 system will take a factor of 10x longer. Most commonly, this is initially done through a hyperterm access through the remote console. (Painful) Luckily subsequent builds can be done through a jumpstart server.

    * HW RAID Configuration -- This can only be done through the Solaris OS commands.

    I hope Anandtech takes up the former call to begin enterprise class server reviews.
  • JohanAnandtech - Thursday, April 6, 2006 - link

    DL385 will be in our next test.

    All other issues you adressed will definitely be checked and tested.

    That it falls short of a full review is clearly indicated by "first impressions" and it has been made clear several times in the article. Just give us a bit more time to get the issues out of our benchmarks. We had to move all our typical linux x86 benchmarks to Solaris and The T1 and keep it fair to Sun. This meant that we had to invest massive amounts of time in migrating databases and applications and tuning them.
  • davem330 - Friday, March 24, 2006 - link

    You aren't seeing the same kind of performance that Sun is claiming
    regarding Spec Web2005 because Sun specifically choose workloads
    that make heavy use of SSL.

    Niagara has on-chip SSL acceleration, using a per-core modular
    arithmetic unit.

    BTW, would be nice to get a Linux review on the T2000 :-)
  • blackbrrd - Saturday, March 25, 2006 - link

    Good point about the ssl.

    I can see both ssl and gzip beeing used quite often, so please include ssl into the benchmarks.

    As mentioned in the article 1-2% of FP operations affect the server quite badly, so I would say that getting one FPU per core would make the cpu a lot better, looking forward to seeing results from the next generation.

    .. but then again, both Intel and AMD will probably have launched quad cores by then...

    Anyway, its interesting seeing a third contender :)
  • yonzie - Friday, March 24, 2006 - link

    Nice review, a few comments though:


    Eight 144-bit DDR DIMM slots allow...
    I think that should have been

    , although you might mean dual channel ECC memory, but if that's the case it's a strange way to write it IMHO.

    No mention of the Pentium M on page 4, but it shows up in benchmarks on page 5 but not further on... Would have been interesting :-(


    There are two ways that the T2000 could be useful as a web server. The first one is to use Solaris zoning (a.k.a. "Solaris containers") techniques to run a lot of light/medium web servers in parallel virtual zones. As virtualisation is still something that requires quite a bit of expertise, and we didn't have much experience with Solaris Zones, we decided to test the second scenario.

    And the second scenario is what exactly? ;-) (yeah, I know it's written a few paragraphs later, but...)

    Oh, and more pretty pictures pls ^_^
  • sitheris - Friday, March 24, 2006 - link

    Why not benchmark it on a more intensive application like Oracle 10g
  • JohanAnandtech - Friday, March 24, 2006 - link

    We are still tuning and making sure our results are 100% accurate. Sounds easy, but it is incredible complex.
    But they are coming

    Anyway, no Oracle, we have no support from them so far.
  • JCheng - Friday, March 24, 2006 - link

    By using a cache file you are all but taking MySQL and PHP out of the equation. The vast majority of requests will be filled by simply including the cached content. Can we get another set of results with the caching turned off?
  • ormandj - Friday, March 24, 2006 - link

    I would agree. Not only that, but I sure would like to know what the disk configuration was. Especially reading from a static file, this makes a big difference. Turn off caching and see how it does, that should be interesting!

    Disk configurations please! :)
  • kamper - Friday, March 31, 2006 - link

    No kidding. I thought that php script was pretty dumb. Once a minute you'll get a complete anomaly as a whole load of concurrent requests all detect an out of date file, recalculate it and then try to dump their results at the same time.

    How much time was spent testing each request rate and did you try to make sure each run came across the anomaly in the same way, the same number of times?

Log in

Don't have an account? Sign up now