Server Stacks
Chosing the server stack and deciding on how to configure it was quite tricky. My personal preference would be to optimise each one to the maximum possible using a multitude of tools and personal experience before attempting any benchmarks. However this creates an issue, not all servers respond in the same way to the same enhancements.
Because of this, the decision was made that each server would be deployed using only the basic configuration. No advanced configuration or tuning would take place.
So which linux distro to use? One could spend a lifetime browing the internet for peoples opinions on which version of linux is best. Regardless it soon became apparent the only 2 real contenders to be considered would be CentOS and Debian.
I ran down a list of features for each, including things such as updates, stability, end user ease, commercial support, package management, out the box performance and finally my own preference.
In the end CentOS had a small margin and it realy came down to that even though Debian is more cutting edge and receives updates to packages much more quickly, I feel that CentOS by its nature (being based off RHEL which has its own independent testing and requirements of Fedora packages to ensure stability and quality is maintained) is much more geared to being an Enterprise Level system with focus on stability and being methodical. It also provides a much easier migration path if in the future users want to upgrade to a mission critical or highly supported system such as RHEL (as CentOS is mostly RHEL with the branding and trademarks removed, so maintains a near 100% binary compatability) or to Scientific Linux.
As such, all these tests will be based off the latest version of CentOS. Currently this is Centos 6.3
The remaining options come down to what software to run the web stack. Whilst providing a comprehensive list of web servers such as Hiawatha and lighttpd would be nice, it simply adds to a large list of items to test.
As such the stacks tested will be as follows.
CentOS, Apache, MySQL, PHP (As Apache Module)
- Not much to say here, the most popular stack setup going so will provide our baseline.
CentOS, NginX, MySQL, PHP-FPM
- A more common performance setup
CentOS, Cherokee, MySQL, PHP-FPM
- While NginX is more popular, Cherokee is often overlooked due to its GUI provided. However it is still a very high performance web server (sometimes beating NginX) and is considerably more user friendly in my experience.
CentOS, NginX, Percona, PHP-FPM, APC
- Superstack one. Replacing MySQL with Percona and adding in APC to provide caching.
CentOS, Cherokee, Percona, PHP-FPM, APC
- Superstack two. Replacing NginX with the more user friendly Cherokee.
Why no mariaDB or PostgreSQL? As with the web servers, adding more simply adds to the list. MySQL is chosen obviously for its popularity. Percona was chosen due to the excelent performance, features, documentation and support.
Why no Xcache, EAccelerator, Varnish, Memcached? As previously, this is due to time restrictions. Also, APC has proven itself to be the cache of choice for many, and will be included in future versions of PHP itself due to it's popularity and excelent features. Memcached on XenForo seems to offer no benefits over APC except in some very specific circumstances. Varnish also offers questionable performance gains in performance stacks.
So this concludes the Server Stacks section of the experiement.
Each server will be subject to 5 sets of stacks and testing. As it currently stands I am planning to run these tests on 6 different servers, meaning 30 lots of tests. These tests will then be done on 3 data sizes. Meaning 90 total tests. Thats a lot of testing! As such some of the data sets may be removed to lower the total number of tests down, or, one or 2 of the servers used may be removed instead.