small logo

melfneerg.com

 - 'cos life is like that


[Blog]  [Pictures]  [Links]  [About
About the Author
Tudor Davies

author Tudor is a techie turned manager who fights like mad to keep his tech skills honed and relevant. Everything from web hosting, networking, *nix and the like. Constantly developing and co-ordinating with others to make the web a better (and easier to use) place.

So... Varnish

Monday, 14th Jan 2013  Posted @ 17:15

So a RAQ3 performs pretty poorly even with Lighttpd and PHP (FastCGI). I put one of my sites online which is pretty mySQL heavy and essentially I could bring the machine to its knees with about 3 users loading the index page :)

I use openLoad if I need to test from a Windows box, so I fired it up and aimed it at the RAQ3. The results were not pretty:

Machine booted up and caches cleared - 38mb in use, CPU usage at 3.8% - nice.

openLoad pretending to be 5 clients hitting index.php (which makes 3 mySQL lookups) for 30 seconds:

CPU hit 100% and stayed there. openLoad reported back:-
Total TPS: 1.13
Avg. Response Time: 3.139 sec.
Max Response Time: 11.935 sec
Total Requests: 34
Total Errors: 0

The answer? Varnish. Now I've used Varnish before for doing some HA/Load Balancing testing and that was fine. But I haven't played around too much with its reverse proxying capabilties. I also wasn't expecting much of an improvement, this is an AMD K6-2 300 we are talking about.

So I installed it using the instructions found here, changed the config so that it was listening on port 80, changed Lighttpd to listen on port 8080 and started/restarted services.

Machine booted up and caches cleared - 38mb in use, CPU usage at 3.8% - all the same as before.

openLoad pretending to be 5 clients hitting index.php (which makes 3 mySQL lookups) for 30 seconds:

CPU hits 100% and then hovers around 20%. openLoad reported back:-
Total TPS: 21.85
Avg. Response Time: 0.225 sec.
Max Response Time: 1.929 sec
Total Requests: 656
Total Errors: 0

Erm - thats a bit better! Quite an improvement...

[ no comments : Add ]

Tweet




layout and initial css based on the Qtractor page