Main  /  Edit version 3  /  Edit version 4  /   /  Users Area

Difference "Case Study: CppCMS vs PHP" ver. 3 versus ver. 4

Content:

## Benchmark
In this benchmark, compared two technologies: CppCMS and 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.
## Setup
I had compared two blog systems: this one and WordPress 2.5 with a patched WP-Cache-2 addon. I used following configuration:
1. Web Server lighttpd 1.4.13
2. Interface FastCGI
3. PHP 5.2
4. Bytecode cacher: XCache 1.2.1
5. Database MySQL 5.0
6. Caching for WP: WP-Cache-2 with an additional [performance patch](http://art-blog.no-ip.info/cppcms/blog/post/20) that caches already _deflated_ versions of page in order to reduce requirement of re-compressing on cache hit.
7. Hardware: AMD Athlon XP 64bit, 1G RAM
8. 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.
## Tests
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 where taken from the 100 "warm pages".
## Results
<table>
<tr><th>CMS</th><th>No cache fetches per second ratio</th><th>Warm up time</th></tr>
<tr><td>WordPress: </td><td>7.6</td><td>13.0 s</td></tr>
<tr><td>CppCMS: </td><td>310</td><td>0.28 s</td></tr>
</table>
<table>
<tr><th>Miss ratio (%) </th><th> WordPress </th><th > CppCMS </td></tr>
<tr><td>0</td><td>711</td><td>2300</td></tr>
<tr><td>1</td><td>370</td><td>2160</td></tr>
<tr><td>3</td><td>176</td><td>1940</td></tr>
<tr><td>5</td><td>118</td><td>1790</td></tr>
<tr><td>10</td><td>64</td><td>1450</td></tr>
<tr><td>15</td><td>41</td><td>1210</td></tr>
<tr><td>20</td><td>33</td><td>1075</td></tr>
<tr><td>30</td><td>20</td><td>795</td></tr>
<tr><td>40</td><td>13</td><td>570</td></tr>
<tr><td>50</td><td>13</td><td>570</td></tr>
</table>
-> ![Results](http://art-blog.no-ip.info/pics/WPvsCPPCMS.png) <-
## Conclusions
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.

About

CppCMS is a web development framework for performance demanding applications.

Support This Project

SourceForge.net Logo

Поддержать проект

CppCMS needs You


Navigation

Main Page


Valid CSS | Valid XHTML 1.0