Centos6.5 Use siege pressure test

Source: Internet
Author: User
Tags file url mkdir


Siege is a stress testing and evaluation tool designed for web development that assesses the affordability of applications under pressure: You can configure a Web site for multi-user concurrent access, record the corresponding time for each user's request process, and repeat it under a certain number of concurrent accesses.

Siege is a multithreaded HTTP load test and Benchmarking tool that is fully implemented in C and can load and performance test HTTP and FTP servers. By using the features provided by siege, it is easy to develop a test plan that includes the requirement to use concurrent users and the number of repetitions to simulate the load on a server, network, or other object to test the compression capability of their services and to test the performance of the server conveniently. Finally, using the test results provided by siege to analyze the performance index or analyze the performance of the service under different load conditions, analyze the test results and find the bottleneck that affects the system performance.


Official website: http://www.joedog.org/


Install Siege

Installation decompression: Tar zxvf siege-3.1.3.tar.gz, into the unpacked directory: CD siege-3.1.3

To run the command:

[HTML] view plain copy print?/configure--prefix=/usr/local/siege--mandir=/usr/local/man--with-ssl=/usr/l Ocal/ssl mkdir-p/usr/local/siege/etc/mkdir-p/usr/local/siege/etc/make make install
If there is an error after installation, then follow the prompts to information processing can (there may be errors, I installed the time when the report was wrong, but there is a very clear hint).
Input: Siege–help, if the installation is not a problem, the following similar information will appear:

The above is also some of the parameters of the operation, on the right is the explanation of some parameters
Like what:
–C: View current configuration information for siege
–V: Copyright Description Information
–c: Number of concurrent start (Access) users, default is 10
-T: Stress test time, such as-T5, indicates duration is 5 minutes
-R: The number of requests issued per connection, this is similar to T, so set this value does not need to set T, and vice versa.
-F: Corresponds to a file in which each behavior in this file is linked to a URL, in a format such as:
Www.xxx.com

Www.xxx.com/login

Www.xxx.com/register
........


OK, the main parameters of the description on the introduction of so many, the rest can refer to the above tips in English.


Use siege:
1, start 500 users (threads) in 5 minutes to a page www.xxx.com concurrent access
Siege HTTP://WWW.XXX.COM-C500-T5


2. Concurrent access to multiple pages
Create a new file URL that contains the test URLs:

Www.xxx.com

Www.xxx.com/login

Www.xxx.com/register


Siege-f URLS-C500-T5
Indicates that 500 users are started to access the URL URLs above in 5 minutes.




After the concurrency test is completed, some result information is printed:




Transactions: 8,334 clicks completed
availability:98.94% success Rate
Elapsed time:299.17 secs in total
Data transferred:343.64mb total: 343.64 MB
Response time:8.48 secs spents 8.48 seconds: Displays the speed of the network connection
Transaction rate:27.86 trans/sec Average 27.86 clicks per second: Indicates the speed of server background processing
throughput:1.15 mb/sec Average data transmitted per second: 1.15 trillion
concurrency:236 Maximum concurrency number 236
Successful transactions:8334 successfully processed 8,334 times
Failed transactions:86 failed to handle 89 times

Shortest transaction:69.84 Shortest transaction

Longest transaction:69.84 the longest transaction

If in the concurrent process, the page that is visited is open error or its slow, indicate under the current concurrency condition, the website that is visited is unbearable, namely the ability of resisting concurrency is weak.

Auxiliary tools:
Incremental pressure test:

To facilitate incremental stress testing, siege also includes a number of assistive tools:
Bombardment (1)
is an accessibility tool: For incremental user stress testing:
Use sample:
Bombardment Urlfile.txt 5 3 4 1
Initialize URL list: urlfile.txt
Initialized to: 5 users
Increase at a time: 3 users
Run: 4 times
The delay between each client is: 1 seconds

Output into CSV format:
siege2csv.pl (1)
siege2csv.pl converts the output of bombardment into CSV format:
The time Data transferred Response time Transaction Rate throughput concurrency Code ("This" is horribly broken.)

In addition, it is best to view the CPU and memory usage through the top command during concurrency.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.