Command name convention

These tools have their naming convention. The command name is consists from three parts, first part is a fixed string "aperf." The last part of the command name represents the method of getting time, which APerf library supports. So the middle part is the real command name.

The last part is one of "gtd", "tsc" or "hrt." They stand for "gettimeofday", "Time Stamp Counter" and "gethrtime" respectively. Here is a sample.

	aperf-http-gtd
	aperf-http-tsc
	aperf-http-hrt

APerf common options

APerf library supports several command options and all these tools too. struct option lopts[] = { {"srcip", 1, NULL, SrcIP}, {"dstip", 1, NULL, DstIP}, {"dstport", 1, NULL, DstPort}, //{"minport", 1, NULL, MinPort}, //{"maxport", 1, NULL, MaxPort}, {"rate", 1, NULL, Rate}, {"duration", 1, NULL, Duration}, {"concurrence", 1, NULL, Concurrence}, {"timeout", 1, NULL, Timeout}, {"finaltimeout", 1, NULL, FinalTimeout}, {"load", 1, NULL, Load}, {"interval", 1, NULL, Interval}, {"numsamples", 1, NULL, NumSamples}, {"samplingrate", 1, NULL, SamplingRate}, //{"samplessize", 1, NULL, SamplesSize}, {"plotdir", 1, NULL, PlotDir}, {"dotime", 1, NULL, DoTime}, {"dotimechildren", 1, NULL, DoTimeChildren},

Sample tools

All tools here are sample code of using APerf library. You can customize these sample to suit your needs. And I hope you to send me back the customized code in order to unite.

nameserver

HTTP

It generates simultaenous http requests this these urls below. There are four results as a sample.

As you can see,,,

$ cat urls
/
/server-status
/upload
/server-info
/doc
/webmail
/sqwebmailJ
/sqwebmailJ/image
/squirrelmail
aperf-http-gtd --concurrence=50 --dstip=172.17.50.66 --dstport=80
	--duration=5 --plotdir=/tmp/22251 --rate=200
	--samplingrate=1 --load=even --interval=eater ./urls
dst=172.17.50.66:80 src= load=EvenEater dur=5 rate=200 con=50
	plotdir=/tmp/22251 n=1000(1000/1) do_time=1
interval=250000us
outer loop 5, inner loop 3035799, nanosleep 0
Connections: 1000 start(+0), 1000 end, max concurrence 50
Time(ms): 1000 samples, min 5, max 73, med 54, stddev 12.0, avg 51.2
	75-95 percentile by 5, 58 60 61 63 65
2.29user 2.71system 0:05.00elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (23major+3minor)pagefaults 0swaps
http reply 1xx=0 2xx=112 3xx=333 4xx=555 5xx=0 ???=0
lost 0, hit return
aperf-http-gtd --concurrence=50 --dstip=172.17.50.66 --dstport=80
	--duration=5 --plotdir=/tmp/22251 --rate=200
	--samplingrate=1 --load=rush --interval=eater ./urls
dst=172.17.50.66:80 src= load=RushEater dur=5 rate=200 con=50
	plotdir=/tmp/22251 n=1000(1000/1) do_time=1
outer loop 5, inner loop 2869650, nanosleep 0
Connections: 1000 start(+0), 1000 end, max concurrence 50
Time(ms): 1000 samples, min 19, max 263, med 44, stddev 54.1, avg 62.7
	75-95 percentile by 5, 59 65 71 92 238
2.18user 2.82system 0:05.00elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (22major+3minor)pagefaults 0swaps
http reply 1xx=0 2xx=112 3xx=333 4xx=555 5xx=0 ???=0
lost 0, hit return
aperf-http-gtd --concurrence=50 --dstip=172.17.50.66 --dstport=80
	--duration=5 --plotdir=/tmp/22376 --rate=500
	--samplingrate=1 --load=even --interval=eater ./urls
dst=172.17.50.66:80 src= load=EvenEater dur=5 rate=500 con=50
	plotdir=/tmp/22376 n=2500(2500/1) do_time=1
interval=100000us
n 300
n 99
outer loop 5, inner loop 2117466, nanosleep 0
Connections: 2101 start(-399), 2101 end, max concurrence 50
Time(ms): 2101 samples, min 5, max 770, med 18, stddev 45.6, avg 31.3
	75-95 percentile by 5, 51 54 57 60 64
1.78user 3.22system 0:05.00elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (29major+3minor)pagefaults 0swaps
http reply 1xx=0 2xx=234 3xx=699 4xx=1168 5xx=0 ???=0
lost 399, hit return
aperf-http-gtd --concurrence=50 --dstip=172.17.50.66 --dstport=80
	--duration=5 --plotdir=/tmp/22376 --rate=500
	--samplingrate=1 --load=rush --interval=eater ./urls
dst=172.17.50.66:80 src= load=RushEater dur=5 rate=500 con=50
	plotdir=/tmp/22376 n=2500(2500/1) do_time=1
n 56
n 300
n 125
n 17
outer loop 5, inner loop 343881, nanosleep 0
Connections: 2002 start(-498), 2002 end, max concurrence 50
Time(ms): 2002 samples, min 6, max 932, med 25, stddev 255.3, avg 121.9
	75-95 percentile by 5, 35 41 52 680 818
0.71user 4.29system 0:05.00elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (27major+3minor)pagefaults 0swaps
http reply 1xx=0 2xx=223 3xx=666 4xx=1113 5xx=0 ???=0
lost 498, hit return

SMTP

POP3

LDAP search

syslog

rsync

radius


$Id: samples.html,v 1.4 2004/05/11 01:03:01 sfjro Exp $