30.06.2016 Views

Magento Site Performance Optimization

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2<br />

Choosing the best server for your<br />

e-commerce website<br />

As in the previous chapter, we will use the Apache benchmark tool to benchmark<br />

the different web servers. Here is the command that sends 100 requests with a<br />

concurrency level of 5:<br />

ab -n 100 -c 5 http://localhost/magento/index.php/furniture/livingroom.html<br />

Once again, we target the living-room page which displays the furniture/livingroom<br />

category. This page stresses our web servers and database. We will test all the<br />

web servers with the exact same hardware as follows:<br />

Ubuntu 12.04 64bits<br />

2 Proc @ 1.80 GHz<br />

2 GB Ram<br />

10 Gig SSD disks<br />

In the next sections, we will pass through the installation, evaluation, and<br />

optimization of the Apache HTTP server, lighttpd, and Nginx.<br />

Installing the Apache HTTP server 2.2.22<br />

This is the very first hands-on section of this book. Let's install the latest release of<br />

the Apache HTTP server, which is the 2.2.22. You can get it run by simply invoking<br />

the following command:<br />

sudo apt-get install apache2<br />

We will not dig deep into the details of the classical installation. This book tackles the<br />

optimization of such servers with the assumption that they are already running.<br />

To execute the command, you need to own root access<br />

to your server.<br />

Before optimization<br />

The following is the result of our test against an out-of-the-box Apache2 server:<br />

Document Path:<br />

Document Length:<br />

/magento/index.php/furniture/living-room.html<br />

36634 bytes<br />

[ 19 ]<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!