Want more timely Centmin Mod News Updates?
Become a Member

Beta Branch update to siege benchmark 4.0.0 default

Discussion in 'Centmin Mod Github Commits' started by eva2000, May 9, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:01 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  2. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:01 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    if you want to manually update Centmin Mod's siege version can just run these commands
    Code (Text):
    cd /svr-setup/
    wget http://download.joedog.org/siege/siege-4.0.0.tar.gz
    tar xvzf siege-4.0.0.tar.gz
    cd siege-4.0.0/
    ./configure --with-ssl=/usr
    make
    make install
    siege -q -b -c1 -r1 localhost >/dev/null 2>&1
    sed -i 's/# failures =/failures = 2048/g' /root/.siege/siege.conf
    sed -i 's|limit = 255|limit = 4095|' /root/.siege/siege.conf
    \cp -af /root/.siege/siege.conf /root/.siege/siege-csv.conf
    sed -i 's|# csv = true|csv = true|' /root/.siege/siege-csv.conf
    sed -i 's|# logfile = |logfile = /usr/local/var/log/siege-csv.log|' /root/.siege/siege-csv.conf
    


    Code (Text):
    siege -v
    SIEGE 4.0.0
    Usage: siege [options]
           siege [options] URL
           siege -g URL
    Options:
      -V, --version             VERSION, prints the version number.
      -h, --help                HELP, prints this section.
      -C, --config              CONFIGURATION, show the current config.
      -v, --verbose             VERBOSE, prints notification to screen.
      -q, --quiet               QUIET turns verbose off and suppresses output.
      -g, --get                 GET, pull down HTTP headers and display the
                                transaction. Great for application debugging.
      -c, --concurrent=NUM      CONCURRENT users, default is 10
      -r, --reps=NUM            REPS, number of times to run the test.
      -t, --time=NUMm           TIMED testing where "m" is modifier S, M, or H
                                ex: --time=1H, one hour test.
      -d, --delay=NUM           Time DELAY, random delay before each requst
      -b, --benchmark           BENCHMARK: no delays between requests.
      -i, --internet            INTERNET user simulation, hits URLs randomly.
      -f, --file=FILE           FILE, select a specific URLS FILE.
      -R, --rc=FILE             RC, specify an siegerc file
      -l, --log[=FILE]          LOG to FILE. If FILE is not specified, the
                                default is used: PREFIX/var/siege.log
      -m, --mark="text"         MARK, mark the log file with a string.
                                between .001 and NUM. (NOT COUNTED IN STATS)
      -H, --header="text"       Add a header to request (can be many)
      -A, --user-agent="text"   Sets User-Agent in request
      -T, --content-type="text" Sets Content-Type in request


    Code (Text):
    siege -b -t10s localhost
    
    Lifting the server siege...
    Transactions:                  43410 hits
    Availability:                 100.00 %
    Elapsed time:                   9.80 secs
    Data transferred:              65.41 MB
    Response time:                  0.00 secs
    Transaction rate:            4429.59 trans/sec
    Throughput:                     6.67 MB/sec
    Concurrency:                   14.33
    Successful transactions:       43410
    Failed transactions:               0
    Longest transaction:            0.02
    Shortest transaction:           0.00
    
    LOG FILE: /usr/local/var/log/siege.log
    You can disable this log file notification by editing
    /root/.siege/siege.conf and changing 'show-logfile' to false.
    
     
    Last edited: May 9, 2016
  3. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:01 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    added 2nd config file option at /root/.siege/siege-csv.conf to enable csv mode
    Code (Text):
    siege -C -R /root/.siege/siege-csv.conf
    CURRENT  SIEGE  CONFIGURATION
    Mozilla/5.0 (unknown-x86_64-linux-gnu) Siege/4.0.0
    Edit the resource file to change the settings.
    ----------------------------------------------
    version:                        4.0.0
    verbose:                        true
    color:                          true
    quiet:                          false
    debug:                          false
    protocol:                       HTTP/1.1
    HTML parser:                    disabled
    get method:                     HEAD
    connection:                     close
    concurrent users:               15
    time to run:                    n/a
    repetitions:                    n/a
    socket timeout:                 30
    accept-encoding:                gzip
    delay:                          1.000 sec
    internet simulation:            false
    benchmark mode:                 false
    failures until abort:           2048
    named URL:                      none
    URLs file:                      /usr/local/etc/urls.txt
    thread limit:                   4095
    logging:                        true
    log file:                       /usr/local/var/log/siege-csv.log
    resource file:                  /root/.siege/siege-csv.conf
    timestamped output:             false
    comma separated output:         true
    allow redirects:                true
    allow zero byte data:           true
    allow chunked encoding:         true
    upload unique files:            true
    
    

    Code (Text):
    siege -b -t1s -R /root/.siege/siege-csv.conf localhost > log.csv
    

    sample of log.csv
    Code (Text):
    HTTP/1.1,200,  0.00,   1580,/,0,2016-05-08 21:22:27
    HTTP/1.1,200,  0.00,   1580,/,0,2016-05-08 21:22:27
    HTTP/1.1,200,  0.01,   1580,/,0,2016-05-08 21:22:27
    HTTP/1.1,200,  0.00,   1580,/,0,2016-05-08 21:22:27
    HTTP/1.1,200,  0.01,   1580,/,0,2016-05-08 21:22:27
    HTTP/1.1,200,  0.01,   1580,/,0,2016-05-08 21:22:28
    LOG FILE: /usr/local/var/log/siege-csv.log
    You can disable this log file notification by editing
    /root/.siege/siege.conf and changing 'show-logfile' to false.
    

    contents of /usr/local/var/log/siege-csv.log
    Code (Text):
    cat /usr/local/var/log/siege-csv.log
          Date & Time,  Trans,  Elap Time,  Data Trans,  Resp Time,  Trans Rate,  Throughput,  Concurrent,    OKAY,   Failed
    2016-05-08 21:21:03,    776,       0.22,           1,       0.00,     3527.27,        4.55,       13.14,     777,       0
    2016-05-08 21:21:46,   1746,       0.40,           2,       0.00,     4365.00,        5.00,       14.55,    1747,       0
    2016-05-08 21:21:54,    424,       0.10,           0,       0.00,     4240.00,        0.00,       12.40,     424,       0
    2016-05-08 21:22:17,   3514,       0.79,           5,       0.00,     4448.10,        6.33,       14.38,    3516,       0
    2016-05-08 21:22:28,   3043,       0.67,           4,       0.00,     4541.79,        5.97,       13.97,    3043,       0
    
     
    Last edited: May 9, 2016
  4. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:01 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    sample of testing siege client concurrency levels 10 to 50 in increments of 10 with 10 requests each
    Code (Text):
    for c in {10..50..10}; do echo "siege -q -b -c "${c}" -r 10 -R /root/.siege/siege-csv.conf -m "$c-clients" localhost > "log.${c}.csv""; siege -q -b -c "${c}" -r 10 -R /root/.siege/siege-csv.conf -m "$c-clients" localhost > "log.${c}.csv"; done

    outputs
    Code (Text):
    siege -q -b -c 10 -r 10 -R /root/.siege/siege-csv.conf -m 10-clients localhost > log.10.csv
    siege -q -b -c 20 -r 10 -R /root/.siege/siege-csv.conf -m 20-clients localhost > log.20.csv
    siege -q -b -c 30 -r 10 -R /root/.siege/siege-csv.conf -m 30-clients localhost > log.30.csv
    siege -q -b -c 40 -r 10 -R /root/.siege/siege-csv.conf -m 40-clients localhost > log.40.csv
    siege -q -b -c 50 -r 10 -R /root/.siege/siege-csv.conf -m 50-clients localhost > log.50.csv

    /usr/local/var/log/siege-csv.log logged results
    Code (Text):
          Date & Time,  Trans,  Elap Time,  Data Trans,  Resp Time,  Trans Rate,  Throughput,  Concurrent,    OKAY,   Failed
    **** 10-clients ****
    2016-05-08 21:31:59,    100,       0.02,           0,       0.00,     5000.00,        0.00,        9.00,     100,       0
    **** 20-clients ****
    2016-05-08 21:31:59,    200,       0.05,           0,       0.00,     4000.00,        0.00,       15.00,     200,       0
    **** 30-clients ****
    2016-05-08 21:32:00,    300,       0.08,           0,       0.01,     3750.00,        0.00,       25.25,     300,       0
    **** 40-clients ****
    2016-05-08 21:32:00,    400,       0.11,           0,       0.01,     3636.36,        0.00,       32.82,     400,       0
    **** 50-clients ****
    2016-05-08 21:32:00,    500,       0.10,           0,       0.01,     5000.00,        0.00,       44.80,     500,       0
     
  5. pamamolf

    pamamolf Premium Member Premium Member

    4,086
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    3:01 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Confused :(

    So can i run now a benchmark command and do a direct output to .csv so i can import it to excel or Google datasheet or i must output first to .log and convert it to .csv then?
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:01 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you need to specify the custom setup siege config file which enables csv by default with your siege commands
    Code (Text):
    -R /root/.siege/siege-csv.conf
    

    then directory siege command to log file like log.csv
    Code (Text):
    siege -b -c 10 -r 10 -R /root/.siege/siege-csv.conf -m 10-clients localhost > log.10.csv
    

    and can use the results in /usr/local/var/log/siege-csv.log which is now in csv comma separated format which you can use in excel/charts
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:01 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  8. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    2:01 PM
    Nginx 1.17.9
    MariaDB 10.3.22
    How to update to 4.0.2?
    I have installed:
    Code:
    # siege -V
    SIEGE 3.1.0
    
    Copyright (C) 2015 by Jeffrey Fulmer, et al.
    This is free software; see the source for copying conditions.
    There is NO warranty; not even for MERCHANTABILITY or FITNESS
    FOR A PARTICULAR PURPOSE.
    Never use it before, so how to update to newest version?
     
  9. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:01 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    centmin.sh menu option 21 is one way but that also recompiles nginx and php-fpm

    or just do it manually
    Code (Text):
    SIEGE_VERSION=4.0.2
    SIEGE_LINKFILE="siege-${SIEGE_VERSION}.tar.gz"
    SIEGE_LINK="http://download.joedog.org/siege/${SIEGE_LINKFILE}"
    cd /svr-setup
    wget -cnv $SIEGE_LINK
    tar xvzf $SIEGE_LINKFILE
    cd siege-${SIEGE_VERSION}
    ./configure --with-ssl=/usr
    make -j2
    make install
     
  10. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    2:01 PM
    Nginx 1.17.9
    MariaDB 10.3.22
    Where to put that?
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:01 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    type in ssh
     
  12. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    2:01 PM
    Nginx 1.17.9
    MariaDB 10.3.22
    Many thanks @eva2000
    Code:
    [root@tvor-ocean /]# siege -V
    SIEGE 4.0.2
    
    Copyright (C) 2016 by Jeffrey Fulmer, et al.
    This is free software; see the source for copying conditions.
    There is NO warranty; not even for MERCHANTABILITY or FITNESS
    FOR A PARTICULAR PURPOSE.
    Now it is time to learn how to use it.
    P.S. Is it safe to use it on live forum?
     
  13. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:01 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+