PHP 5.4.23 Benchmark on Apache and Lighttpd

light_logo_170px Apache-Logo

I’m just curious which one is faster on my centos machine, Lighttpd or Apache. Maybe I already knew the result, from googling, Lighttpd is faster, but let’s see how I measured it

Server Spesification

server_118_spek

Test

We are already know, to test like this We are using apache bench, I create a simple php files and here is the test script :

Simple echo Test Apache

  1. Script

    # echo.php
    <?php
    echo "Hello, fajri";
    
  2. AB Script

    ab -n 100 -c 10 http://123.45.678.910/echo.php
    
  3. Result

    Benchmark Apache echo

Simple echo Test Lighttpd

  1. Script

    # echo.php
    <?php
    echo "Hello, fajri";
    
  2. AB Script

    ab -n 100 -c 10 http://123.45.678.910/echo.php
    
  3. Result

    Benchmark Lighttpd echo

Conclusion

Using this method, sometimes we won’t get the same result, I tried sometimes apache is faster than lighttpd in RPS result. But for create a scaling web app, this is just a starting point. Scale factor is not depend only on web server, database too, maybe you want to check my recent work in migrating sql server to redis which I get so much better result. In Next post, I will try to post silex benchmark, cheers.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s