Hi,
Per Craig's request, here are the script files I used to develop the
Apache-based presentation mentioned in an earlier post.
Assuming I understand the ab source code, the scripts represent a setting
involving single-request clients (who make a request and wait for a reply
before making another) generating a homogeneous workload (ie, HelloWorld)
on the server: I'm working on the single-client heterogeneous case now.
If you have heartburn about these scripts or want to propose something
better, please do.
Attached are two simplistic ascii bash shell scripts that work with
Apache on Redhat6.1. Since I haven't finished installing TC4.0, so I
don't know first-hand what's required to use ab with servlets: I'm told
that having an http-address of the following form is sufficient: "
https://localhost:8080/servlet/HTTPGetServlet"
Also attached is a sample summary file. I'm writing a shell/awk script to
process the summary files that are posted.
1) tcdriver
which which invokes tcscript with two parameters: the number of
concurrent connections (1, 20, 40, 60, 80, and 100) and one (!) servlet
of your choice (make it HelloWorld the first time you use the script -
and then send the summary before using it again with your second most
favorite servlet).
2) tcscript
which invokes ab using the two parameters from tcdriver, dumps filtered
data to a summary file, and cleans up the intermediate files. You will
need to modify the line that invokes ab to give your localhost pathname.
By running ab in localhost mode, network variability is eliminated (even
though TCPIP loopback processing isn't).
The data collected includes:
(from ab) info on per request connection times, total test, time and
throughput;
(from sar) cpu utilization (%) and disk activity;
(from sa) cpu minutes per process.
I ran each iteration of the script after a cold boot, but I think running
the whole thing immediately after a cold boot is sufficient.
Assuming Linux/Unix people decide to use these scripts, please attach the
summary file in ascii format to a post that describes your system
configuration (CPU, disk, memory, OS, etc.) I will process that files
post the results every TBD days.
Sorry about the length. If I knew how to make it shorter, I would. :-)
Roy
--
Roy Wilson
E-mail: [EMAIL PROTECTED]
>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 11/2/00, 1:32:20 PM, "Craig R. McClanahan"
<[EMAIL PROTECTED]> wrote regarding Re: Tomcat 4.0 Milestone 4
performance measurement:
> Roy, would it be possible for you to write us a simple "cookbook" to
follow
> in executing tests, so that we can each follow the same script and then
> report the results consistently?
> Craig McClanahan
> Roy Wilson wrote:
> > Hi,
> >
> > (1) System throughput and response time data collection
> >
> > I plan to do measurements myself using Henri Gomez' rpmized version of
> > TC-4.0-m4, but since machines and environments differ, it might be
> > interesting to know what kind of total time, throughput, avg and max
> > connection and processing time per request people see using the
> > HelloWorld servlet driving their system with ab in localhost mode
> > (immediately after a cold boot). These are the kinds of data presented by
> > Costin at ApacheCon Europe. I'd like to compile such numbers if people
> > are willing to post them along with info on CPU (e.g. Celeron 400Mhz),
> > memory (eg. 256M SDRAM100), disk (eg. WD Caviar 10.2MB, 5400 rpms), OS
> > (Redhat6.1), JVM (Classic), etc.
> >
> > (2) System resource usage data collection
> >
> > CPU and disk demand per request on each system might be interesting. I
> > have done some very simple resource measurement and performance modeling
> > of Apache that is described in a Office2000 PowerPoint (but created in
> > StarImpress) presentation at
> >
> > http://members.bellatlantic.net/~designrw/BENCH1.zip
> >
> > My current plan is to apply the same approach to TC-4.0 and then to
> > extend it by considering a mix of servlets, not just the HelloWorld
> > servlet (again in keeping with Costin's pitch at ApacheCon).
> >
> > Roy Wilson
> > --
> > Roy Wilson
> > E-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
# Draft script by Roy Wilson used on Redhat6.1 system (bash)
# Assume ONLY HelloWorld servlet being used: better to have a set, but what?
#
# To promote comparability, run script immediately after a cold boot
echo Use only after a cold boot: This helps make results comparable
echo When done please and post the summary file
echo to the Tomcat development list
echo Usage: sh tcscript servlet-name
rm -f summary
# see resource demand with concurrency with C = 1
sh tcscript 1 $1
# Then ramp up load to 20, 40, 60, 80, 100 continuously active users
load=20
while [ "$load" -le 100 ]
do
sh tcscript $load $1
load=$(($load+20))
done
# Roy Wilson 11/2/00
echo "Starting ab load test with C = " $1 "and servlet = "$2
rm -f $1$2.sardata
# Next 2 lines may need adjustment on account of OS differences
# Start with a fresh temporary system accounting log file
cp /var/log/savacct /var/log/tcacct
/usr/sbin/accton /var/log/tcacct
# sample CPU and disk usage with 1 second resolution
(sar -u -b -o $1$2.sardata 1 > /dev/null )&
sarpid=$!
# modify path in next line for use of servlet
/usr/sbin/ab -n 100000 -c $1 http://ALFRED/$2 >> summary
kill -s TERM ${sarpid}
# Next line may need modification: Turns off system accounting
/usr/sbin/accton
# peel off raw data, keep sar summary line
sar -f $1$2.sardata 1 | grep Average >> summary
# collect CPU per minute data from system accounting package
/usr/sbin/sa -a /var/log/tcacct >> summary
rm -f $1$2.sardata
echo "Finished ab load test with C = "$1 "and servlet = "$2
This is ApacheBench, Version 1.3a
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
Benchmarking ALFRED (be patient)...
Server Software: Apache/1.3.9
Server Hostname: ALFRED
Server Port: 80
Document Path: /1.html
Document Length: 4815 bytes
Concurrency Level: 1
Time taken for tests: 257.178 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 508000000 bytes
HTML transferred: 481500000 bytes
Requests per second: 388.84
Transfer rate: 1975.29 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 0 3000
Processing: 1 1 1
Total: 1 1 3001
Average: 15.61% 0.00% 36.93% 47.45% 2.61 0.17 2.43
1.43 19.48
1022 121.79re 4.36cp 0avio 688k
1019 113.22re 3.21cp 0avio 689k httpd*
1 4.29re 1.15cp 0avio 714k ab
1 4.29re 0.00cp 0avio 281k sar
1 0.00re 0.00cp 0avio 266k accton
This is ApacheBench, Version 1.3a
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
Benchmarking ALFRED (be patient)...
Server Software: Apache/1.3.9
Server Hostname: ALFRED
Server Port: 80
Document Path: /1.html
Document Length: 4815 bytes
Concurrency Level: 20
Time taken for tests: 165.362 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 508000000 bytes
HTML transferred: 481500000 bytes
Requests per second: 604.73
Transfer rate: 3072.05 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 9 3023
Processing: 2 23 851
Total: 2 32 3874
Average: 27.30% 0.00% 57.88% 14.82% 2.20 0.01 2.18
0.14 17.45
1012 49.80re 4.51cp 0avio 687k
1006 44.28re 3.47cp 0avio 689k httpd*
1 2.76re 1.03cp 0avio 717k ab
1 2.76re 0.01cp 0avio 281k sar
1 0.00re 0.00cp 0avio 267k rmmod
1 0.00re 0.00cp 0avio 568k sendmail*
1 0.00re 0.00cp 0avio 325k crond*
1 0.00re 0.00cp 0avio 266k accton
This is ApacheBench, Version 1.3a
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
Benchmarking ALFRED (be patient)...
Server Software: Apache/1.3.9
Server Hostname: ALFRED
Server Port: 80
Document Path: /1.html
Document Length: 4815 bytes
Concurrency Level: 40
Time taken for tests: 148.645 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 508066040 bytes
HTML transferred: 481562595 bytes
Requests per second: 672.74
Transfer rate: 3417.98 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 17 3040
Processing: 8 41 470
Total: 8 58 3510
Average: 30.65% 0.00% 65.33% 4.00% 2.31 0.00 2.31
0.00 18.54
992 82.38re 4.64cp 0avio 688k
989 77.42re 3.59cp 0avio 689k httpd*
1 2.48re 1.05cp 0avio 720k ab
1 2.48re 0.00cp 0avio 281k sar
1 0.00re 0.00cp 0avio 266k accton
This is ApacheBench, Version 1.3a
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
Benchmarking ALFRED (be patient)...
Server Software: Apache/1.3.9
Server Hostname: ALFRED
Server Port: 80
Document Path: /1.html
Document Length: 4815 bytes
Concurrency Level: 60
Time taken for tests: 144.356 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 508106680 bytes
HTML transferred: 481601115 bytes
Requests per second: 692.73
Transfer rate: 3519.82 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 25 3093
Processing: 30 60 282
Total: 30 85 3375
Average: 31.72% 0.00% 66.40% 1.86% 2.71 0.00 2.71
0.00 21.72
995 109.46re 4.60cp 0avio 688k
992 104.65re 3.53cp 0avio 689k httpd*
1 2.41re 1.06cp 0avio 723k ab
1 2.41re 0.01cp 0avio 281k sar
1 0.00re 0.00cp 0avio 266k accton
This is ApacheBench, Version 1.3a
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
Benchmarking ALFRED (be patient)...
Server Software: Apache/1.3.9
Server Hostname: ALFRED
Server Port: 80
Document Path: /1.html
Document Length: 4815 bytes
Concurrency Level: 80
Time taken for tests: 138.916 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 508106680 bytes
HTML transferred: 481601115 bytes
Requests per second: 719.86
Transfer rate: 3657.65 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 34 3097
Processing: 49 75 87
Total: 49 109 3184
Average: 32.05% 0.00% 67.22% 0.73% 2.26 0.00 2.26
0.00 18.08
1005 144.23re 4.44cp 0avio 688k
1002 139.60re 3.46cp 0avio 689k httpd*
1 2.32re 0.97cp 0avio 726k ab
1 2.32re 0.01cp 0avio 281k sar
1 0.00re 0.00cp 0avio 266k accton
This is ApacheBench, Version 1.3a
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
Benchmarking ALFRED (be patient)...
Server Software: Apache/1.3.9
Server Hostname: ALFRED
Server Port: 80
Document Path: /1.html
Document Length: 4815 bytes
Concurrency Level: 100
Time taken for tests: 140.047 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 508238760 bytes
HTML transferred: 481726305 bytes
Requests per second: 714.05
Transfer rate: 3629.06 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 47 3157
Processing: 69 92 105
Total: 69 139 3262
Average: 31.54% 0.00% 67.73% 0.71% 2.35 0.00 2.35
0.00 18.80
1021 213.28re 4.63cp 0avio 688k
1018 208.61re 3.64cp 0avio 689k httpd*
1 2.33re 0.99cp 0avio 728k ab
1 2.33re 0.00cp 0avio 281k sar
1 0.00re 0.00cp 0avio 266k accton
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]