Total Pageviews

Thursday, October 7, 2010

Load testing with curl-loader


 A C-written web application testing and load generating tool. The goal of the project is to provide a powerful open-source alternative to Spirent Avalanche and IXIA IxLoad. The loader uses real HTTP, FTP and TLS/SSL protocol stacks, simulating tens of thousand and hundred users/clients each with own IP-address. The tool supports user authentication, login and a range of statistics.

Download, build, and install: 

yum install gcc openssl-devel

wget -c http://downloads.sourceforge.net/project/curl-loader/curl-loader/curl-loader-0.52/curl-loader-0.52.tar.gz

tar -zxvf curl-loader-0.52.tar.gz  

make

make install

 Once you installed you find all the help and sample config files under the below usr directory . In our case we are copying the bulk.conf file to the /tmp directory and tune the  IP Range and URL to hammer.
#cp /usr/share/doc/curl-loader/conf-examples/bulk.conf  /tmp/

SAMPLE bulk.conf file
########### GENERAL SECTION ################################

BATCH_NAME= bulk 
CLIENTS_NUM_MAX=200 # Same as CLIENTS_NUM
#CLIENTS_NUM_START=10
CLIENTS_RAMPUP_INC=5
INTERFACE   =eth0
NETMASK=24 
IP_ADDR_MIN= x.y.z.100  (to change)
IP_ADDR_MAX= x.y.z.155  (to change)
IP_SHARED_NUM=3
CYCLES_NUM= -1
URLS_NUM= 1

########### URL SECTION ####################################

URL=http://x.y.z.a:8080/gapp/mirreqlisting.jsp?limit=20000
#URL=http://localhost/apache2-default/ACE-INSTALL.html
#URL=http://localhost/ACE-INSTALL.html
URL_SHORT_NAME="local-apache"
REQUEST_TYPE=GET
TIMER_URL_COMPLETION = 5000
TIMER_AFTER_URL_SLEEP = 500
 

Finally hammer you web server with the below command 

curl-loader  -f /tmp/bulk.conf  -d 

See man curl-loader for more configuration and command line options .









No comments: