You know from the last post I got a VPS yesterday with 256MB ram.

Yesterday, I configured it with full LEMP (Linux + Nginx / EngineX + MySQL + PHP) stack and install drupal. Blogged some performance test here.

Today I thought do to some more experiments with the box. Actually wasn't happy with the total delivery speed of the webserver.

So thought to do something to speed it up. Along with the decision I went for hunting with the official PHP accelerator APC and varnish. Configured APC without any trouble but stuck with varnish. After doing some Google I cae to know that, varnish caches everything it gets even the error pages. I removed varnish after getting this information as it didn't sound good to me!

Anyway, only with APC I found a huge performance difference. Speed increased more than 5x. Here is the testing result before and after APC.

Before APC

ab -n 1000 -c 10 http://drup.ibabar.com/?q=node/1 This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking drup.ibabar.com (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Completed 600 requests Completed 700 requests Completed 800 requests Completed 900 requests Completed 1000 requests Finished 1000 requests

Server Software: nginx/1.2.4 Server Hostname: drup.ibabar.com Server Port: 80

Document Path: /?q=node/1 Document Length: 8197 bytes

Concurrency Level: 10 Time taken for tests: 118.693 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 8678000 bytes HTML transferred: 8197000 bytes Requests per second: 8.43 #/sec Time per request: 1186.933 ms Time per request: 118.693 ms Transfer rate: 71.40 [Kbytes/sec] received

Connection Times (ms) min mean[+/-sd] median max Connect: 36 37 0.9 37 40 Processing: 220 1146 165.4 1115 1710 Waiting: 183 1097 164.9 1070 1673 Total: 257 1183 165.4 1153 1747

Percentage of the requests served within a certain time (ms) 50% 1153 66% 1249 75% 1300 80% 1340 90% 1401 95% 1455 98% 1534 99% 1593 100% 1747 (longest request)

And after APC

ab -n 1000 -c 10 http://drup.ibabar.com/?q=node/1 This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking drup.ibabar.com (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Completed 600 requests Completed 700 requests Completed 800 requests Completed 900 requests Completed 1000 requests Finished 1000 requests

Server Software: nginx/1.2.4 Server Hostname: drup.ibabar.com Server Port: 80

Document Path: /?q=node/1 Document Length: 8197 bytes

Concurrency Level: 10 Time taken for tests: 21.896 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 8678000 bytes HTML transferred: 8197000 bytes Requests per second: 45.67 #/sec Time per request: 218.957 ms Time per request: 21.896 ms Transfer rate: 387.04 [Kbytes/sec] received

Connection Times (ms) min mean[+/-sd] median max Connect: 9 10 1.2 10 22 Processing: 72 208 42.8 195 312 Waiting: 63 192 42.8 184 299 Total: 83 218 42.7 205 322

Percentage of the requests served within a certain time (ms) 50% 205 66% 210 75% 221 80% 276 90% 288 95% 291 98% 294 99% 296 100% 322 (longest request)

You see, before APC it was handling only 8 requests per second and now the counting is 48. More than 5x. Request time also reduced, longest request was 322ms after APC, not bad huh! And you know everything is only on the 256mb box which I got only for 12 bucks for a year!

Now the final decision is may the be box be big or small, APC is a must.

Oh one more information, I am exploring a new control panel called Ajenti on the box and you know I am liking it. I will share my experience with Ajenti on next posts.

Till now tell me what do you think about PHP Accelerators for speeding up web servers? What's your preferable PHP Accelerators.




What's on your mind?


5 Comments

97dd847dca4ec4d5a32bb61081faeddd?s=100

If you wish for to get a great deal from this paragraph then you have to apply such methods to your won web site.

0f9577b8ec76f45b51ecee202fbc29fb?s=100
csgo skins steam wallet commented 4 days ago

I got this web site from my pal who told me about this web site and at the moment this time I am browsing this website and reading very informative posts here.

1c862991f9641939697a1bde9f17b0d6?s=100

Very shortly this site will be famous among all blogging people, due to it's nice content

B88d9c87ce910f1b47ed00be1ece6342?s=100
mink eyelash extensions kitchener commented about 18 hours ago

Excellent weblog here! Also your website a lot up fast! What host are you the use of? Can I am getting your associate hyperlink on your host? I wish my site loaded up as fast as yours lol

65ed27e724824b26a47082abf74a2461?s=100

What i do not understood is in reality how you are no longer really much more well-favored than you may be now. You are very intelligent. You already know therefore significantly in relation to this topic, produced me in my view believe it from a lot of varied angles. Its like men and women don't seem to be fascinated unless it's something to do with Lady gaga! Your own stuffs nice. All the time take care of it up!