lost and found ( for me ? )

httest : sample usage part 1

just referred to httest documentation

# /usr/local/bin/httest –version
httest 2.4.3

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Written by Christian Liesch

I increased # of nf_conntrack_max and disabled syn cookies on both httest and httpd box.

- load test

# cat load2.htt
PERF:RAMPUP 100 10000

CLIENT 2000
_AUTO_CLOSE on
_LOOP 100000 [ms]
#CLIENT
_REQ 192.168.0.100 80
__GET /a.html HTTP/1.1
__HOST: foo.bar
__User-Agent: foobar
__
_EXPECT . "HTTP/1.1 200 OK"
_WAIT

__GET /b.html HTTP/1.1
__HOST: foo.bar
__User-Agent: foobar
__
_EXPECT . "HTTP/1.1 200 OK"
_WAIT
_END
END

2 GET requests per one TCP connection.

# /usr/local/bin/httest -lsT load2.htt

stats on the server
about 5,000 HTTP GET / sec



- SSL trace

SSL , SSL2 , TLS
# cat ssl_trace.htt
SET YOUR_HOST=192.168.0.100
SET YOUR_PORT=443

# runs exactly one time
CLIENT

 _REQ $YOUR_HOST SSL:$YOUR_PORT
 __GET /index.html HTTP/1.1
 __Host: $YOUR_HOST
 __User-Agent: mozilla
 __
 _WAIT

 _REQ $YOUR_HOST SSL2:$YOUR_PORT
 __GET /index.html HTTP/1.1
 __Host: $YOUR_HOST
 __User-Agent: mozilla
 __
 _WAIT

 _REQ $YOUR_HOST TLS1:$YOUR_PORT
 __GET /index.html HTTP/1.1
 __Host: $YOUR_HOST
 __User-Agent: mozilla
 __
 _WAIT

END

# /usr/local/bin/httest ssl_trace.htt
run ssl_trace.htt                                                               
CLT0-0 start ...
_REQ 192.168.0.100 SSL:443
__GET /index.html HTTP/1.1
__Host: 192.168.0.100
__User-Agent: mozilla
__
_WAIT
>GET /index.html HTTP/1.1
>Host: 192.168.0.100
>User-Agent: mozilla
>
<HTTP/1.1 200 OK
<Server: Apache/2.2.15 (CentOS)
<Content-Type: text/html; charset=UTF-8
<Date: Wed, 05 Jun 2013 08:25:34 GMT
<Accept-Ranges: bytes
<ETag: "4008f-8-4d98210f9295c"
<Connection: Keep-Alive
<Last-Modified: Thu, 04 Apr 2013 05:16:00 GMT
<Content-Length: 8
<
<server2
_REQ 192.168.0.100 TLS1:443
__GET /index.html HTTP/1.1
__Host: 192.168.0.100
__User-Agent: mozilla
__
_WAIT
>GET /index.html HTTP/1.1
>Host: 192.168.0.100
>User-Agent: mozilla
>
<HTTP/1.1 200 OK
<Server: Apache/2.2.15 (CentOS)
<Content-Type: text/html; charset=UTF-8
<Date: Wed, 05 Jun 2013 08:25:34 GMT
<Accept-Ranges: bytes
<ETag: "400bd-8-4d982101de865"
<Connection: Keep-Alive
<Last-Modified: Thu, 04 Apr 2013 05:15:46 GMT
<Content-Length: 8
<
<server1
OK

- SSL load test

# cat ssl_load.htt
SET YOUR_HOST=192.168.0.100
SET YOUR_PORT=443

PERF:RAMPUP 100 10000

CLIENT 2000
_AUTO_CLOSE on
_LOOP 100000 [ms]

 _REQ $YOUR_HOST TLS1:$YOUR_PORT
 __GET /index.html HTTP/1.1
 __Host: $YOUR_HOST
 __User-Agent: mozilla
 __
 _WAIT

 _REQ $YOUR_HOST TLS1:$YOUR_PORT
 __GET /index.html HTTP/1.1
 __Host: $YOUR_HOST
 __User-Agent: mozilla
 __
 _WAIT
_END
END

# /usr/local/bin/httest -sT ssl_load.htt

4,000 HTTPS / sec





httest support multi thread
 PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
28452 root      20   0 7012m 652m 2396 S   276  5.4  20:50.44 httest

No comments:

Post a Comment

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