Software name |
Brief introduction |
Advantages and Disadvantages |
Webbench |
Developed by Lionbridge, primarily testing requests per second and data transfers per second, while supporting static, dynamic, SSL |
Deployment is simple, static and dynamic can be tested. For small site stress tests (single example up to 30,000 concurrency) |
AB (Apache bench) |
Apache comes with a stress test tool that is designed to test how many requests are processed per second |
See more for static pressure testing, less functional, non-professional stress testing tools |
Tcpcopy |
Based on the underlying application request replication, can forward various online requests to the test server, with distributed stress testing function, the test data and actual production data is closer |
A rising star, mainly used for medium and large pressure tests, all TCP-based packets can be tested |
LoadRunner |
A leading authority in the stress testing world, can create virtual users, can simulate the user's real access process to record as a script, the test results are most realistic |
The simulation is the most realistic and can be independently unit tested, but the deployment configuration is complex and requires a professional to be able. |
(1) Installation Webbench
#wget Http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz#tar zxvf WEBBENCH-1.5.TAR.GZ#CD webbench-1.5# Make && make install
If there is a missing xx file, you can create a new
(2) Perform stress tests and launch tests on another server because of the memory consumption
When concurrency is 200
# webbench-c 200-t http://10.10.21.134/
Parameter explanation:-C is the concurrency number,-T is time (seconds)
nginx.conf within worker_connections 1024; ( The test must be less than or equal to the number of concurrent allowed)
Add from 200, use grep ' GET/'/var/log/nginx/access.log | grep ' 10/sep/2014 ' |wc-l, grep ' GET/'/var/log/apache2/access.log | The grep ' 10/sep/2014 ' |wc-l command counts the packets received by the Nginx server and two load servers respectively
After closing iptables (Centos:service iptables stop Ubtuna:UFW disable)
When concurrency is 600
650) this.width=650; "Src=" http://img.blog.csdn.net/20140911113911118?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>
650) this.width=650; "Src=" http://img.blog.csdn.net/20140911113938090?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>
650) this.width=650; "Src=" http://img.blog.csdn.net/20140911113751421?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>
View/var/log/apache2/error.log There are a lot of inaccessible problems, it is estimated that the amount of stress test is too large. Configuration to be optimized, see on-line apache2.conf optimization, apache2ctl-l see which mode is supported, my is PREFORK.C, then the apache2.conf file of two balanced server is modified:
<ifmodule mpm_prefork_module>
startservers &NBSP;5
Minspareservers 5
maxspareservers 6
Serverlimi T 550
maxclients 500
MAXREQUESTSP Erchild 10000
</ifmodule>
Modify the value of this directive must stop the service completely before starting to take effect, Restart in restart mode will not take effect. serverlimit must be placed above maxclients and value >=maxcliens
Concurrent 1000 Testing:
650) this.width=650; "Src=" http://img.blog.csdn.net/20140911185411960?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>
650) this.width=650; "Src=" http://img.blog.csdn.net/20140911185240484?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>
650) this.width=650; "Src=" http://img.blog.csdn.net/20140911185307171?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>
697+627=1324, lost 52 requests, a little better than before.
For upstream processing:
When using Ip_hash:
650) this.width=650; "Src=" http://img.blog.csdn.net/20140915154200140? watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center "style=" Border:none; "/>650" this.width=650; "src=" http://img.blog.csdn.net/ 20140915154223062?watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/ I0jbqkfcma==/dissolve/70/gravity/center "style=" Border:none; "/>650" this.width=650; "src=" http:/ img.blog.csdn.net/20140915154430395?watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/ Fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "style=" border:none; "/>
Not balanced because the IP is fixed during the test
Polling with RR: 650) this.width=650; "Src=" http://img.blog.csdn.net/20140915154806689?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Center "style=" border:none; "/>
650) this.width=650; "Src=" http://img.blog.csdn.net/20140915154350546? watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center "style=" Border:none; "/>650" this.width=650; "src=" http://img.blog.csdn.net/ 20140915154601499?watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/ I0jbqkfcma==/dissolve/70/gravity/center "style=" border:none; "/>
650) this.width=650; "Src=" http://img.blog.csdn.net/20140915154404343?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Center "style=" border:none; "/>
Initially there is a space within the upstream, resulting in a poor equalization effect, with little to 135server,138 requests:
650) this.width=650; "Src=" http://img.blog.csdn.net/20140915154809500? watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center "style=" Border:none; "/>650" this.width=650; "src=" http://img.blog.csdn.net/ 20140915155021021?watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvanvzdgjsdwvz/font/5a6l5l2t/fontsize/400/fill/ I0jbqkfcma==/dissolve/70/gravity/center "style=" border:none; "/>
Delete the empty line after the basic balance, but the blank line should not affect the configuration file Ah, on the internet did not find the results, is not in the stress test, in the case of a large amount of traffic is also equivalent to a lot of empty lines in the configuration file???
Use Webbench for stress testing