$ more test.sh
for i in `perl -e 'for (1..200) {print "$_\n"}'`
do
echo
echo TEST: $i
wget -O o.txt "http://URL" &
sleep 1
done
Sends 200 requests at the server with a 1 second delay between each.. I
don't care about output.
Then on the server I do
while(true)
do
mysqladmin -u root -p <password> ext
uptime
ps -ef |grep -c apache
sleep 10
done
which gives quite an accurate view of the system load.. this of course
is dependant on using Apache and MySQL.
The ps -ef bit should be optional as that's quite stressful on an
already stressed server.
There's also Apache Bench, found in either /usr/sbin/ab or
/usr/local/apache/bin/ab
There's also a service run by http://www.envive.com/ which is very
impressive but I presume costs quite a bit. They can emulate any number
of users coming from the USA (and soon the UK) over different bandwidth
links requesting different pages/series of pages. While the test goes on
you can monitor it from the user side through a Java applet and nice
graphs. The amount of information available is quite amazing, and I need
to set aside some time to go over our own results..
There was also quite a bit of discussion about this on the
performance-linux mailing list but that seems to have died down again.
Donncha.
>> Aha, testing. Anyone want to recommend some good (preferably with source
> available) tools for stress testing webservers with xy + z technology
> behind them (ie ejb's layer, database layer etc). Fault injections to
> see how the backend code works would be nice as well.
>
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!