Theoretical explanation
Why do we need periodic testing?
I understand two reasons
- The server's ability to solve sudden traffic and solve continuous pressure are not the same problem. Just like under emergencies (assuming concurrency is 1 million) Weibo may hang, but if the long-term concurrency is 1 million, Weibo will definitely have a corresponding strategy , And what we want to pressure is a continuous service capability of the server
- From the server resource report at the end of the phased stress test, we can have a comparison. For example, it was 10% at the beginning, and then gradually increased to 20%-30%. If it is a sudden traffic, it is difficult to distinguish it from before the stress test. 60% of the CPU is used, or is it increased to 60% after testing
practice
- Install Jmeter's phased test plug-in Concurrency Thread Group
- Plugins manager search for Concurrency Thread Group installation, restart
- Create a phased test thread (before the thread group was created, now it is changed to another one)
- Parameter configuration
- Plugins manager search for Concurrency Thread Group installation, restart
- Deploy the server monitoring software ServerAgent
This software can be downloaded from http://www.liangchan.net/liangchan/9872.html Free points download
Start startAgent.bat or startAgent.
Add the result listener component - Server monitoring configuration
- Server monitoring result graph
pay attention
After deploying startAgent in the linux environment, the local Jmeter cannot be connected and even telnet is not notified
ERROR k.a.j.p.PerfMonCollector: Perfmon plugin error: java.net.ConnectException: Connection timed out: connect
. Start with the following command
./startAgent.sh --udp-port 0 --tcp-port 4443
why? After searching for a long time, I found the following: