lost and found ( for me ? )

siege : An HTTP/HTTPS stress tester

about siege

In short , siege is an http/https stress tool.

root@ubuntu-1:~# tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 13.04"
root@ubuntu-1:~# uname -ri
3.8.0-23-generic x86_64
root@ubuntu-1:~#

build siege from source code
root@ubuntu-1:/home/hattori# tar xzvf siege-3.0.1.tar.gz
root@ubuntu-1:/home/hattori# cd siege-3.0.1/

root@ubuntu-1:/home/hattori/siege-3.0.1# ./configure
config.status: executing default-6 commands

--------------------------------------------------------
Configuration is complete

Run the following commands to complete the installation:
 make
 make install

To upgrade an old siegerc file (optional):
 mv ~/.siegerc.new ~/.siegerc

For complete documentation:        http://www.joedog.org
--------------------------------------------------------
root@ubuntu-1:/home/hattori/siege-3.0.1#

root@ubuntu-1:/home/hattori/siege-3.0.1# make;make install

# /usr/local/bin/siege --version
SIEGE 3.0.1

make a config file ( vi /root/.siegerc )
root@ubuntu-1:~# egrep -v ^# /root/.siegerc | grep -v ^$
verbose = false
quiet = false
gmethod = HEAD
show-logfile = true
logging = true
protocol = HTTP/1.1
chunked = true
cache = false
connection = close
concurrent = 15
delay = 1
internet = false
benchmark = true
accept-encoding = gzip
spinner = true
unique = true

check the config file
# siege -C
CURRENT  SIEGE  CONFIGURATION
JoeDog/1.00 [en] (X11; I; Siege 3.0.1)
Edit the resource file to change the settings.
----------------------------------------------
version:                        3.0.1
verbose:                        false
quiet:                          false
debug:                          false
protocol:                       HTTP/1.1
get method:                     HEAD
connection:                     close
concurrent users:               15
time to run:                    n/a
repetitions:                    n/a
socket timeout:                 30
delay:                          0 sec
internet simulation:            false
benchmark mode:                 true
failures until abort:           1024
named URL:                      none
URLs file:                      /usr/local/etc/urls.txt
logging:                        true
log file:                       /usr/local/var/siege.log
resource file:                  /root/.siegerc
timestamped output:             false
comma separated output:         false
allow redirects:                true
allow zero byte data:           true
allow chunked encoding:         true
upload unique files:            true
allow redirects:                true
allow zero byte data:           true
allow chunked encoding:         true
upload unique files:            true

create an URL file
root@ubuntu-1:~# egrep -v ^# /usr/local/etc/urls.txt
PORT=http
$(PORT)://192.168.10.100/

run siege. –b : benchmark mode , -t 5 : run 5 seconds
oot@ubuntu-1:~# siege -b -t5s
** SIEGE 3.0.1
** Preparing 15 concurrent users for battle.
The server is now under siege...
Lifting the server siege...      done.

Transactions:                   2460 hits
Availability:                 100.00 %
Elapsed time:                   4.49 secs
Data transferred:              24.02 MB
Response time:                  0.03 secs
Transaction rate:             547.88 trans/sec
Throughput:                     5.35 MB/sec
Concurrency:                   14.92
Successful transactions:        2460
Failed transactions:               0
Longest transaction:            1.03
Shortest transaction:           0.00

generate https

edit /usr/local/etc/urls.txt
root@ubuntu-1:~# egrep -v ^# /usr/local/etc/urls.txt
PORT=https
$(PORT)://192.168.10.100/

run
root@ubuntu-1:~# siege -b -t5s
** SIEGE 3.0.1
** Preparing 15 concurrent users for battle.
The server is now under siege...
Lifting the server siege...      done.

Transactions:                   1758 hits
Availability:                 100.00 %
Elapsed time:                   4.53 secs
Data transferred:              17.17 MB
Response time:                  0.04 secs
Transaction rate:             388.08 trans/sec
Throughput:                     3.79 MB/sec
Concurrency:                   14.81
Successful transactions:        1758
Failed transactions:               0
Longest transaction:            1.03
Shortest transaction:           0.00

-c 1000 : 1000 concurrent users
root@ubuntu-1:~# siege -c 1000 -b -t30s
** SIEGE 3.0.1
** Preparing 1000 concurrent users for battle.
The server is now under siege...
Lifting the server siege...      done.

Transactions:                  20761 hits
Availability:                 100.00 %
Elapsed time:                  29.95 secs
Data transferred:             202.74 MB
Response time:                  1.38 secs
Transaction rate:             693.19 trans/sec
Throughput:                     6.77 MB/sec
Concurrency:                  957.43
Successful transactions:       20761
Failed transactions:               0
Longest transaction:           10.32
Shortest transaction:           0.07

increase # of file descriptors
root@ubuntu-1:~# ulimit -n
1024
root@ubuntu-1:~# ulimit -n 1024000
root@ubuntu-1:~# ulimit -n
1024000

3000 concurrent users
nnn siege terminated..
root@ubuntu-1:~# siege -c 3000 -b -t60s
** SIEGE 3.0.1
** Preparing 3000 concurrent users for battle.
The server is now under siege...*** buffer overflow detected ***: siege terminated
*** buffer overflow detected ***: siege terminated

I am not able to find a solution to solve this error..

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.