Case Study: CppCMS vs PHP
In this benchmark two technologies were compared: CppCMS and PHP.
This blog, written using CppCMS technology was compared to WordPress blog powered by PHP5.
I had compared two blog systems: this one and WordPress 2.5 with a patched WP-Cache-2 addon. I used following configuration:
- Web Server lighttpd 1.4.13
- Interface FastCGI
- PHP 5.2
- Bytecode cacher: XCache 1.2.1
- Database MySQL 5.0
- Caching for WP: WP-Cache-2 with an additional performance patch that caches already deflated versions of page in order to reduce requirement of re-compressing on cache hit.
- Hardware: AMD Athlon XP 64bit, 1G RAM
- OS: Linux, Debian Etch 64bit.
I prepared two blogs that were filled up with 1000 articles each. Each article had 10 comments, all the articles were organized in 10 categories in each blog.
First I run load tests with disabled caching system.
Then the cache was enabled and cleaned before each test run.
Each time, the cache was "warmed up" with 100 requests of different pages.
Then CMS was loaded by http_load with 1000 requests from 5 concurrent connection. The client was patched in order to send a header:
Accept-Encoding: gzip, deflate in order to fetch compressed pages: the real live situation.
For each run, the cache included a certain percent of new pages (in order to achieve a correct hit/miss ratio) and the rest were taken from the 100 "warm pages".
|CMS||No cache fetches per second ratio||Warm up time|
|Miss ratio (%)||WordPress||CppCMS|
The caching system, significantly improves both CMS written in PHP and C++. However, when hit/miss ratio grows to few percents, the performance of the CMS written in PHP drops very fast and at 3% miss ratio the difference between CppCMS and WP becomes the difference of more then 10 times.
The CppCMS system holds lower hit/miss ratio much better then WordPress with WP-Cache-2.