Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

Let's there be light: Cherokee - Apache benchmark

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


alvaro at alobbs

Jul 6, 2009, 10:30 AM

Post #1 of 1 (257 views)
Permalink
Let's there be light: Cherokee - Apache benchmark

Hello guys,

A couple of mails hit the mailing list showing unusual benchmarks
results. I must admit that, at the beginning I didn't pay too much
attention to them.. but, since there are people discussing the topic
on IRC and doing new benchmarks I'd like to shed some light on it.

As you guys know, Cherokee and Apache architectures have nothing to do
with each other. I'm must admit I'm surprised of the great work the
Apache httpd guys have done fixing and refactoring the NCSA web server
source code (which is around 16 years old).

The newest Apache versions support different server cores (MPM):
prefork, worker, etc. Each one of these core types has different
properties: "worker" uses threads so it's fast, but it doesn't work
with some of the most spread Apache modules: mod_php, for instance.
"prefork" works with all the modules, although it's performs poorly.

So, let's do a quick benchmark. Since most of you guys use Ubuntu,
I've used it for the benchmark as well. By default, Ubuntu installs
the "MPM-Worker" core (until some of the extension modules is
installed). In that environment, the benchmark showed Cherokee being
slightly faster (~4%):

=========================
Cherokee 0.99.21b:
Threads: 20, Keepalive, Requests: 183532 (9644.9 reqs/s), Bytes:
304.47M, Errors: 0

Apache/2.2.11 (Ubuntu):
Threads: 20, Keepalive, Requests: 187521 (9291.1 reqs/s), Bytes:
314.62M, Errors: 0
=========================

It isn't much.. but it's something. However, you must be aware for a
couple of differences:

1.- Cherokee used 4.5Mb of RAM while Apache used ~52Mb: That's only a
8.4% of the memory!!
2.- The Apache version was incompatible with many for its own modules
(because of threading issues).

So, let's perform what is the default Apache installation in most of
the cases. At least we need to install the PHP module:

# apt-get install apache2 libapache2-mod-php5

In this case, the server will use MPM-prefork. The new benchmark
showed a hard to ignore performance decrease. Now Cherokee is 37%
faster.

=========================
Threads: 20, Keepalive, Requests: 143808 (7100.7 reqs/s), Bytes:
208.06M, Errors: 0
=========================

However, in this case, there's something really important to bare in
mind: The server will use a whole lot of system resources. It has to
fork() many times and that's slow.. and besides that, it will use a
considerable amount of memory on each one of its child processes. It
used +100Mb of RAM on this tiny benchmark, while Cherokee used 4.5Mb.
Besides, the general system load raises because of the higher process
number (and therefore, process switches).

(By the way, I did also run the test against lighttpd just to give you
another additional reference. Cherokee was faster as well. So it isn't
that Cherokee's got slower..)

The bottom line is: Apache is doing better regarding to performance on
light benchmarks of static content. However, Cherokee is still faster
and consumes way less resources, which makes it scale much better on
high traffic situations (and VPS without tens of Gb of memory).

Even if this short mail doesn't get into much detail, I hope that at
least it helps to clarity things a little bit. :-)

Cheers!


PS: Since this topic has attracted lot of interest, I'll try to
allocate some time to do proper benchmarks (including static and
dynamic content, VPS, high load/concurrency, etc).

--
Greetings, alo
http://www.alobbs.com/
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.