Rate This Document
Findability
Accuracy
Completeness
Readability

Performing a Test Using Siege

  1. Write the URL to the configuration file to perform a random test.
    1. Create a data path on the Nginx node (192.168.100.216) where the origin server is deployed.
      cd  /usr/local/nginx/html/
      mkdir data
    2. Place the HTML file to be tested in the /data directory. (Replace the directory with the actual one.)
      cp index.html data
      cd data
      cp index.html 4k.html
      cp index.html 512k.html
      cp index.html 1024k.html
    3. Configure the press file.
      1. Go to the /home/ directory and open the file.txt file.
        cd /home/
        vim file.txt
      2. Press i to enter the insert mode and add the following content to the file (replace the IP address with the actual one):
        http://192.168.100.225:10001/data/index.html
        http://192.168.100.225:10001/data/4k.html
        http://192.168.100.225:10001/data/512k.html
        http://192.168.100.225:10001/data/1024k.html

        You can write multiple numbers of http://IP address of the cache node:10001/data/HTML file.

      3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Perform a random test on the press.
      1
      siege -t 30s -c 5 -f /home/file.txt -i -b
      

      Request file path must be the same as the data path configured on the Nginx origin server.

  2. Perform the test by sending a URL request.
    1
    siege -t 30s -c 5 http://192.168.100.225:10001/ -i -b
    

    Table 1 describes the common options of the siege command.

    Table 2 describes the test results.
    Table 1 Description of common siege options

    Parameter

    Description

    -t

    Test time.

    -c

    Number of users.

    -i

    Random request.

    -b

    Benchmark mode

    -f

    URL file

    -R

    Configuration file.

    Table 2 Description of the siege test results

    Result

    Description

    Transactions

    Total number of transaction processing times

    Availability

    Transaction processing success rate

    Elapsed time

    Test duration

    Data transferred

    Amount of transmitted data during the test

    Response time

    Average response time from sending to receiving

    Transaction rate

    Transactions per second (TPS)

    Throughput

    Data throughput

    Concurrency

    Number of concurrent users

    Successful transactions

    Number of successful transactions

    Failed transactions

    Number of failed transactions

    Longest transaction

    Maximum response time

    Shortest transaction

    Minimum response time