Create Test Plan in JMeter
JMeter Documentation is available here
Setup of EC2 Clients
- Create a key-pair and copy it to your Linux Machine.
- Rename it as rsa-gsg-keypair(optional).
- Change Permissions using
chmod 600 rsa-gsg-keypair
- Launch an EC2 instance from Amazon Console
- User guide for EC2 clients is available here
- Get the Public DNS Name of the instance.
- Now Log-in to the Instance using
ssh -i id_rsa-gsg-keypair root@xxx.amazonaws.com
- If required change Client's Time Zone to GMT using
unlink /etc/localtime
ln -sf /usr/share/zoneinfo/GMT /etc/localtime
- Download JMeter using
wget http://mirrors.axint.net/apache/jakarta/jmeter/binaries/jakarta-jmeter-2.4.tgz
- Install JMeter
tar –xzf jakarta-jmeter-2.4.tgz
- Set path to JMeter
export PATH=$PATH:/path_to_jmeter_bin_directory
- Download and install Java Runtime Environment (JRE)
- Get Load test Plan (jmx file of JMeter onto this client)
- Increase Open files limit using
ulimit –n 8192
- Run Load test using
jmeter.sh -n -t M2LoadTests.jmx -l sample.jtl -j sample.log
- Copying JMeter results (jtl files) on half hourly intervals make crontab entry as
*/30 * * * * /bin/cp /root/sample.jtl /root/Client-1-`/bin/date +"%Y-%m-%d-%H-%M"`.jtl
JMeter as a Service
Information on JMeter as a Service is available here
Home Work (Benchmarking)
- Host a simple "Hello world" HTML Page on the server on which you are going to perform Load tests
- Try to perform load tests by hitting "Hello World" Page using 2 clients. (500 Threads from each client)
- Increase number of threads by increasing no. of clients.
- Keep on plotting results in a graph.
- If it is a straight line then some thing is wrong with your setup like webserver setup (look at webserver conf file)
- If it is some kind of Curve shooting up then wait for a U-Turn in the curve.
- Get Numbers related to Latencies at this U-Turn and consider them as lowest Latencies with given setup.
- Get Numbers related to Throughput at this U-Turn and consider them as highest Throughput one can achieve with given setup.
- Also get average network latency for 100 pings using traceroute. This will be the minimum Network Latency.
Key parameters to be captured
- Processor Utilization
dstat with -cp switch
- Memory utilization
dstat with -m switch
- Disk utilization
dstat with -d switch
- Network utilization
dstat with -n switch
Points to Remember
- Servers should not be put behind Load Balancer
- Install dstat if required using
emerge -av dstat if it is Gentoo
yum if is RHEL
- Monitor Server side System Resources using
dstat -cndymlp -N total -D total -l --output SystemMon.csv
No comments:
Post a Comment