Secne:
The process when do performance testing by load runner in linux system for website
Process:
- 同步所有服务器的时间,包括Apache/Tomcat/Database servers
- 开启监测所有服务器 CPU/Memory/Disk/Network/Process queue
- Using Load Runner to do the test
- Get all "CPU/Memory/Disk/Network/Process queue" datas from step 2
- Move datas from servers to local
- Draw "CPU/Memory/Disk/Network/Process queue" charts by python according to the datas
- Analysis the final result
Commands:
date
(sudo) ntpdate ntp1.aliyun.com
sar -o /tmp/load20170306 3 >/dev/null 2>&1 &
export LC_TIME=*POSIX*
sar -u -f /tmp/load20170306 >/tmp/load20170306_cpu.txt
sar -r -f /tmp/load20170306 >/tmp/load20170306_memory.txt
sar -q -f /tmp/load20170306 >/tmp/load20170306_queue.txt
sar -n DEV -f /tmp/load20170306 >/tmp/load20170306_network.txt
sar -b -f /tmp/load20170306 >/tmp/load20170306_disk.txt
sz /tmp/load20170306.*.txt
kill %1
service tomcat restart
service httpd restart
Experience about load testing for Allocaiton DT GA5.5.14.0
Process
- Meeting with QA members to decide(time, resources, notice, scenarios for load testing, goal for the load testing)
- Using Load Runner Vugen to record script
- Edit script(transaction, 同步点, think time, parametrize)
- Make sure all testing users can pass the script
- Start to build scenario in the Load Runner Controller
- Set in the Controller: run time setting, step download timeout, synchronous, result dir
- Set Site Scope to choose servers and monitors
- Connect site scope with load runner controller
- If the load testing is in linux servers, need to monitor each servers' CPU, Memory, Disk, Network, IO by sar commands
- Start to run all scenarios
- Analysis the final results to know the maximum limit on concurrent users. And find out the bottle-necks.
Lessons:
-
The goal is not clear in my final report. The goals are:
- To find out the maxmium limit concurrent users in Daily Task our system supported
- To track the bottle-necks if concurrent users number is up to maxmium
-
Analysis charts are not very clear
- This could follow "Z:QAQA MaterialAllocationLoad Testing20160122"
-
Not quite understand the hardware resources like cpu, memory... And cannot response to QA if they have any questions.
- memory full does mean 性能瓶颈 necessarily
-
Resources setting in Site Scope are not quite understand.
-
提前get date, edit cells, rows, 确认没有被release等
-
If DB memored is 64G and used 95%. It's ok.
-
Why used memory didn't release after test done. (Cann't release at a short time)
Secret to success:
Just practice more~