[LRUG] e-petitions site

James Harrison james at talkunafraid.co.uk
Fri Aug 5 01:46:48 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
On 05/08/2011 09:33, Paul Robinson wrote:
> On 5 Aug 2011, at 09:17, James Cumming wrote:
>
>> What's the best to test a site for high volume?
>
>
> Good list here:
>
> http://www.opensourcetesting.org/performance.php
>
> Obviously some of them aren't web-orientated, but should give you an
> idea of the mix of features and testing methods.
>
> It would be interesting to hear what caused the e-petitions site to
> go under. What cacheing was in use? Which tier gave in first? Was
> the load profile unexpected in that it was biased to some corner of
> the app that nobody thought people would be much interested in?
>
> 1000/minute is less than 17 requests/second, and to my mind doesn't
> seem too absurd: almost 60ms per request on a single thread. A
> moderate server in terms of CPU with decent RAM, local MySQL
> instance and 4-6 Passenger threads should be able to handle that no
> problem at all, I think. So it would be interesting to hear which
> part of it failed first.
Indeed- I've run hugely more complex (in terms of data needed per page
load) sites off very moderate hardware (single CPU, 8 gigs of RAM,
regular hard disks, everything running off the same box) with no issue
with that sort of loading. I'm pretty sure they were using an amount
of caching, too, since I could always get to static pages but ran into
error messages when I tried doing anything dynamic (sorting pages by
columns, etc). Not sure if that 1k/m figure is pre or post caching,
but if they're getting 1k/m to their cache server and thus less
through to the actual app stack... were they hosting this off
somebody's netbook, or is there some heavy lifting going on in there
that isn't apparent to users? :-)

As far as tools go, I'm a huge fan of Apache JMeter for performance
testing- it takes some learning, but it's a very powerful tool, and
can be distributed across multiple hosts if you need to. Other than
that, ab (as long as you understand it and use it properly) will do a
perfectly good job for basic testing and validation.
http://jakarta.apache.org/jmeter/

Honestly, though, having a good eye on how long your pages are taking
to load is what I use most of the time. Keep it low, watch out for
oddities in ActiveRecord requests, make sure your DB is designed
properly for what you're using it for (and add indexes where
appropriate- learn to love your database's EXPLAIN functionality). If
you code with performance always at the back of your mind, crippling
performance problems under heavy load are much less likely to rear
their ugly heads. Not to say you shouldn't validate and load test your
site in staging (and production before release) environments, but it's
something to be aware of.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
iEYEARECAAYFAk47rfcACgkQmJV2s0zjsDi2FgCfUzrJ1Xno51xH6xSLclqi99ey
JFAAn3luD0ojSlbGfD3TAFjvjzJTtPkA
=0//W
-----END PGP SIGNATURE-----




More information about the Chat mailing list