Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 79172 invoked from network); 3 Nov 2000 01:42:29 -0000 Received: from gtei1.bellatlantic.net (199.45.39.159) by locus.apache.org with SMTP; 3 Nov 2000 01:42:29 -0000 Received: from ALFRED.NORTH (adsl-141-151-137-47.bellatlantic.net [141.151.137.47]) by gtei1.bellatlantic.net (8.9.1/8.9.1) with SMTP id UAA25445 for ; Thu, 2 Nov 2000 20:42:06 -0500 (EST) From: Roy Wilson Date: Fri, 03 Nov 2000 01:38:22 GMT Message-ID: <20001103.1382200@ALFRED.NORTH> Subject: TC4.0 Linux/Unix measurement scripts To: tomcat-dev@jakarta.apache.org In-Reply-To: <3A01B334.590F91A6@eng.sun.com> References: <39FF5F44.EFBA8BFF@eng.sun.com> <20001101.1242100@ALFRED.NORTH> <20001102.15293000@ALFRED.NORTH> <3A01B334.590F91A6@eng.sun.com> X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.2; Linux) X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------=_4D480137013008426BB8" Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N --------------=_4D480137013008426BB8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, Per Craig's request, here are the script files I used to develop the=20 Apache-based presentation mentioned in an earlier post.=20 Assuming I understand the ab source code, the scripts represent a settin= g=20 involving single-request clients (who make a request and wait for a repl= y=20 before making another) generating a homogeneous workload (ie, HelloWorld= )=20 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=20 better, please do. =20 Attached are two simplistic ascii bash shell scripts that work with=20 Apache on Redhat6.1. Since I haven't finished installing TC4.0, so I=20 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"=20 Also attached is a sample summary file. I'm writing a shell/awk script t= o=20 process the summary files that are posted.=20 1) tcdriver which which invokes tcscript with two parameters: the number of=20 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 -=20 and then send the summary before using it again with your second most=20 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=20 need to modify the line that invokes ab to give your localhost pathname.= =20 By running ab in localhost mode, network variability is eliminated (even= =20 though TCPIP loopback processing isn't).=20 The data collected includes: (from ab) info on per request connection times, total test, time and=20 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 runnin= g=20 the whole thing immediately after a cold boot is sufficient. Assuming Linux/Unix people decide to use these scripts, please attach th= e=20 summary file in ascii format to a post that describes your system=20 configuration (CPU, disk, memory, OS, etc.) I will process that files=20 post the results every TBD days. Sorry about the length. If I knew how to make it shorter, I would. :-) Roy --=20 Roy Wilson E-mail: designrw@bellatlantic.net=20 >>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< On 11/2/00, 1:32:20 PM, "Craig R. McClanahan"=20 wrote regarding Re: Tomcat 4.0 Milestone = 4=20 performance measurement: > Roy, would it be possible for you to write us a simple "cookbook" to=20 follow > in executing tests, so that we can each follow the same script and the= n > 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 present= ed by > > Costin at ApacheCon Europe. I'd like to compile such numbers if peop= le > > 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 mode= ling > > 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: designrw@bellatlantic.net > > > > --------------------------------------------------------------------= - > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org --------------=_4D480137013008426BB8 Content-Description: filename="tcdriver" Content-Disposition: inline; filename="tcdriver" Content-Type: text/plain; name ="tcdriver" Content-Transfer-Encoding: quoted-printable # Draft script by Roy Wilson used on Redhat6.1 system (bash) # Assume ONLY HelloWorld servlet being used: better to have a set, but w= hat? #=20 # 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 =3D 1 sh tcscript 1 $1=20 # Then ramp up load to 20, 40, 60, 80, 100 continuously active users=20 load=3D20 while [ "$load" -le 100 ] do sh tcscript $load $1=20 load=3D$(($load+20)) done --------------=_4D480137013008426BB8 Content-Description: filename="tcscript" Content-Disposition: inline; filename="tcscript" Content-Type: text/plain; name ="tcscript" Content-Transfer-Encoding: quoted-printable # Roy Wilson 11/2/00 echo "Starting ab load test with C =3D " $1 "and servlet =3D "$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=3D$! # modify path in next line for use of servlet /usr/sbin/ab -n 100000 -c $1 http://ALFRED/$2 >> summary =20 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=20 /usr/sbin/sa -a /var/log/tcacct >> summary rm -f $1$2.sardata=20 echo "Finished ab load test with C =3D "$1 "and servlet =3D "$2 --------------=_4D480137013008426BB8 Content-Description: filename="summary" Content-Disposition: inline; filename="summary" Content-Type: text/plain; name ="summary" Content-Transfer-Encoding: quoted-printable 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)... = =20 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)... = =20 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)... = =20 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)... = =20 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)... = =20 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)... = =20 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 --------------=_4D480137013008426BB8--