%!PS-Adobe-2.0 %%Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software %%Title: paper.dvi %%Pages: 9 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%DocumentFonts: Times-Roman Times-Italic Times-Bold Courier Helvetica %%DocumentPaperSizes: Letter %%EndComments %DVIPSCommandLine: dvips paper.dvi -o paper.ps %DVIPSParameters: dpi=600, comments removed %DVIPSSource: TeX output 1998.05.15:1546 %%BeginProcSet: tex.pro /TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N /X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72 mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1} ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if} forall round exch round exch]setmatrix}N /@landscape{/isls true N}B /@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{ /nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{ /sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0] N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{ 128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 sub]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{]} if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{ cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin 0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore userdict /eop-hook known{eop-hook}if showpage}N /@start{userdict /start-hook known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X /IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for 65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V {}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7 getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false} ifelse}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave newpath transform round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail {dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}B /c{-4 M} B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{3 M}B /k{ 4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{ p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p a}B /bos{/SS save N}B /eos{SS restore}B end %%EndProcSet %%BeginFont: Times-Roman % @@psencodingfile@{ % author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry", % version = "0.6", % date = "22 June 1996", % filename = "8r.enc", % email = "kb@@mail.tug.org", % address = "135 Center Hill Rd. // Plymouth, MA 02360", % codetable = "ISO/ASCII", % checksum = "119 662 4424", % docstring = "Encoding for TrueType or Type 1 fonts to be used with TeX." % @} % % Idea is to have all the characters normally included in Type 1 fonts % available for typesetting. This is effectively the characters in Adobe % Standard Encoding + ISO Latin 1 + extra characters from Lucida. % % Character code assignments were made as follows: % % (1) the Windows ANSI characters are almost all in their Windows ANSI % positions, because some Windows users cannot easily reencode the % fonts, and it makes no difference on other systems. The only Windows % ANSI characters not available are those that make no sense for % typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen % (173). quotesingle and grave are moved just because it's such an % irritation not having them in TeX positions. % % (2) Remaining characters are assigned arbitrarily to the lower part % of the range, avoiding 0, 10 and 13 in case we meet dumb software. % % (3) Y&Y Lucida Bright includes some extra text characters; in the % hopes that other PostScript fonts, perhaps created for public % consumption, will include them, they are included starting at 0x12. % % (4) Remaining positions left undefined are for use in (hopefully) % upward-compatible revisions, if someday more characters are generally % available. % % (5) hyphen appears twice for compatibility with both ASCII and Windows. % /TeXBase1Encoding [ % 0x00 (encoded characters from Adobe Standard not in Windows 3.1) /.notdef /dotaccent /fi /fl /fraction /hungarumlaut /Lslash /lslash /ogonek /ring /.notdef /breve /minus /.notdef % These are the only two remaining unencoded characters, so may as % well include them. /Zcaron /zcaron % 0x10 /caron /dotlessi % (unusual TeX characters available in, e.g., Lucida Bright) /dotlessj /ff /ffi /ffl /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef % very contentious; it's so painful not having quoteleft and quoteright % at 96 and 145 that we move the things normally found there down to here. /grave /quotesingle % 0x20 (ASCII begins) /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash % 0x30 /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question % 0x40 /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O % 0x50 /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore % 0x60 /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o % 0x70 /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef % rubout; ASCII ends % 0x80 /.notdef /.notdef /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /.notdef /.notdef /.notdef % 0x90 /.notdef /.notdef /.notdef /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe /.notdef /.notdef /Ydieresis % 0xA0 /.notdef % nobreakspace /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen % Y&Y (also at 45); Windows' softhyphen /registered /macron % 0xD0 /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown % 0xC0 /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis % 0xD0 /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls % 0xE0 /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis % 0xF0 /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndFont %%BeginProcSet: texps.pro TeXDict begin /rf{findfont dup length 1 add dict begin{1 index /FID ne 2 index /UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics exch def dict begin Encoding{exch dup type /integertype ne{pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} ifelse}forall Metrics /Metrics currentdict end def[2 index currentdict end definefont 3 -1 roll makefont /setfont load]cvx def}def /ObliqueSlant{dup sin S cos div neg}B /SlantFont{4 index mul add}def /ExtendFont{3 -1 roll mul exch}def /ReEncodeFont{/Encoding exch def}def end %%EndProcSet %%BeginProcSet: special.pro TeXDict begin /SDict 200 dict N SDict begin /@SpecialDefaults{/hs 612 N /vs 792 N /ho 0 N /vo 0 N /hsc 1 N /vsc 1 N /ang 0 N /CLIP 0 N /rwiSeen false N /rhiSeen false N /letter{}N /note{}N /a4{}N /legal{}N}B /@scaleunit 100 N /@hscale{@scaleunit div /hsc X}B /@vscale{@scaleunit div /vsc X}B /@hsize{/hs X /CLIP 1 N}B /@vsize{/vs X /CLIP 1 N}B /@clip{ /CLIP 2 N}B /@hoffset{/ho X}B /@voffset{/vo X}B /@angle{/ang X}B /@rwi{ 10 div /rwi X /rwiSeen true N}B /@rhi{10 div /rhi X /rhiSeen true N}B /@llx{/llx X}B /@lly{/lly X}B /@urx{/urx X}B /@ury{/ury X}B /magscale true def end /@MacSetUp{userdict /md known{userdict /md get type /dicttype eq{userdict begin md length 10 add md maxlength ge{/md md dup length 20 add dict copy def}if end md begin /letter{}N /note{}N /legal{} N /od{txpose 1 0 mtx defaultmatrix dtransform S atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{itransform lineto} }{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform{ itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}}{{ closepath}}pathforall newpath counttomark array astore /gc xdf pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if}N /txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 -1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop 90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr 1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr 2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S TR}if}N /cp {pop pop showpage pm restore}N end}if}if}N /normalscale{Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale}if 0 setgray} N /psfts{S 65781.76 div N}N /startTexFig{/psf$SavedState save N userdict maxlength dict begin /magscale true def normalscale currentpoint TR /psf$ury psfts /psf$urx psfts /psf$lly psfts /psf$llx psfts /psf$y psfts /psf$x psfts currentpoint /psf$cy X /psf$cx X /psf$sx psf$x psf$urx psf$llx sub div N /psf$sy psf$y psf$ury psf$lly sub div N psf$sx psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub TR /showpage{}N /erasepage{}N /copypage{}N /p 3 def @MacSetUp}N /doclip{ psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath moveto}N /endTexFig{end psf$SavedState restore}N /@beginspecial{SDict begin /SpecialSave save N gsave normalscale currentpoint TR @SpecialDefaults count /ocount X /dcount countdictstack N}N /@setspecial {CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR }{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury lineto closepath clip}if /showpage{}N /erasepage{}N /copypage{}N newpath }N /@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{ end}repeat grestore SpecialSave restore end}N /@defspecial{SDict begin} N /@fedspecial{end}B /li{lineto}B /rl{rlineto}B /rc{rcurveto}B /np{ /SaveX currentpoint /SaveY X N 1 setlinecap newpath}N /st{stroke SaveX SaveY moveto}N /fil{fill SaveX SaveY moveto}N /ellipse{/endangle X /startangle X /yrad X /xrad X /savematrix matrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc savematrix setmatrix}N end %%EndProcSet TeXDict begin 40258431 52099146 1000 600 600 (paper.dvi) @start /Fa 134[25 25 36 1[28 14 25 17 1[28 28 28 41 11 2[11 28 28 14 28 28 25 28 28 38[14 28 28 28 28 2[28 28 28 28 14 14 46[{ TeXBase1Encoding ReEncodeFont }32 50.000001 /Helvetica rf /Fb 119[45 13[45 45 45 1[45 45 45 45 45 45 45 45 45 45 45 45 1[45 45 45 45 45 45 45 45 45 3[45 1[45 5[45 45 1[45 1[45 45 45 2[45 1[45 3[45 1[45 45 4[45 45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 1[45 45 45 2[45 37[{ TeXBase1Encoding ReEncodeFont }59 75.000000 /Courier rf /Fc 139[55 55 5[55 55 3[55 2[55 53[55 55 46[{ TeXBase1Encoding ReEncodeFont }8 91.249976 /Courier rf /Fd 105[45 28[40 40 61 40 45 25 35 35 1[45 45 45 66 25 40 1[25 45 45 25 40 45 40 45 45 8[56 2[66 51 45 2[56 66 61 76 3[30 66 66 1[56 1[61 1[56 6[30 45 1[45 5[45 1[25 23 30 3[30 30 30 39[{ TeXBase1Encoding ReEncodeFont }48 91.249976 /Times-Italic rf /Fe 137[50 50 50 50 50 1[50 50 50 50 50 2[50 50 1[50 50 1[50 50 50 4[50 33[50 1[50 50 1[50 2[50 50 50 50 50 50 45[{ TeXBase1Encoding ReEncodeFont }28 83.333337 /Courier rf /Ff 134[50 50 72 50 55 33 39 44 1[55 50 55 83 28 55 1[28 55 50 33 44 55 44 55 50 11[72 2[72 8[39 3[66 72 72 1[72 11[50 50 50 50 50 49[{ TeXBase1Encoding ReEncodeFont }35 100.000003 /Times-Bold rf /Fg 133[40 45 1[66 45 51 30 35 40 51 51 45 51 76 25 51 1[25 51 45 30 40 51 40 51 45 11[66 61 51 66 1[56 71 66 86 61 4[71 56 61 66 66 1[66 6[30 5[45 45 45 45 2[23 30 42[51 2[{ TeXBase1Encoding ReEncodeFont }47 91.249976 /Times-Bold rf /Fh 104[91 45 1[40 40 24[40 45 45 66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30 40 45 40 45 40 3[30 1[30 1[66 66 86 1[66 56 51 61 1[51 66 66 81 56 66 35 30 66 66 51 56 66 61 61 66 84 5[25 45 45 45 45 45 45 45 45 45 45 25 23 30 23 2[30 30 30 71 34[51 51 2[{ TeXBase1Encoding ReEncodeFont }77 91.249976 /Times-Roman rf /Fi 140[39 39 9[50 2[44 1[44 50 50 14[61 1[61 3[55 3[72 72[{ TeXBase1Encoding ReEncodeFont }11 100.000003 /Times-Italic rf /Fj 137[50 2[39 33 2[50 50 4[28 1[50 1[44 50 1[50 44 12[61 6[89 2[39 5[72 68[{ TeXBase1Encoding ReEncodeFont }15 100.000003 /Times-Roman rf /Fk 104[120 32[60 60 33 47 40 1[60 60 60 93 33 2[33 60 60 40 53 1[53 60 53 9[113 2[73 66 2[66 2[106 11[86 65[{ TeXBase1Encoding ReEncodeFont }25 119.999948 /Times-Roman rf end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%PaperSize: Letter %%EndSetup %%Page: 1 1 1 0 bop 1194 331 a Fk(httperf\227A)30 b(T)-10 b(ool)30 b(for)f(Measuring)1337 481 y(W)-10 b(eb)30 b(Serv)n(er)g(Performance) 1587 733 y Fj(Da)n(vid)24 b(Mosber)n(ger)1564 850 y Fi(HP)h(Resear)l(c) o(h)f(Labs)596 966 y Fh(da)n(vidm@hpl.hp.com,)i(http://www)-6 b(.hpl.hp.com/personal/)q(Da)n(vi)q(d)p 2823 966 28 4 v 39 w(Mosber)n(ger/)1802 1223 y Fj(T)e(ai)25 b(Jin)1564 1339 y Fi(HP)g(Resear)l(c)o(h)f(Labs)882 1456 y Fh(tai@hpl.hp.com,)h (http://www)-6 b(.hpl.hp.com/personal)q(/T)f(ai)p 2823 1456 V 39 w(Jin/)0 1818 y Fg(Abstract)0 2150 y Fh(This)33 b(paper)h(describes)h(httperf,)h(a)d(tool)g(for)g(measuring)0 2262 y(web)19 b(serv)o(er)h(performance.)29 b(It)19 b(pro)o(vides)i(a)e (\003e)o(xible)g(f)o(acil-)0 2375 y(ity)25 b(for)g(generating)i(v)n (arious)f(HTTP)c(w)o(orkloads)27 b(and)e(for)0 2488 y(measuring)d(serv) o(er)f(performance.)30 b(The)19 b(focus)i(of)f(httperf)0 2601 y(is)35 b(not)g(on)g(implementing)i(one)e(particular)i(benchmark)0 2714 y(b)n(ut)h(on)f(pro)o(viding)i(a)e(rob)n(ust,)42 b(high-performance)g(tool)0 2827 y(that)30 b(f)o(acilitates)i(the)e (construction)i(of)e(both)g(micro-)g(and)0 2940 y(macro-le)n(v)o(el)h (benchmarks.)47 b(The)29 b(three)h(distinguishing)0 3053 y(characteristics)38 b(of)33 b(httperf)i(are)f(its)f(rob)n(ustness,)39 b(which)0 3166 y(includes)d(the)e(ability)h(to)f(generate)i(and)e (sustain)h(serv)o(er)0 3279 y(o)o(v)o(erload,)k(support)d(for)f(the)g (HTTP/1.1)e(protocol,)40 b(and)0 3392 y(its)j(e)o(xtensibility)k(to)c (ne)n(w)f(w)o(orkload)j(generators)h(and)0 3504 y(performance)33 b(measurements.)51 b(In)30 b(addition)i(to)f(report-)0 3617 y(ing)20 b(on)g(the)h(design)g(and)f(implementation)j(of)d (httperf)i(this)0 3730 y(paper)36 b(also)f(discusses)i(some)d(of)h(the) f(e)o(xperiences)k(and)0 3843 y(insights)26 b(gained)e(while)g (realizing)i(this)e(tool.)0 4278 y Ff(1)99 b(Intr)n(oduction)0 4610 y Fh(A)30 b(web)h(system)h(consists)i(of)d(a)g(web)g(serv)o(er)l (,)j(a)d(number)0 4723 y(of)21 b(clients,)i(and)e(a)g(netw)o(ork)h (that)f(connects)j(the)d(clients)h(to)0 4835 y(the)30 b(serv)o(er)-5 b(.)49 b(The)30 b(protocol)i(used)f(to)f(communicate)i (be-)0 4948 y(tween)f(the)h(client)g(and)g(serv)o(er)g(is)f(HTTP)d([2)q (].)51 b(In)31 b(order)0 5061 y(to)e(measure)h(serv)o(er)g(performance) h(in)e(such)h(a)f(system)g(it)0 5174 y(is)34 b(necessary)j(to)d(run)h (a)f(tool)h(on)f(the)h(clients)h(that)e(gen-)0 5287 y(erates)g(a)f (speci\002c)h(HTTP)d(w)o(orkload.)59 b(Currently)-6 b(,)37 b(web)0 5400 y(serv)o(er)j(measurements)h(are)e(conducted)j(using)e (bench-)2010 1818 y(marks)24 b(such)h(as)e(SPECweb)f(or)h(W)-7 b(ebStone)25 b([6)q(,)d(8)q(])h(which)2010 1931 y(simulate)31 b(a)f(\002x)o(ed)f(number)i(of)f(clients.)50 b(Gi)n(v)o(en)29 b(that)i(the)2010 2044 y(potential)25 b(user)e(base)h(of)e(an)h (Internet-based)k(serv)o(er)d(is)e(on)2010 2156 y(the)h(order)i(of)e (hundreds)i(of)f(millions)g(of)f(users)h(it)f(is)g(clear)2010 2269 y(that)38 b(simulating)i(a)e(\002x)o(ed)f(and)h(relati)n(v)o(ely)i (small)e(num-)2010 2382 y(ber)j(of)f(clients)i(is)e(often)i(insuf)n (\002cient.)81 b(F)o(or)40 b(this)h(rea-)2010 2495 y(son,)h(Banga)c (and)g(Druschel)i([1])e(recently)i(ar)n(gued)g(the)2010 2608 y(case)28 b(for)f(measuring)i(web)e(serv)o(ers)h(with)f(tools)h (that)g(can)2010 2721 y(generate)i(and)f(sustain)g(o)o(v)o(erload,)i (which)d(is)g(ef)n(fecti)n(v)o(ely)2010 2834 y(equi)n(v)n(alent)e(to)e (simulating)i(an)d(in\002nite)i(user)f(base.)31 b(The)o(y)2010 2947 y(also)36 b(presented)h(a)e(tool)h(called)g(\223s-clients\224)i (that)e(is)f(ca-)2010 3060 y(pable)g(of)g(generating)i(such)e(loads.)62 b(The)34 b(s-clients)j(ap-)2010 3173 y(proach)g(is)e(similar)h(to)f (httperf)i(in)e(that)h(both)g(are)f(capa-)2010 3286 y(ble)k(of)f (sustaining)j(o)o(v)o(erload)f(b)n(ut)f(the)o(y)f(dif)n(fer)h (signi\002-)2010 3399 y(cantly)26 b(in)f(design)h(and)f (implementation.)35 b(F)o(or)24 b(e)o(xample,)2010 3511 y(httperf)c(completely)h(separates)g(the)e(issue)g(of)g(ho)n(w)f(to)g (per)n(-)2010 3624 y(form)27 b(HTTP)e(calls)j(from)g(issues)g(such)h (as)e(what)g(kind)h(of)2010 3737 y(w)o(orkload)g(and)f(measurements)i (should)g(be)d(used.)39 b(Con-)2010 3850 y(sequently)-6 b(,)43 b(httperf)c(can)e(readily)i(be)e(used)h(to)f(perform)2010 3963 y(v)n(arious)28 b(kinds)g(of)f(web-serv)o(er)h(related)g (measurements,)2010 4076 y(including)d(SPECweb/W)-7 b(ebStone-lik)o(e) 23 b(measurements,)2010 4189 y(s-client-lik)o(e)38 b(measurements,)h (or)34 b(ne)n(w)g(kinds)i(of)e(mea-)2010 4302 y(surements)26 b(such)f(as)g(the)f(session-based)29 b(measurements)2010 4415 y(that)24 b(we)f(will)g(discuss)i(brie\003y)f(in)g(Section)g(4.) 2010 4641 y(Creating)i(httperf)h(turned)f(out)g(to)f(be)g(a)f (surprisingly)29 b(dif-)2010 4753 y(\002cult)19 b(task)h(due)f(to)g(f)o (actors)i(inherent)g(in)e(the)g(problem)i(and)2010 4866 y(shortcomings)30 b(of)d(current)h(operating)i(systems)e(\(OSes\).)2010 4979 y(The)35 b(\002rst)h(challenge)i(is)e(that)g(a)g(web)f(system)i (is)e(a)h(dis-)2010 5092 y(trib)n(uted)e(system)f(and)f(as)g(such)h (inherently)i(more)c(dif)n(\002-)2010 5205 y(cult)h(to)g(e)n(v)n (aluate)i(than)e(a)g(centralized)j(system)d(that)h(has)2010 5318 y(little)24 b(or)g(no)g(concurrenc)o(y)i(and)e(a)f(synchronized)28 b(clock.)p eop %%Page: 2 2 2 1 bop 0 91 a Fh(Second,)31 b(HTTP)26 b(in)j(general)i(and)e(HTTP/1.0) f(in)h(partic-)0 204 y(ular)e(cause)h(connection)h(usage)f(patterns)g (that)f(TCP)e(w)o(as)0 317 y(not)19 b(designed)h(for)-5 b(.)27 b(Some)18 b(of)g(these)i(problems)f(ha)n(v)o(e)g(been)0 430 y(\002x)o(ed)g(in)g(response)i(to)e(the)h(e)o(xperience)h(gained)g (from)e(run-)0 543 y(ning)41 b(web)e(serv)o(ers.)79 b(Ho)n(we)n(v)o(er) l(,)44 b(since)d(tools)g(such)f(as)0 656 y(httperf)28 b(run)g(on)e(the)i(client-side)h(the)o(y)e(e)o(x)o(ercise)h(the)g(sys-) 0 769 y(tem)22 b(in)f(a)h(manner)h(that)f(is)g(quite)h(dif)n(ferent)h (from)e(the)g(w)o(ay)0 882 y(serv)o(ers)f(do.)27 b(As)18 b(a)h(consequence,)24 b(there)c(are)f(a)g(number)h(of)0 995 y(additional)k(issues)f(that)e(such)h(a)f(test)h(tool)g(needs)g(to) f(guard)0 1108 y(against.)0 1333 y(A)32 b(third)j(challenge)h(is)e (that)g(the)g(w)o(orld-wide)h(web)e(is)h(a)0 1446 y(highly)d(dynamic)g (system.)48 b(Almost)30 b(e)n(v)o(ery)g(part)g(in)g(it\227)0 1559 y(serv)o(er)k(and)f(client)h(softw)o(are,)i(netw)o(ork)e (infrastructure,)0 1672 y(web)25 b(content,)i(and)f(user)f(access)i (pattern\227is)g(subject)g(to)0 1785 y(relati)n(v)o(ely)36 b(frequent)g(and)e(fundamental)i(changes.)62 b(F)o(or)0 1898 y(a)34 b(test)h(tool)g(to)g(remain)g(useful)h(o)o(v)o(er)f(a)f (period)i(of)e(time)0 2011 y(requires)23 b(a)e(design)i(that)f(mak)o (es)g(it)f(relati)n(v)o(ely)i(easy)f(to)f(e)o(x-)0 2124 y(tend)j(and)g(modify)h(as)e(need)h(arises.)0 2350 y(The)30 b(rest)h(of)f(this)h(paper)h(is)e(or)n(ganized)j(as)d(follo)n(ws:)44 b(the)0 2462 y(ne)o(xt)37 b(section)h(gi)n(v)o(es)f(a)g(brief)g (introduction)j(on)d(ho)n(w)f(to)0 2575 y(use)30 b(httperf.)48 b(Section)31 b(3)e(describes)j(the)e(o)o(v)o(erall)h(design)0 2688 y(of)h(the)g(tool)g(and)h(presents)h(the)e(rationale)i(for)e(the)g (most)0 2801 y(important)h(design)g(choices.)55 b(Section)33 b(4)e(discusses)j(the)0 2914 y(current)25 b(state)f(of)g(httperf)h(and) f(some)f(of)h(the)f(more)h(subtle)0 3027 y(implementation)39 b(issues)f(disco)o(v)o(ered)g(so)f(f)o(ar)-5 b(.)67 b(Finally)-6 b(,)0 3140 y(Section)24 b(5)g(presents)h(some)f(concluding)j(remarks.)0 3558 y Ff(2)99 b(An)26 b(Example)f(of)g(Using)f(httperf)0 3872 y Fh(T)-7 b(o)21 b(con)l(v)o(e)o(y)h(a)g(concrete)h(feeling)h(of)d (ho)n(w)g(httperf)i(is)f(used,)0 3985 y(this)e(section)i(presents)g(a)e (brief)g(e)o(xample)h(of)f(ho)n(w)f(to)h(mea-)0 4098 y(sure)34 b(the)g(request)i(throughput)h(of)c(a)g(web)h(serv)o(er)-5 b(.)60 b(The)0 4211 y(simplest)31 b(w)o(ay)f(to)g(achie)n(v)o(e)i(this) e(is)g(to)g(send)h(requests)h(to)0 4324 y(the)k(serv)o(er)h(at)f(a)g (\002x)o(ed)g(rate)g(and)h(to)f(measure)h(the)g(rate)0 4437 y(at)h(which)g(replies)i(arri)n(v)o(e.)72 b(Running)40 b(the)e(test)g(se)n(v)o(eral)0 4550 y(times)43 b(and)g(with)f (monotonically)k(increasing)f(request)0 4663 y(rates,)34 b(one)e(w)o(ould)g(e)o(xpect)h(to)e(see)h(the)f(reply)i(rate)f(le)n(v)o (el)0 4776 y(of)n(f)23 b(when)g(the)g(serv)o(er)h(becomes)g(saturated,) h(i.e.,)d(when)h(it)0 4889 y(is)g(operating)j(at)e(its)f(full)h (capacity)-6 b(.)0 5101 y(T)f(o)39 b(e)o(x)o(ecute)i(such)h(a)d(test,) 45 b(it)40 b(is)g(necessary)j(to)d(in)l(v)n(ok)o(e)0 5201 y(httperf)j(on)e(the)g(client)h(machines.)83 b(Ideally)-6 b(,)46 b(the)c(tool)0 5300 y(should)22 b(be)f(in)l(v)n(ok)o(ed)i (simultaneously)h(on)d(all)f(clients,)j(b)n(ut)0 5400 y(as)k(long)g(as)g(the)g(test)h(runs)f(for)g(se)n(v)o(eral)h(minutes,)h (startup)2010 91 y(dif)n(ferences)22 b(in)d(the)h(range)g(of)f(seconds) i(do)f(not)f(cause)i(sig-)2010 191 y(ni\002cant)f(errors)h(in)e(the)g (end)h(result.)28 b(A)18 b(sample)i(command)2010 291 y(line)k(is)f(sho)n(wn)h(belo)n(w:)2110 544 y Fe(httperf)48 b(--server)g(hostname)h(\\)2159 644 y(--port)g(80)h(--uri)e(/test.html) g(\\)2159 743 y(--rate)h(150)g(--num-conn)f(27000)h(\\)2159 843 y(--num-call)f(1)i(--timeout)e(5)2010 1109 y Fh(This)59 b(command)g(causes)h(httperf)h(to)d(use)h(the)h(web)2010 1222 y(serv)o(er)42 b(on)e(the)i(host)f(with)g(IP)e(name)i Fd(hostname)p Fh(,)47 b(run-)2010 1335 y(ning)35 b(at)f(port)h(80.)60 b(The)34 b(web)f(page)i(being)h(retrie)n(v)o(ed)f(is)2010 1448 y(\223)p Fc(/test.html)p Fh(\224)23 b(and,)28 b(in)g(this)g (simple)g(test,)g(the)g(same)2010 1561 y(page)i(is)g(retrie)n(v)o(ed)h (repeatedly)-6 b(.)49 b(The)29 b(rate)h(at)f(which)h(re-)2010 1674 y(quests)37 b(are)e(issued)i(is)d(150)i(per)g(second.)65 b(The)34 b(test)i(in-)2010 1787 y(v)n(olv)o(es)26 b(initiating)i(a)c (total)i(of)f(27,000)h(TCP)d(connections)2010 1900 y(and)c(on)g(each)g (connection)j(one)d(HTTP)e(call)i(is)f(performed)2010 2013 y(\(a)31 b(call)g(consists)i(of)e(sending)i(a)e(request)i(and)e (recei)n(ving)2010 2126 y(a)c(reply\).)40 b(The)26 b(timeout)i(option)h (selects)f(the)f(number)h(of)2010 2239 y(seconds)21 b(that)e(the)g (client)h(is)f(willing)g(to)g(w)o(ait)f(to)h(hear)g(back)2010 2351 y(from)f(the)g(serv)o(er)-5 b(.)28 b(If)18 b(this)h(timeout)g(e)o (xpires,)h(the)f(tool)f(con-)2010 2464 y(siders)33 b(the)g (corresponding)j(call)c(to)g(ha)n(v)o(e)h(f)o(ailed.)55 b(Note)2010 2577 y(that)34 b(with)f(a)g(total)h(of)f(27,000)h (connections)j(and)d(a)f(rate)2010 2690 y(of)22 b(150)g(per)g(second,)i (the)e(total)h(test)f(duration)i(will)e(be)g(ap-)2010 2803 y(proximately)h(180)f(seconds,)h(independent)h(of)d(what)f(load) 2010 2916 y(the)k(serv)o(er)g(can)g(actually)i(sustain.)2010 3142 y(Once)35 b(a)g(test)g(\002nishes,)k(se)n(v)o(eral)d(statistics)h (are)f(printed.)2010 3255 y(An)25 b(e)o(xample)h(output)g(of)g(httperf) g(is)f(sho)n(wn)h(in)f(Figure)h(1.)2010 3368 y(The)d(\002gure)h(sho)n (ws)g(that)g(there)h(are)f(six)g(groups)h(of)f(statis-)2010 3481 y(tics,)34 b(separated)g(by)e(blank)g(lines.)54 b(The)31 b(groups)i(consist)2010 3593 y(of)20 b(o)o(v)o(erall)i (results,)g(results)g(pertaining)i(to)c(the)h(TCP)d(con-)2010 3706 y(nections,)28 b(results)f(for)f(the)g(requests)h(that)f(were)g (sent,)g(re-)2010 3819 y(sults)37 b(for)f(the)h(replies)g(that)g(were)f (recei)n(v)o(ed,)41 b(CPU)34 b(and)2010 3932 y(netw)o(ork)22 b(utilization)i(\002gures,)e(as)f(well)f(as)h(a)g(summary)g(of)2010 4045 y(the)f(errors)h(that)g(occurred)h(\(timeout)f(errors)g(are)f (common)2010 4158 y(when)k(the)f(serv)o(er)i(is)e(o)o(v)o(erloaded\).) 2010 4384 y(A)31 b(typical)j(performance)g(graph)g(that)e(can)h(be)f (obtained)2010 4497 y(with)j(the)g(statistics)i(reported)g(by)d (httperf)j(is)d(sho)n(wn)h(in)2010 4610 y(Figure)j(2.)68 b(F)o(or)36 b(this)i(particular)h(e)o(xample,)i(the)c(serv)o(er)2010 4723 y(consisted)g(of)e(Apache)h(1.3b2)f(running)i(on)e(a)f(HP)f(Net-) 2010 4835 y(Serv)o(er)26 b(with)f(one)h(200MHz)g(P6)f(processor)-5 b(.)38 b(The)25 b(serv)o(er)2010 4948 y(OS)e(w)o(as)h(Linux)h(v2.1.86.) 33 b(The)24 b(netw)o(ork)i(consisted)h(of)e(a)2010 5061 y(100baseT)33 b(Ethernet)g(and)e(there)i(were)e(four)h(client)h(ma-) 2010 5174 y(chines)45 b(running)h(HP-UX)c(10.20.)91 b(As)43 b(the)h(top-most)2010 5287 y(graph)21 b(sho)n(ws,)g(the)f(achie)n(v)o (ed)i(throughput)h(increases)g(lin-)2010 5400 y(early)j(with)g(of)n (fered)h(load)f(until)h(the)e(serv)o(er)i(starts)f(to)g(be-)p eop %%Page: 3 3 3 2 bop 0 96 3870 4 v 182 262 a Fb(Total:)44 b(connections)f(27000)h (requests)f(26701)h(replies)g(26701)g(test-duration)e(179.996)i(s)182 445 y(Connection)f(rate:)h(150.0)g(conn/s)g(\(6.7)g(ms/conn,)f(<=47)i (concurrent)e(connections\))182 536 y(Connection)g(time)h([ms]:)g(min)g (1.1)h(avg)f(5.0)g(max)h(315.0)f(median)g(2.5)g(stddev)g(13.0)182 628 y(Connection)f(time)h([ms]:)g(connect)g(0.3)182 810 y(Request)f(rate:)h(148.3)g(req/s)g(\(6.7)h(ms/req\))182 902 y(Request)e(size)i([B]:)f(72.0)182 1084 y(Reply)g(rate)g ([replies/s]:)f(min)h(139.8)g(avg)g(148.3)g(max)h(150.3)f(stddev)g(2.7) g(\(36)g(samples\))182 1176 y(Reply)g(time)g([ms]:)g(response)f(4.6)i (transfer)e(0.0)182 1267 y(Reply)h(size)g([B]:)g(header)g(222.0)g (content)g(1024.0)f(footer)h(0.0)h(\(total)e(1246.0\))182 1358 y(Reply)h(status:)f(1xx=0)h(2xx=26701)g(3xx=0)g(4xx=0)g(5xx=0)182 1541 y(CPU)g(time)g([s]:)g(user)h(55.31)f(system)f(124.41)h(\(user)g (30.7\045)g(system)g(69.1\045)g(total)g(99.8\045\))182 1632 y(Net)g(I/O:)g(190.9)g(KB/s)g(\(1.6*10\2106)g(bps\))182 1815 y(Errors:)f(total)h(299)h(client-timo)e(299)h(socket-timo)f(0)i (connrefused)e(0)h(connreset)g(0)182 1906 y(Errors:)f(fd-unavail)h(0)g (addrunavail)f(0)i(ftab-full)e(0)i(other)f(0)p 0 2094 V 1013 2290 a Fh(Figure)24 b(1:)29 b(Example)24 b(of)g(Basic)f (Performance)i(Statistics)210 2562 y 27238198 19181830 3289088 3289088 26970521 19866091 startTexFig 210 2562 a %%BeginDocument: figs/graph.eps /gnudict 120 dict def gnudict begin /Color true def /Solid false def /gnulinewidth 5.000 def /vshift -46 def /dl {10 mul} def /hpt 31.5 def /vpt 31.5 def /M {moveto} bind def /L {lineto} bind def /R {rmoveto} bind def /V {rlineto} bind def /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow { currentpoint stroke M 0 vshift R show } def /Rshow { currentpoint stroke M dup stringwidth pop neg vshift R show } def /Cshow { currentpoint stroke M dup stringwidth pop -2 div vshift R show } def /DL { Color {setrgbcolor Solid {pop []} if 0 setdash } {pop pop pop Solid {pop []} if 0 setdash} ifelse } def /BL { stroke gnulinewidth 2 mul setlinewidth } def /AL { stroke gnulinewidth 2 div setlinewidth } def /PL { stroke gnulinewidth setlinewidth } def /LTb { BL [] 0 0 0 DL } def /LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def /LT0 { PL [] 0 1 0 DL } def /LT1 { PL [4 dl 2 dl] 0 0 1 DL } def /LT2 { PL [2 dl 3 dl] 1 0 0 DL } def /LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def /LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def /LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def /LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def /LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def /LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def /Pnt { stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore } def /Dia { stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V closepath stroke Pnt } def /Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V currentpoint stroke M hpt neg vpt neg R hpt2 0 V stroke } def /Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M 0 vpt2 neg V hpt2 0 V 0 vpt2 V hpt2 neg 0 V closepath stroke Pnt } def /Crs { stroke [] 0 setdash exch hpt sub exch vpt add M hpt2 vpt2 neg V currentpoint stroke M hpt2 neg 0 R hpt2 vpt2 V stroke } def /TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M hpt neg vpt -1.62 mul V hpt 2 mul 0 V hpt neg vpt 1.62 mul V closepath stroke Pnt } def /Star { 2 copy Pls Crs } def /BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M 0 vpt2 neg V hpt2 0 V 0 vpt2 V hpt2 neg 0 V closepath fill } def /TriUF { stroke [] 0 setdash vpt 1.12 mul add M hpt neg vpt -1.62 mul V hpt 2 mul 0 V hpt neg vpt 1.62 mul V closepath fill } def /TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M hpt neg vpt 1.62 mul V hpt 2 mul 0 V hpt neg vpt -1.62 mul V closepath stroke Pnt } def /TriDF { stroke [] 0 setdash vpt 1.12 mul sub M hpt neg vpt 1.62 mul V hpt 2 mul 0 V hpt neg vpt -1.62 mul V closepath fill} def /DiaF { stroke [] 0 setdash vpt add M hpt neg vpt neg V hpt vpt neg V hpt vpt V hpt neg vpt V closepath fill } def /Pent { stroke [] 0 setdash 2 copy gsave translate 0 hpt M 4 {72 rotate 0 hpt L} repeat closepath stroke grestore Pnt } def /PentF { stroke [] 0 setdash gsave translate 0 hpt M 4 {72 rotate 0 hpt L} repeat closepath fill grestore } def /Circle { stroke [] 0 setdash 2 copy hpt 0 360 arc stroke Pnt } def /CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def /C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def /C1 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 90 arc closepath fill vpt 0 360 arc closepath } bind def /C2 { BL [] 0 setdash 2 copy moveto 2 copy vpt 90 180 arc closepath fill vpt 0 360 arc closepath } bind def /C3 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 180 arc closepath fill vpt 0 360 arc closepath } bind def /C4 { BL [] 0 setdash 2 copy moveto 2 copy vpt 180 270 arc closepath fill vpt 0 360 arc closepath } bind def /C5 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 90 arc 2 copy moveto 2 copy vpt 180 270 arc closepath fill vpt 0 360 arc } bind def /C6 { BL [] 0 setdash 2 copy moveto 2 copy vpt 90 270 arc closepath fill vpt 0 360 arc closepath } bind def /C7 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 270 arc closepath fill vpt 0 360 arc closepath } bind def /C8 { BL [] 0 setdash 2 copy moveto 2 copy vpt 270 360 arc closepath fill vpt 0 360 arc closepath } bind def /C9 { BL [] 0 setdash 2 copy moveto 2 copy vpt 270 450 arc closepath fill vpt 0 360 arc closepath } bind def /C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill 2 copy moveto 2 copy vpt 90 180 arc closepath fill vpt 0 360 arc closepath } bind def /C11 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 90 arc closepath fill 2 copy moveto 2 copy vpt 180 360 arc closepath fill vpt 0 360 arc closepath } bind def /C12 { BL [] 0 setdash 2 copy moveto 2 copy vpt 180 360 arc closepath fill vpt 0 360 arc closepath } bind def /C13 { BL [] 0 setdash 2 copy moveto 2 copy vpt 0 90 arc closepath fill 2 copy moveto 2 copy vpt 180 360 arc closepath fill vpt 0 360 arc closepath } bind def /C14 { BL [] 0 setdash 2 copy moveto 2 copy vpt 90 360 arc closepath fill vpt 0 360 arc } bind def /C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill vpt 0 360 arc closepath } bind def /Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath } bind def /Square { dup Rec } bind def /Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def /S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def /S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def /S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def /S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def /S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def /S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def /S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def /S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill 2 copy vpt Square fill Bsquare } bind def /S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def /S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def /S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def /S11 { 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def /S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def /S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill 2 copy vpt Square fill Bsquare } bind def /S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def /S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def /D0 { gsave translate 45 rotate 0 0 Box stroke grestore } bind def /D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def /D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def /D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def /D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def /D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def /D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def /D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def /D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def /D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def /D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def /D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def /D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def /D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def /D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def /D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def /BoxFill { gsave Rec 1 setgray fill grestore } def end gnudict begin gsave 50 50 translate 0.050 0.050 scale 0 setgray newpath (Helvetica) findfont 140 scalefont setfont LTb LTa 588 630 M 6024 0 V LTb 588 630 M 63 0 V -147 0 R (1ms) Rshow 588 785 M 31 0 V 588 939 M 31 0 V -31 155 R 31 0 V LTa 588 1248 M 6024 0 V LTb 588 1248 M 63 0 V -147 0 R (4ms) Rshow 588 1403 M 31 0 V -31 155 R 31 0 V -31 154 R 31 0 V LTa 588 1867 M 6024 0 V LTb 588 1867 M 63 0 V -147 0 R (16ms) Rshow 588 2021 M 31 0 V -31 155 R 31 0 V -31 154 R 31 0 V LTa 588 2485 M 6024 0 V LTb 588 2485 M 63 0 V -147 0 R (64ms) Rshow 588 2640 M 31 0 V -31 154 R 31 0 V -31 155 R 31 0 V LTa 588 3103 M 6024 0 V LTb 588 3103 M 63 0 V -147 0 R (256ms) Rshow 588 3258 M 31 0 V -31 155 R 31 0 V -31 154 R 31 0 V LTa 588 3722 M 6024 0 V LTb 588 3722 M 63 0 V -147 0 R (1024ms) Rshow 588 3876 M 31 0 V -31 155 R 31 0 V -31 154 R 31 0 V LTa 588 4340 M 6024 0 V LTb 588 4340 M 63 0 V -147 0 R (4096ms) Rshow 588 630 M 0 63 V 0 3647 R 0 -63 V 588 490 M (0) Cshow 875 630 M 0 31 V 0 3679 R 0 -31 V 1162 630 M 0 31 V 0 3679 R 0 -31 V 1449 630 M 0 31 V 0 3679 R 0 -31 V 1735 630 M 0 31 V 0 3679 R 0 -31 V 2022 630 M 0 63 V 0 3647 R 0 -63 V 0 -3787 R (500) Cshow 2309 630 M 0 31 V 0 3679 R 0 -31 V 2596 630 M 0 31 V 0 3679 R 0 -31 V 2883 630 M 0 31 V 0 3679 R 0 -31 V 3170 630 M 0 31 V 0 3679 R 0 -31 V 3457 630 M 0 63 V 0 3647 R 0 -63 V 0 -3787 R (1000) Cshow 3743 630 M 0 31 V 0 3679 R 0 -31 V 4030 630 M 0 31 V 0 3679 R 0 -31 V 4317 630 M 0 31 V 0 3679 R 0 -31 V 4604 630 M 0 31 V 0 3679 R 0 -31 V 4891 630 M 0 63 V 0 3647 R 0 -63 V 0 -3787 R (1500) Cshow 5178 630 M 0 31 V 0 3679 R 0 -31 V 5465 630 M 0 31 V 0 3679 R 0 -31 V 5751 630 M 0 31 V 0 3679 R 0 -31 V 6038 630 M 0 31 V 0 3679 R 0 -31 V 6325 630 M 0 63 V 0 3647 R 0 -63 V 0 -3787 R (2000) Cshow 6612 630 M 0 31 V 0 3679 R 0 -31 V 0 -3679 R -63 0 V 147 0 R ( 0%) Lshow 6612 778 M -31 0 V 31 149 R -31 0 V 31 148 R -31 0 V 31 149 R -31 0 V 31 148 R -63 0 V 147 0 R ( 20%) Lshow 6612 1520 M -31 0 V 31 149 R -31 0 V 31 148 R -31 0 V 31 149 R -31 0 V 31 148 R -63 0 V 147 0 R ( 40%) Lshow 6612 2262 M -31 0 V 31 149 R -31 0 V 31 148 R -31 0 V 31 149 R -31 0 V 31 148 R -63 0 V 147 0 R ( 60%) Lshow 6612 3004 M -31 0 V 31 149 R -31 0 V 31 148 R -31 0 V 31 149 R -31 0 V 31 148 R -63 0 V 147 0 R ( 80%) Lshow 6612 3746 M -31 0 V 31 149 R -31 0 V 31 148 R -31 0 V 31 149 R -31 0 V 31 148 R -63 0 V 147 0 R (100%) Lshow 875 4340 M 0 -63 V 0 343 R (100) Cshow 1162 4340 M 0 -63 V 0 203 R (200) Cshow 1449 4340 M 0 -63 V 0 343 R (300) Cshow 1735 4340 M 0 -63 V 0 203 R (399) Cshow 2022 4340 M 0 -63 V 0 343 R (497) Cshow 2309 4340 M 0 -63 V 0 203 R (594) Cshow 2596 4340 M 0 -63 V 0 343 R (672) Cshow 2883 4340 M 0 -63 V 0 203 R (778) Cshow 3170 4340 M 0 -63 V 0 343 R (792) Cshow 3457 4340 M 0 -63 V 0 203 R (792) Cshow 3743 4340 M 0 -63 V 0 343 R (788) Cshow 4030 4340 M 0 -63 V 0 203 R (781) Cshow 4317 4340 M 0 -63 V 0 343 R (780) Cshow 4604 4340 M 0 -63 V 0 203 R (776) Cshow 4891 4340 M 0 -63 V 0 343 R (772) Cshow 5178 4340 M 0 -63 V 0 203 R (768) Cshow 5465 4340 M 0 -63 V 0 343 R (768) Cshow 5751 4340 M 0 -63 V 0 203 R (763) Cshow 6038 4340 M 0 -63 V 0 343 R (761) Cshow 6325 4340 M 0 -63 V 0 203 R (758) Cshow 588 630 M 6024 0 V 0 3710 V -6024 0 V 588 630 L 3600 4900 M (Linux 100bt 1K queue=32 procs=32 clients=4 duration=180s timeout=1s CPUs=1) Cshow 777 0 M 0 280 V 5175 0 V 5952 0 L 777 0 L 0 280 R 5175 0 V LT3 1344 210 M (Reply Rate [1/s]) Lshow 861 210 M 399 0 V 875 1094 M 287 464 V 287 463 V 286 459 V 287 455 V 287 450 V 287 361 V 287 492 V 287 65 V 287 0 V 286 -19 V 287 -32 V 287 -5 V 287 -18 V 287 -19 V 287 -18 V 287 0 V 286 -24 V 287 -9 V 287 -14 V 1061 210 Box 875 1094 Box 1162 1558 Box 1449 2021 Box 1735 2480 Box 2022 2935 Box 2309 3385 Box 2596 3746 Box 2883 4238 Box 3170 4303 Box 3457 4303 Box 3743 4284 Box 4030 4252 Box 4317 4247 Box 4604 4229 Box 4891 4210 Box 5178 4192 Box 5465 4192 Box 5751 4168 Box 6038 4159 Box 6325 4145 Box LT4 1344 70 M (Errors [%]) Lshow 861 70 M 399 0 V 189 564 R 286 3 V 287 15 V 287 19 V 287 107 V 287 -48 V 287 349 V 287 330 V 286 275 V 287 248 V 287 189 V 287 167 V 287 145 V 287 134 V 287 107 V 286 97 V 287 85 V 287 82 V 1061 70 BoxF 1449 634 BoxF 1735 637 BoxF 2022 652 BoxF 2309 671 BoxF 2596 778 BoxF 2883 730 BoxF 3170 1079 BoxF 3457 1409 BoxF 3743 1684 BoxF 4030 1932 BoxF 4317 2121 BoxF 4604 2288 BoxF 4891 2433 BoxF 5178 2567 BoxF 5465 2674 BoxF 5751 2771 BoxF 6038 2856 BoxF 6325 2938 BoxF LT6 4356 210 M (Response time [ms]) Lshow 3873 210 M 399 0 V 875 939 M 287 0 V 287 181 V 286 0 V 287 128 V 287 100 V 287 309 V 287 150 V 287 490 V 287 11 V 286 0 V 287 -11 V 287 0 V 287 -11 V 287 11 V 287 11 V 287 0 V 286 0 V 287 0 V 287 20 V 4073 210 Crs 875 939 Crs 1162 939 Crs 1449 1120 Crs 1735 1120 Crs 2022 1248 Crs 2309 1348 Crs 2596 1657 Crs 2883 1807 Crs 3170 2297 Crs 3457 2308 Crs 3743 2308 Crs 4030 2297 Crs 4317 2297 Crs 4604 2286 Crs 4891 2297 Crs 5178 2308 Crs 5465 2308 Crs 5751 2308 Crs 6038 2308 Crs 6325 2328 Crs stroke grestore end showpage %%EndDocument endTexFig 1096 5188 a Fh(Figure)f(2:)29 b(Example)24 b(Serv)o(er)g(Performance)h (Graph)p eop %%Page: 4 4 4 3 bop 0 91 a Fh(come)20 b(saturated)j(at)d(a)g(load)g(of)h(800)f (calls)h(per)g(second.)29 b(As)0 204 y(of)n(fered)i(load)g(is)f (increased)j(be)o(yond)e(that)g(point,)h(serv)o(er)0 317 y(throughput)k(starts)d(to)f(f)o(all)h(of)n(f)f(slightly)j(as)d(an) g(increas-)0 430 y(ing)27 b(amount)h(of)f(time)f(is)h(spent)h(in)f(the) g(k)o(ernel)h(to)f(handle)0 543 y(netw)o(ork)37 b(pack)o(ets)h(for)e (calls)h(that)f(will)g(f)o(ail)g(e)n(v)o(entually)0 656 y(\(due)23 b(to)e(client)i(timeouts\).)30 b(This)22 b(is)g(also)g (re\003ected)h(in)f(the)0 769 y(error)38 b(graph,)k(which)c(sho)n(ws)f (the)h(percentage)i(of)d(calls)0 882 y(that)c(f)o(ailed:)50 b(once)34 b(the)f(serv)o(er)h(is)e(saturated,)38 b(the)33 b(num-)0 995 y(ber)28 b(of)g(calls)h(that)g(f)o(ail)f(increases)j (quickly)f(as)e(more)g(and)0 1108 y(more)j(calls)h(e)o(xperience)i(e)o (xcessi)n(v)o(e)f(delays.)53 b(The)30 b(third)0 1220 y(and)f(\002nal)f(graph)i(in)f(the)f(\002gure)h(sho)n(ws)g(the)g(a)n(v) o(erage)h(re-)0 1333 y(sponse)g(time)e(for)h(successful)i(calls.)44 b(The)28 b(graph)i(sho)n(ws)0 1446 y(that)d(response)h(time)e(starts)i (out)e(at)g(about)i(2ms)e(and)g(then)0 1559 y(gradually)35 b(increases)g(until)e(the)g(serv)o(er)h(becomes)f(satu-)0 1672 y(rated.)71 b(Be)o(yond)37 b(that)h(point,)k(response)d(time)e (for)h(suc-)0 1785 y(cessful)c(calls)f(remains)g(lar)n(gely)i(constant) f(at)e(43ms)h(per)0 1898 y(call.)0 2345 y Ff(3)99 b(Design)0 2690 y Fh(The)26 b(tw)o(o)g(main)g(design)i(goals)g(of)e(httperf)i (were)e(\(a\))h(pre-)0 2803 y(dictable)j(and)e(good)h(performance)h (and)e(\(b\))g(ease)h(of)e(e)o(x-)0 2916 y(tensibility)-6 b(.)61 b(Good)34 b(performance)i(is)d(achie)n(v)o(ed)i(by)f(im-)0 3029 y(plementing)24 b(the)e(tool)g(in)g(C)f(and)h(paying)h(attention)h (to)e(the)0 3142 y(performance)j(critical)f(e)o(x)o(ecution)h(paths.)k (Predictability)0 3255 y(is)k(impro)o(v)o(ed)g(by)g(relying)h(as)f (little)h(as)e(possible)j(on)e(the)0 3368 y(underlying)c(OS.)24 b(F)o(or)h(e)o(xample,)i(httperf)g(is)f(designed)i(to)0 3481 y(run)19 b(as)g(a)f(single-threaded)24 b(process)c(using)g (non-blocking)0 3593 y(I/O)33 b(to)g(communicate)i(with)f(the)f(serv)o (er)i(and)f(with)f(one)0 3706 y(process)42 b(per)e(client)h(machine.)79 b(W)l(ith)41 b(this)f(approach,)0 3819 y(CPU)31 b(scheduling)37 b(is)c(tri)n(vial)i(for)f(the)f(OS)f(which)i(mini-)0 3932 y(mizes)g(the)g(risk)g(of)g(e)o(xcessi)n(v)o(e)h(conte)o(xt)g (switching)h(and)0 4045 y(poor)46 b(scheduling)j(decisions.)97 b(Another)47 b(e)o(xample)f(is)0 4158 y(timeout)h(management:)76 b(rather)47 b(than)g(depending)i(on)0 4271 y(OS-mechanisms,)35 b(httperf)f(implements)f(its)f(o)n(wn,)i(spe-)0 4384 y(cialized)g(and)e(light-weight)i(timer)e(management)h(f)o(acil-)0 4497 y(ity)g(that)g(a)n(v)n(oids)h(e)o(xpensi)n(v)o(e)h(system)e(calls) g(and)g(POSIX)0 4610 y(signal)25 b(deli)n(v)o(ery)g(where)n(v)o(er)f (possible.)0 4835 y(Based)38 b(on)g(e)o(xperiences)i(with)e(an)g (earlier)h(test)f(tool,)j(it)0 4948 y(w)o(as)j(clear)h(that)g(httperf)h (will)e(under)n(go)j(f)o(airly)e(e)o(xten-)0 5061 y(si)n(v)o(e)30 b(changes)j(during)f(its)e(lifetime.)51 b(T)-7 b(o)29 b(accommodate)0 5174 y(this)41 b(need)g(for)f(change,)45 b(httperf)d(is)e(logically)j(di)n(vided)0 5287 y(into)37 b(three)g(dif)n(ferent)g(parts:)56 b(the)36 b(core)g(HTTP)e(engine,)0 5400 y(w)o(orkload)29 b(generation,)h(and)e(statistics)h(collection.)42 b(The)2010 91 y(HTTP)29 b(engine)k(handles)g(all)f(communication)i (with)d(the)2010 204 y(serv)o(er)k(and)g(as)f(such)h(tak)o(es)g(care)g (of)f(connection)j(man-)2010 317 y(agement)j(and)g(HTTP)c(request)41 b(generation)h(and)d(reply)2010 430 y(handling.)65 b(W)-7 b(orkload)36 b(generation)i(is)d(responsible)j(for)2010 543 y(initiating)g(appropriate)h(HTTP)33 b(calls)j(at)g(the)g (appropri-)2010 656 y(ate)23 b(times)f(so)h(a)f(particular)j(w)o (orkload)f(is)e(induced)i(on)f(the)2010 769 y(serv)o(er)-5 b(.)69 b(The)36 b(third)h(part,)j(statistics)f(collection,)k(is)36 b(re-)2010 882 y(sponsible)25 b(for)e(measuring)h(v)n(arious)g (quantities)i(and)d(pro-)2010 995 y(ducing)j(rele)n(v)n(ant)f (performance)i(statistics.)33 b(Interactions)2010 1108 y(between)k(these)g(three)f(parts)h(occur)g(through)g(a)f(simple)2010 1220 y(yet)31 b(general)i(e)n(v)o(ent)e(signalling)i(mechanism.)52 b(The)31 b(idea)2010 1333 y(is)36 b(that)h(whene)n(v)o(er)g(something)h (interesting)h(occurs)f(in-)2010 1446 y(side)23 b(httperf,)h(an)f(e)n (v)o(ent)g(is)f(signalled.)31 b(P)o(arties)23 b(interested)2010 1559 y(in)18 b(observing)j(a)c(particular)k(e)n(v)o(ent)e(can)f(re)o (gister)i(a)d(handler)2010 1672 y(for)22 b(the)g(e)n(v)o(ent.)29 b(These)22 b(handlers)i(are)f(in)l(v)n(ok)o(ed)h(whene)n(v)o(er)2010 1785 y(the)e(e)n(v)o(ent)g(is)g(signalled.)30 b(F)o(or)21 b(e)o(xample,)i(the)f(basic)h(statis-)2010 1898 y(tics)36 b(collector)i(measures)g(the)e(time)g(it)f(tak)o(es)i(to)f(estab-)2010 2011 y(lish)22 b(a)f(TCP)e(connection)24 b(by)d(re)o(gistering)j(e)n(v) o(ents)e(handler)2010 2124 y(for)35 b(the)g(e)n(v)o(ents)h(that)g (signal)g(the)f(initiation)j(and)d(estab-)2010 2237 y(lishment)h(of)f (a)f(connection,)41 b(respecti)n(v)o(ely)-6 b(.)66 b(Similarly)-6 b(,)2010 2350 y(a)32 b(w)o(orkload)i(generator)h(responsible)h(for)c (generating)k(a)2010 2462 y(particular)i(URL)c(access)k(pattern)f(can)g (re)o(gister)g(a)e(han-)2010 2575 y(dler)d(for)g(the)f(e)n(v)o(ent)h (indicating)i(the)e(creation)i(of)d(a)g(ne)n(w)2010 2688 y(call.)k(Whene)n(v)o(er)27 b(this)f(handler)i(gets)e(in)l(v)n(ok)o (ed,)i(the)e(URL)2010 2801 y(generator)36 b(can)e(insert)h(the)e (appropriate)k(URL)32 b(into)i(the)2010 2914 y(call)27 b(without)g(ha)n(ving)i(to)d(concern)j(itself)e(with)f(the)h(other)2010 3027 y(aspects)e(of)f(call)g(creation)h(and)f(handling.)2010 3360 y Fg(3.1)92 b(Sustaining)23 b(Ov)o(erload)2010 3706 y Fh(As)31 b(alluded)j(to)d(earlier)l(,)36 b(an)c(important)h(design)h (issue)e(is)2010 3819 y(ho)n(w)e(to)h(sustain)i(an)e(of)n(fered)h(load) f(that)h(e)o(xceed)g(the)f(ca-)2010 3932 y(pacity)d(of)f(the)h(web)e (serv)o(er)-5 b(.)40 b(The)27 b(problem)h(is)f(that)g(once)2010 4045 y(the)35 b(of)n(fered)i(rate)e(e)o(xceeds)i(the)e(serv)o(er')-5 b(s)37 b(capacity)-6 b(,)40 b(the)2010 4158 y(client)34 b(starts)h(b)n(uilding)g(up)f(resources)h(at)e(a)g(rate)h(that)f(is) 2010 4271 y(proportional)f(to)d(the)g(dif)n(ference)j(between)e(of)n (fered)g(and)2010 4384 y(sustained)36 b(rate.)57 b(Since)33 b(each)h(client)g(has)g(only)g(a)e(\002nite)2010 4497 y(amount)i(of)g(resources)i(a)n(v)n(ailable,)h(sooner)e(or)f(later)g (the)2010 4610 y(client)d(w)o(ould)f(run)g(out)g(of)f(resources)j(and)e (therefore)i(be)2010 4723 y(unable)27 b(to)f(generate)i(an)o(y)e(ne)n (w)f(requests.)38 b(F)o(or)25 b(e)o(xample,)2010 4835 y(suppose)k(that)f(each)g(httperf)h(process)g(can)f(ha)n(v)o(e)g(at)f (most)2010 4948 y(2,000)33 b(TCP)d(connection)35 b(open)f(at)e(an)o(y)g (gi)n(v)o(en)h(time.)54 b(If)2010 5061 y(the)23 b(dif)n(ference)i (between)f(of)n(fered)g(and)f(sustained)i(rate)e(is)2010 5174 y(100)34 b(requests)i(per)e(second,)j(a)c(test)h(could)h(last)f (at)f(most)2010 5287 y(20)28 b(seconds.)43 b(Since)28 b(web)g(serv)o(er)g(tests)h(usually)h(require)2010 5400 y(minutes)h(to)g(reach)g(a)f(stable)h(state,)i(such)e(short)g(test)g (du-)p eop %%Page: 5 5 5 4 bop 0 91 a Fh(rations)40 b(are)f(unacceptable.)78 b(T)-7 b(o)38 b(solv)o(e)h(this)g(problem,)0 204 y(httperf)f(times)e (out)h(calls)g(that)g(ha)n(v)o(e)g(been)g(w)o(aiting)g(for)0 317 y(a)31 b(serv)o(er)i(response)h(for)d(too)h(long.)54 b(The)31 b(length)i(of)f(this)0 430 y(timeout)27 b(can)e(be)h(selected) h(through)h(command-line)g(op-)0 543 y(tions.)0 769 y(W)l(ith)20 b(this)h(timeout)g(approach,)i(the)d(amount)h(of)f(client)h(re-)0 882 y(sources)28 b(used)f(up)f(by)h(httperf)h(is)e(bounded)i(by)f(the)f (time-)0 995 y(out)40 b(v)n(alue.)77 b(In)39 b(the)h(w)o(orst)g(case)g (scenario)h(where)f(the)0 1108 y(serv)o(er)g(does)f(not)g(respond)i(at) e(all,)j(httperf)e(will)f(ne)n(v)o(er)0 1220 y(use)33 b(more)g(than)h(the)f(amount)g(of)g(resources)i(consumed)0 1333 y(while)30 b(running)i(httperf)g(for)e(the)h(duration)h(of)e(the)g (time-)0 1446 y(out)25 b(v)n(alue.)32 b(F)o(or)24 b(e)o(xample,)h(if)f (connections)k(are)d(initiated)0 1559 y(at)e(a)f(rate)h(of)g(100)h(per) f(second)h(and)f(the)h(timeout)f(is)g(5)g(sec-)0 1672 y(onds,)35 b(at)d(most)g(500)g(connections)k(w)o(ould)c(be)g(in)g(use)g (at)0 1785 y(an)o(y)24 b(gi)n(v)o(en)g(time.)0 2183 y Fg(3.1.1)92 b(Limits)23 b(to)g(Client-Sustainable)h(Load)0 2478 y Fh(It)i(is)g(interesting)k(to)c(consider)j(just)e(what)f(e)o (xactly)i(limits)0 2591 y(the)22 b(of)n(fered)h(load)f(a)f(client)i (can)f(sustain.)30 b(Apart)21 b(from)h(the)0 2704 y(ob)o(vious)33 b(limit)d(that)i(the)f(client')-5 b(s)33 b(CPU)c(imposes,)k(there)0 2817 y(is)23 b(a)g(surprising)j(v)n(ariety)f(of)f(resources)i(that)d (can)h(become)0 2930 y(the)36 b(\002rst-order)h(bottleneck.)68 b(It)35 b(is)h(important)h(to)e(k)o(eep)0 3043 y(these)40 b(limits)f(in)g(mind)f(so)h(as)g(to)g(a)n(v)n(oid)h(the)f(pitf)o(all)h (of)0 3156 y(mistaking)33 b Fd(client)h Fh(performance)f(limits)f(as)f Fd(server)j Fh(per)n(-)0 3269 y(formance)i(limits.)63 b(The)34 b(three)i(most)f(important)h(client)0 3382 y(bottlenecks)31 b(we)c(ha)n(v)o(e)h(identi\002ed)h(so)f(f)o(ar)g(are)g(described)0 3495 y(belo)n(w)-6 b(.)0 3819 y Fg(Size)23 b(of)h(TCP)d(port)j(space:) 46 b Fh(TCP)17 b(port)j(numbers)g(are)f(16)182 3932 y(bits)25 b(wide.)33 b(Of)24 b(the)i(64K)e(a)n(v)n(ailable)k(port)d(numbers,)182 4045 y(1,024)c(are)f(typically)i(reserv)o(ed)g(for)e(pri)n(vile)o(ged)j (pro-)182 4158 y(cesses.)40 b(This)27 b(means)h(that)f(a)g(client)h (machine)h(run-)182 4271 y(ning)34 b(httperf)h(can)f(mak)o(e)g(use)g (of)g(at)f(most)h(64,512)182 4384 y(port)48 b(numbers.)101 b(Since)47 b(a)g(gi)n(v)o(en)g(port)h(number)182 4497 y(cannot)33 b(be)f(reused)i(until)f(the)f(TCP)e(TIME)p 1607 4497 28 4 v 32 w(W)-11 b(AIT)182 4610 y(state)24 b(e)o(xpires,)g(this)g(can)g(seriously)h(limit)f(the)f(client)182 4723 y(sustainable)39 b(of)n(fered)e(rate.)65 b(Speci\002cally)-6 b(,)40 b(with)c(a)182 4835 y(1)f(minute)h(timeout)g(\(common)g(for)f (BSD-deri)n(v)o(ed)182 4948 y(OSes\))20 b(the)g(maximum)h(sustainable)i (rate)e(per)g(client)182 5061 y(is)31 b(about)h(1,075)g(requests)h(per) e(second.)53 b(W)l(ith)32 b(the)182 5174 y(RFC-793)39 b([5)q(])f(recommended)k(v)n(alue)e(of)f(4)g(min-)182 5287 y(utes,)22 b(the)f(maximum)g(rate)g(w)o(ould)h(drop)f(to)g(just)h (268)182 5400 y(requests)j(per)f(second.)2010 91 y Fg(Number)e(of)h (open)g(\002le)g(descriptors:)48 b Fh(Most)28 b(operating)2192 204 y(systems)39 b(limit)f(both)h(the)g Fd(total)g Fh(and)g Fd(per)n(-pr)l(ocess)2192 317 y Fh(number)27 b(of)f(\002le)f (descriptors)k(that)d(can)h(be)f(opened.)2192 430 y(The)h(system-wide)i (number)f(of)f(open)h(\002les)f(is)g(nor)n(-)2192 543 y(mally)i(not)g(a)g(limiting)h(f)o(actor)g(and)f(hence)h(we)f(will)2192 656 y(focus)36 b(on)g(the)f(latter)-5 b(.)65 b(T)-7 b(ypical)36 b(per)n(-process)i(lim-)2192 769 y(its)30 b(are)h(in)f(the)h(range)g (from)f(256)h(to)f(2,048.)50 b(Since)2192 882 y(a)33 b(\002le)h(descriptor)j(can)d(be)g(reused)i(as)e(soon)h(as)f(an)2192 995 y(earlier)44 b(descriptor)i(has)d(been)g(closed,)49 b(the)43 b(TCP)2192 1108 y(TIME)p 2420 1108 V 32 w(W)-11 b(AIT)44 b(state)j(plays)g(no)f(role)g(here.)97 b(In-)2192 1220 y(stead,)42 b(the)37 b(duration)j(that)e(is)f(of)h(interest)h (here)f(is)2192 1333 y(the)c(httperf)i(timeout)f(v)n(alue.)61 b(Assuming)35 b(a)e(v)n(alue)2192 1446 y(of)24 b(5)g(seconds)j(and)e(a) f(limit)g(of)h(2,000)g(open)g(\002le)f(de-)2192 1559 y(scriptors)d(per)f(process,)i(a)d(maximum)g(rate)h(of)f(about)2192 1672 y(400)39 b(requests)i(per)d(second)j(could)e(be)g(sustained.)2192 1785 y(If)29 b(this)i(becomes)g(the)f(\002rst-order)i(bottleneck)h(in)d (a)2192 1898 y(client,)23 b(it)f(is)h(possible)h(to)f(a)n(v)n(oid)g(it) g(either)g(by)g(tuning)2192 2011 y(the)32 b(OS)f(to)h(allo)n(w)g(a)g (lar)n(ger)i(number)f(of)g(open)g(\002le)2192 2124 y(descriptors)g(or)e (by)g(decreasing)i(the)e(httperf)h(time-)2192 2237 y(out)38 b(v)n(alue.)71 b(Note)38 b(that)g(decreasing)i(the)e(timeout)2192 2350 y(v)n(alue)c(ef)n(fecti)n(v)o(ely)h(truncates)g(the)f(lifetime)g (distri-)2192 2462 y(b)n(ution)28 b(of)e(TCP)e(connections.)41 b(This)26 b(ef)n(fect)i(has)e(to)2192 2575 y(be)h(tak)o(en)i(into)f (consideration)j(when)c(selecting)j(an)2192 2688 y(appropriate)24 b(v)n(alue.)29 b(Another)22 b(seemingly)h(ob)o(vious)2192 2801 y(solution)41 b(w)o(ould)f(be)f(to)g(run)g(multiple)i(processes) 2192 2914 y(on)28 b(a)g(single)h(machine.)44 b(Ho)n(we)n(v)o(er)l(,)29 b(as)f(will)g(be)g(e)o(x-)2192 3027 y(plained)g(in)e(Section)h(4.1,)g (there)g(are)f(other)h(reasons)2192 3140 y(that)d(mak)o(e)g(this)g (approach)i(undesirable.)2010 3481 y Fg(Sock)o(et)d(b)n(uffer)h (memory:)46 b Fh(Each)87 b(TCP)d(connection)2192 3593 y(contains)30 b(a)e(sock)o(et)h(recei)n(v)o(e)g(and)g(send)g(b)n(uf)n (fer)-5 b(.)43 b(By)2192 3706 y(def)o(ault,)56 b(httperf)50 b(limits)f(send)g(b)n(uf)n(fers)h(to)e(4KB)2192 3819 y(and)39 b(recei)n(v)o(e)h(b)n(uf)n(fers)h(to)e(16KB.)f(W)l(ith)i (limits)f(in)2192 3932 y(the)30 b(kilobyte)i(range,)g(these)f(b)n(uf)n (fers)g(are)f(typically)2192 4045 y(the)42 b(dominant)i(per)n (-connection)i(costs)d(as)f(f)o(ar)g(as)2192 4158 y(httperf)54 b(memory)e(consumption)k(is)c(concerned.)2192 4271 y(The)38 b(of)n(fered)i(load)f(that)g(a)f(client)i(can)f(sustain)h(is)2192 4384 y(therefore)c(also)e(limited)g(by)f(ho)n(w)g(much)h(memory)2192 4497 y(is)g(a)n(v)n(ailable)i(for)e(sock)o(et)i(b)n(uf)n(fers.)62 b(F)o(or)33 b(e)o(xample,)2192 4610 y(with)50 b(40MB)h(a)n(v)n(ailable) i(for)e(sock)o(et)h(b)n(uf)n(fers,)59 b(a)2192 4723 y(client)33 b(could)g(sustain)g(at)f(most)g(2,048)g(concurrent)2192 4835 y(TCP)67 b(connections)73 b(\(assuming)f(a)d(w)o(orst-case)2192 4948 y(scenario)23 b(where)e(all)g(send)h(and)f(recei)n(v)o(e)h(b)n(uf) n(fers)h(are)2192 5061 y(full\).)43 b(This)27 b(limit)h(is)g(rarely)h (encountered,)j(b)n(ut)d(for)2192 5174 y(memory-constrained)42 b(clients,)h(httperf)d(supports)2192 5287 y(options)d(to)f(select)h (smaller)f(limits)g(for)g(the)g(send-)2192 5400 y(and)24 b(recei)n(v)o(e-b)n(uf)n(fers.)p eop %%Page: 6 6 6 5 bop 0 91 a Fh(The)28 b(abo)o(v)o(e)g(list)h(of)f(potential)j (client)e(performance)i(bot-)0 204 y(tlenecks)g(is)e(of)g(course)i(by)e (no)g(means)h(e)o(xhausti)n(v)o(e.)47 b(F)o(or)0 317 y(e)o(xample,)56 b(older)50 b(OSes)f(often)h(e)o(xhibit)g(poor)g (perfor)n(-)0 430 y(mance)23 b(when)f(f)o(aced)h(with)f(se)n(v)o(eral)h (hundred)h(concurrent)0 543 y(TCP)i(connections.)46 b(Since)28 b(it)g(is)g(often)i(dif)n(\002cult)f(to)f(pre-)0 656 y(dict)e(the)g(e)o(xact)g(rate)g(at)f(which)h(a)f(client)h(will)f (start)i(to)e(be-)0 769 y(come)k(the)g(performance)i(bottleneck,)h(it)d (is)f(essential)j(to)0 882 y(empirically)c(v)o(erify)f(that)g(observ)o (ed)h(performance)h(is)d(in-)0 995 y(deed)37 b(a)g(re\003ection)h(of)e (the)h(serv)o(er')-5 b(s)38 b(capacity)h(and)e(not)0 1108 y(that)26 b(of)g(the)f(client')-5 b(s.)37 b(A)24 b(safe)i(w)o(ay)g(to)f(achie)n(v)o(e)i(this)f(is)f(to)0 1220 y(v)n(ary)c(the)g(number)g(of)g(test)g(clients,)h(making)g(sure)f (that)g(the)0 1333 y(observ)o(ed)f(performance)h(is)d(independent)k(of) c(the)g(number)0 1446 y(of)23 b(client)i(machines)g(that)f(participate) j(in)c(the)h(test.)0 1750 y Fg(3.2)92 b(Measuring)23 b(Thr)n(oughput)0 2067 y Fh(Conceptually)-6 b(,)35 b(measuring)d (throughput)i(is)c(simple:)43 b(is-)0 2179 y(sue)24 b(a)g(certain)i (number)f(of)f(requests,)i(count)f(the)f(number)0 2292 y(of)34 b(replies)h(recei)n(v)o(ed)h(and)e(di)n(vide)h(that)g(number)g (by)f(the)0 2405 y(time)23 b(it)g(took)h(to)f(complete)h(the)f(test.)29 b(This)23 b(approach)j(has)0 2518 y(unfortunately)35 b(tw)o(o)c(problems:)46 b(\002rst,)32 b(to)f(get)h(a)e(quanti-)0 2631 y(tati)n(v)o(e)38 b(idea)h(of)e(the)h(rob)n(ustness)j(of)d(a)f (particular)j(mea-)0 2744 y(surement,)34 b(it)d(is)g(necessary)i(to)e (run)h(the)f(same)g(test)h(se)n(v-)0 2857 y(eral)25 b(times.)34 b(Since)25 b(each)h(test)f(run)h(is)f(lik)o(ely)h(to)f(tak)o(e)h(se)n (v-)0 2970 y(eral)i(minutes,)h(a)e(f)o(air)h(amount)h(of)e(time)g(has)h (to)g(be)f(spent)0 3083 y(to)33 b(obtain)i(just)e(a)g(single)i(data)e (point.)59 b(Equally)34 b(impor)n(-)0 3196 y(tant,)39 b(computing)e(only)g(one)f(throughput)i(estimate)f(for)0 3309 y(the)i(entire)i(test)e(hides)i(v)n(ariations)g(that)f(may)f (occur)h(at)0 3421 y(time)29 b(scales)h(shorter)g(than)g(that)f(of)g (the)g(entire)h(test.)45 b(F)o(or)0 3534 y(these)26 b(reasons,)h (httperf)g(samples)f(the)f(reply)h(throughput)0 3647 y(once)33 b(e)n(v)o(ery)g(\002)n(v)o(e)f(seconds.)57 b(The)32 b(throughput)k(samples)0 3760 y(can)g(optionally)j(be)c (printed)j(in)e(addition)h(to)f(the)g(usual)0 3873 y(statistics.)h (This)25 b(allo)n(ws)h(observing)i(throughput)h(during)0 3986 y(all)g(phases)i(of)e(a)f(test.)46 b(Also,)30 b(with)f(a)f(sample) i(period)g(of)0 4099 y(5)f(seconds,)i(running)g(a)e(test)g(for)g(at)g (least)h(3)e(minutes)i(re-)0 4212 y(sults)24 b(in)f(enough)i (throughput)h(samples)e(that)f(con\002dence)0 4325 y(interv)n(als)30 b(can)e(be)g(computed)h(without)g(ha)n(ving)g(to)f(mak)o(e)0 4438 y(assumptions)e(on)e(the)g(distrib)n(ution)j(of)c(the)h(samples)h ([3)q(].)0 4857 y Ff(4)99 b(Implementation)0 5174 y Fh(In)33 b(this)h(section,)j(we)32 b(\002rst)h(present)i(the)f(capabilities)i (of)0 5287 y(the)c(current)i(v)o(ersion)g(of)e(httperf)i(and)e(then)h (we)e(discuss)0 5400 y(some)23 b(of)f(the)h(more)g(subtle)h (implementation)i(issues)e(dis-)2010 91 y(co)o(v)o(ered)29 b(so)f(f)o(ar)-5 b(.)41 b(In)28 b(the)g(third)h(part,)g(we)e(mention)i (some)2010 204 y(possible)d(future)f(directions)h(for)e(httperf.)2010 430 y(The)d(HTTP)e(core)i(engine)i(in)e(httperf)i(currently)h(supports) 2010 543 y(both)37 b(HTTP/1.0)d(and)j(HTTP/1.1.)64 b(Among)36 b(the)g(more)2010 656 y(interesting)g(features)f(of)d(this)i(engine)g (are)f(support)i(for:)2010 769 y(persistent)f(connections,)j(request)d (pipelining,)i(and)c(the)2010 882 y(\223chunk)o(ed\224)41 b(transfer)n(-encoding)i([2)q(,)37 b(4].)71 b(Higher)n(-le)n(v)o(el) 2010 995 y(HTTP)20 b(processing)26 b(is)d(enabled)i(by)e(the)h(f)o(act) f(that)h(the)f(en-)2010 1108 y(gine)32 b(e)o(xposes)i(each)e(reply)h (header)n(-line)i(and)d(all)g(of)g(the)2010 1220 y(reply)22 b(body)f(to)g(the)g(other)g(parts)h(of)e(httperf)j(by)d(signalling)2010 1333 y(appropriate)33 b(e)n(v)o(ents.)50 b(F)o(or)29 b(e)o(xample,)j(when)e(one)h(of)f(the)2010 1446 y(w)o(orkload)41 b(generators)i(required)f(simple)e(cookie)h(sup-)2010 1559 y(port,)27 b(the)f(necessary)i(changes)g(were)e(implemented)i(and) 2010 1672 y(tested)d(in)e(a)g(matter)h(of)g(hours.)2010 1898 y(The)c(current)j(v)o(ersion)f(of)f(httperf)i(supports)g(tw)o(o)d (kinds)i(of)2010 2011 y(w)o(orkload)32 b(generators:)45 b(request)32 b(generators)h(and)e(URL)2010 2124 y(generators.)2010 2438 y Fg(Request)23 b(Generation:)47 b Fh(Request)d(generators)i (initiate)2192 2551 y(HTTP)51 b(calls)j(at)g(the)g(appropriate)j (times.)119 b(At)2192 2664 y(present,)22 b(there)f(are)f(tw)o(o)f(such) i(generators:)30 b(the)21 b(\002rst)2192 2777 y(one)40 b(generates)i(ne)n(w)d(connections)k(deterministi-)2192 2890 y(cally)33 b(and)f(at)g(a)g(\002x)o(ed)g(rate)h(and)f(each)h (connection)2192 3002 y(is)h(used)g(to)g(perform)h(a)f(command-line)i (speci\002ed)2192 3115 y(number)30 b(of)g(pipelined)i(HTTP)27 b(calls.)47 b(By)29 b(def)o(ault,)2192 3228 y(the)k(number)h(of)f (pipelined)j(calls)e(per)f(connection)2192 3341 y(is)i(one,)k(which)c (yields)i(HTTP/1.0-lik)o(e)f(beha)n(vior)2192 3454 y(in)25 b(the)h(sense)h(that)f(each)h(connection)i(is)c(used)i(for)f(a)2192 3567 y(single)f(call)f(and)g(is)f(closed)i(afterw)o(ards.)2192 3726 y(The)h(second)i(request)g(generator)h(creates)f Fd(sessions)2192 3839 y Fh(deterministically)g(and)c(at)g(a)f(\002x)o (ed)h(rate.)30 b(Each)24 b(ses-)2192 3952 y(sion)42 b(consists)i(of)d (a)g(speci\002ed)i(number)f(of)f(call-)2192 4065 y(b)n(ursts)20 b(that)f(are)g(spaced)h(out)f(by)g(the)g(command-line)2192 4178 y(speci\002ed)25 b Fd(user)g(think-time)p Fh(.)32 b(Each)24 b(call-b)n(urst)i(con-)2192 4291 y(sists)38 b(of)e(a)h(\002x)o(ed)f(number)i(of)f(calls.)70 b(Call-b)n(ursts)2192 4404 y(mimic)37 b(the)g(typical)i(bro)n(wser)f(beha)n(vior)h(where)f(a) 2192 4517 y(user)24 b(clicks)h(on)e(a)g(link)h(which)g(causes)h(the)e (bro)n(wser)2192 4630 y(to)35 b(\002rst)f(request)j(the)e(selected)i (HTML)c(page)j(and)2192 4743 y(then)24 b(the)g(objects)h(embedded)h(in) d(it.)2010 4948 y Fg(URL)f(Generation:)47 b Fh(URL)30 b(generators)35 b(create)e(the)g(de-)2192 5061 y(sired)44 b(sequence)i(of)e(URLs)e(that)i(should)h(be)f(ac-)2192 5174 y(cessed)28 b(on)e(the)h(serv)o(er)-5 b(.)39 b(The)26 b(most)g(primiti)n(v)o(e)h(gen-)2192 5287 y(erator)35 b(simply)f(generates)i(the)d(same,)j(command-)2192 5400 y(line)24 b(speci\002ed)h(URL)c(o)o(v)o(er)j(and)g(o)o(v)o(er)f(again.) p eop %%Page: 7 7 7 6 bop 182 91 a Fh(The)18 b(second)i(generator)i(w)o(alks)d(through)h (a)f(\002x)o(ed)f(set)182 204 y(of)30 b(URLs)e(at)h(a)h(gi)n(v)o(en)g (rate.)48 b(W)l(ith)30 b(this)h(generator)l(,)182 317 y(the)25 b(web)g(pages)i(are)e(assumed)i(to)e(be)g(or)n(ganized)j(as) 182 430 y(a)23 b(10ary)i(directory)i(tree)d(\(each)h(directory)h (contains)182 543 y(up)c(to)f(ten)h(\002les)g(or)f(sub-directories\))27 b(on)22 b(the)g(serv)o(er)-5 b(.)182 656 y(This)37 b(generator)i(is)e (useful,)42 b(for)37 b(e)o(xample,)k(to)c(in-)182 769 y(duce)c(a)f(speci\002c)i(\002le)d(b)n(uf)n(fer)j(cache)g(miss)e(rate)h (on)182 882 y(the)24 b(serv)o(er)g(under)h(test.)0 1164 y(As)f(f)o(ar)h(as)f(statistics)j(collectors)g(are)e(concerned,)j (httperf)0 1277 y(al)o(w)o(ays)46 b(collects)h(and)f(prints)g(the)g (basic)g(information)0 1390 y(sho)n(wn)25 b(in)f(Figure)i(1.)31 b(The)25 b(only)g(other)h(statistics)h(collec-)0 1503 y(tor)33 b(at)f(this)h(time)g(is)f(one)h(that)g(collects)i (session-related)0 1616 y(information.)61 b(It)33 b(measures)i(similar) f(quantities)j(as)c(the)0 1728 y(basic)25 b(connection)j(statistics)e (with)e(the)h(main)f(dif)n(ference)0 1841 y(being)36 b(that)g(the)f(unit)h(of)f(measurement)i(is)e(the)g(session)0 1954 y(instead)25 b(of)f(the)g(connection.)0 2180 y(W)-7 b(e)24 b(no)n(w)g(proceed)j(to)e(discuss)i(some)e(of)g(the)g(implemen-) 0 2293 y(tation)32 b(issues)f(that)g(conspire)i(to)d(raise)h(the)g(dif) n(\002culty)g(to)0 2406 y(write)24 b(a)f(rob)n(ust)i(high-performance)j (test)c(tool.)0 2711 y Fg(4.1)92 b(Scheduling)22 b(Granularity)0 3029 y Fh(The)f(process)i(scheduling)h(granularity)h(of)c(today')-5 b(s)23 b(OSes)0 3142 y(is)i(in)h(the)f(millisecond)j(range.)36 b(Some)24 b(support)k(one)d(mil-)0 3255 y(lisecond,)d(b)n(ut)d(most)g (use)h(a)e(timer)h(tick)h(of)f(around)h(10)f(mil-)0 3368 y(liseconds.)57 b(This)32 b(often)i(se)n(v)o(erely)f(limits)g(the)f (accurac)o(y)0 3481 y(with)23 b(which)g(a)f(gi)n(v)o(en)i(w)o(orkload)g (can)f(be)g(generated.)31 b(F)o(or)0 3593 y(e)o(xample,)h(with)e(a)f (timer)h(tick)g(of)g(10)g(milliseconds,)k(de-)0 3706 y(terministically)25 b(generating)g(a)d(rate)g(of)g(150)h(requests)h (per)0 3819 y(second)32 b(w)o(ould)f(ha)n(v)o(e)g(to)g(be)f (implemented)j(by)d(sending)0 3932 y(one)g(request)h(during)g(e)n(v)o (en-numbered)i(timer)c(ticks)i(and)0 4045 y(tw)o(o)21 b(requests)j(during)f(odd-numbered)i(ticks.)k(While)22 b(the)0 4158 y(a)n(v)o(erage)30 b(rate)e(is)g(achie)n(v)o(ed,)j(the)e (b)n(ursts)g(sent)g(during)h(the)0 4271 y(odd-number)41 b(ticks)e(could)g(cause)g(serv)o(er)n(-queue)j(o)o(v)o(er)n(-)0 4384 y(\003o)n(ws)21 b(that)h(in)g(turn)g(could)h(se)n(v)o(erely)g(af)n (fect)g(the)f(observ)o(ed)0 4497 y(beha)n(vior)-5 b(.)74 b(This)37 b(is)h(not)g(to)g(say)g(that)g(measuring)i(web)0 4610 y(serv)o(ers)35 b(with)e(b)n(ursty)j(traf)n(\002c)d(is)h(a)f(bad)h (idea)g(\(quite)h(the)0 4723 y(opposite)28 b(is)e(true\),)h(ho)n(we)n (v)o(er)l(,)g(the)g(problem)g(here)g(is)f(that)0 4835 y(b)n(urstiness)39 b(w)o(as)d(introduced)k(due)d(to)f(the)h(OS,)d(not)j (be-)0 4948 y(cause)25 b(the)e(tester)i(requested)h(it.)0 5174 y(T)-7 b(o)28 b(a)n(v)n(oid)k(depending)g(on)e(OS)e(scheduling)k (granularity)-6 b(,)0 5287 y(httperf)29 b(e)o(x)o(ecutes)f(in)f(a)g (tight)h(loop)g(that)g(checks)g(for)g(net-)0 5400 y(w)o(ork)20 b(I/O)f(acti)n(vity)j(via)e Fd(select\(\))i Fh(and)f(k)o(eeps)g(track)g (of)f(real)2010 91 y(time)38 b(via)h Fd(g)o(ettimeofday\(\))p Fh(.)78 b(This)38 b(means)h(that)h(httperf)2010 204 y(consumes)28 b(all)f(a)n(v)n(ailable)h(CPU)d(c)o(ycles)i(\(on)g(a)f(multipro-)2010 317 y(cessor)37 b(client,)i(only)d(one)g(CPU)e(will)h(be)g(k)o(ept)i(b) n(usy)f(in)2010 430 y(this)g(w)o(ay\).)65 b(This)36 b(approach)i(w)o (orks)e(\002ne)f(because)j(the)2010 543 y(only)g(other)f(important)i (acti)n(vity)f(is)f(the)g(asynchronous)2010 656 y(recei)n(ving)24 b(and)f(processing)i(of)d(netw)o(ork)i(pack)o(ets.)30 b(Since)2010 769 y(this)g(acti)n(vity)h(e)o(x)o(ecutes)g(as)e(a)g (\(soft-\))i(interrupt)g(handler)l(,)2010 882 y(no)c(scheduling)k (problem)d(arises.)41 b(Ho)n(we)n(v)o(er)l(,)27 b(e)o(x)o(ecuting)2010 995 y(in)c(a)f(tight)h(loop)h(does)f(imply)g(that)h(only)f(one)g (httperf)i(pro-)2010 1108 y(cess)h(can)f(run)g(per)g(client)h(machine)g (\(per)g(client)g(CPU,)c(to)2010 1220 y(be)j(more)g(precise\).)35 b(It)25 b(also)h(means)f(that)h(care)f(should)i(be)2010 1333 y(tak)o(en)22 b(to)e(a)n(v)n(oid)i(unnecessary)i(background)g (tasks)d(on)g(the)2010 1446 y(client)k(machine)f(while)g(a)f(test)h(is) g(in)f(progress.)2010 1779 y Fg(4.2)92 b(Limited)22 b(Number)g(of)i (Ephemeral)f(P)n(orts)2010 2126 y Fh(Man)o(y)28 b(TCP)e (implementations)32 b(restrict)e(the)e(TCP)e(ports)2010 2239 y(a)n(v)n(ailable)41 b(to)f(sock)o(ets)h(that)e(are)h(not)f(bound) i(to)e(a)g(spe-)2010 2351 y(ci\002c)27 b(local)h(address)h(to)e(the)g (so-called)i(ephemeral)g(ports)2010 2464 y([7)q(].)e(Ephemeral)22 b(ports)f(are)g(typically)i(in)e(the)g(range)g(from)2010 2577 y(1,024)44 b(to)f(5,000.)88 b(This)42 b(has)i(the)f(unfortunate)j (ef)n(fect)2010 2690 y(that)34 b(e)n(v)o(en)f(moderate)h(request)h (rates)f(may)f(cause)h(a)f(test)2010 2803 y(client)e(to)f(quickly)i (run)e(out)g(of)g(port)g(numbers.)49 b(F)o(or)29 b(e)o(x-)2010 2916 y(ample,)37 b(assuming)f(a)e(TIME)p 2970 2916 28 4 v 32 w(W)-11 b(AIT)33 b(state)j(duration)g(of)2010 3029 y(one)f(minute,)j(the)e(maximum)e(sustainable)k(rate)e(w)o(ould) 2010 3142 y(be)24 b(about)g(66)g(requests)i(per)d(second.)2010 3368 y(T)-7 b(o)19 b(w)o(ork)h(around)h(this)f(problem,)i(httperf)f (can)f(optionally)2010 3481 y(maintain)29 b(its)e(o)n(wn)g(bitmap)h(of) g(ports)g(that)g(it)f(belie)n(v)o(es)i(to)2010 3593 y(be)e(a)n(v)n (ailable.)41 b(This)26 b(solution)j(is)e(not)g(ideal)h(because)h(the) 2010 3706 y(bitmap)34 b(is)g(not)g(guaranteed)i(to)d(be)h(accurate.)61 b(In)33 b(other)2010 3819 y(w)o(ords,)42 b(a)37 b(port)h(may)g(not)g (be)g(a)n(v)n(ailable,)43 b(e)n(v)o(en)38 b(though)2010 3932 y(httperf)28 b(thinks)g(otherwise.)39 b(This)27 b(can)g(cause)g(additional)2010 4045 y(system)i(calls)g(that)g(could)h (ordinarily)h(be)d(a)n(v)n(oided.)45 b(It)28 b(is)2010 4158 y(also)22 b(suboptimal)h(because)h(it)d(means)g(that)h(httperf)h (dupli-)2010 4271 y(cates)d(information)i(that)e(the)g(OS)e(k)o(ernel)j (has)e(to)h(maintain)2010 4384 y(at)29 b(an)o(y)g(rate.)44 b(While)30 b(not)f(optimal,)i(the)e(solution)i(w)o(orks)2010 4497 y(well)23 b(in)h(practice.)2010 4723 y(A)36 b(subtle)i(issue)g(in) f(managing)i(the)f(bitmap)g(is)e(the)i(or)n(-)2010 4835 y(der)33 b(in)g(which)g(ports)h(are)f(allocated.)59 b(In)33 b(a)f(\002rst)h(imple-)2010 4948 y(mentation,)43 b(httperf)d(reused)f (the)f(most)g(recently)i(freed)2010 5061 y(port)32 b(number)h(as)f (soon)h(as)f(possible)i(\(in)e(order)h(to)e(min-)2010 5174 y(imize)38 b(the)f(number)i(of)e(ports)i(consumed)g(by)f (httperf\).)2010 5287 y(This)i(w)o(ork)o(ed)h(well)e(as)h(long)h(as)f (both)g(the)h(client)g(and)2010 5400 y(serv)o(er)26 b(machines)h(were)d (UNIX-based.)34 b(Unfortunately)-6 b(,)p eop %%Page: 8 8 8 7 bop 0 91 a Fh(a)53 b(TCP)e(incompatibility)57 b(between)d(UNIX)e (and)i(NT)0 204 y(breaks)39 b(this)f(solution.)74 b(Brie\003y)-6 b(,)40 b(the)e(problem)h(is)f(that)0 317 y(UNIX)20 b(TCP)g (implementations)25 b(allo)n(w)d(pre-empting)i(the)0 430 y(TIME)p 228 430 28 4 v 32 w(W)-11 b(AIT)30 b(state)j(if)e(a)h(ne)n (w)f(SYN)f(se)o(gment)j(arri)n(v)o(es.)0 543 y(In)f(contrast,)37 b(NT)31 b(disallo)n(ws)j(such)f(pre-emption.)58 b(This)0 656 y(has)35 b(the)f(ef)n(fect)i(that)f(a)e(UNIX)g(client)j(may)e (consider)i(it)0 769 y(le)o(gitimate)c(to)f(reuse)h(a)e(gi)n(v)o(en)h (port)h(at)e(a)h(time)f(NT)f(con-)0 882 y(siders)24 b(the)f(old)h (connection)i(still)d(to)g(be)g(in)g(TIME)p 1607 882 V 32 w(W)-11 b(AIT)0 995 y(state.)36 b(Thus,)26 b(when)f(the)h(UNIX)e (client)j(attempts)g(to)f(cre-)0 1108 y(ate)i(a)e(ne)n(w)h(connection)k (with)c(the)g(reused)i(port)f(number)l(,)0 1220 y(NT)f(will)i(respond)i (with)e(a)f(TCP)f(RESET)f(se)o(gment)k(that)0 1333 y(causes)25 b(the)e(connection)j(attempt)f(to)e(f)o(ail.)29 b(In)23 b(the)g(case)h(of)0 1446 y(httperf)30 b(this)e(had)h(the)f(ef)n(fect)h (of)f(dramatically)j(reducing)0 1559 y(the)20 b(apparent)h(throughput)i (the)c(NT)f(serv)o(er)i(could)g(sustain)0 1672 y(\(half)26 b(the)g(pack)o(ets)h(f)o(ailed)f(with)f(a)g(\223connection)k(reset)d (by)0 1785 y(peer\224)36 b(error\).)63 b(This)34 b(problem)i(is)e(a)n (v)n(oided)j(in)e(the)f(cur)n(-)0 1898 y(rent)f(v)o(ersion)g(of)f (httperf)i(by)e(allocating)j(ports)e(in)f(strict)0 2011 y(round-robin)27 b(f)o(ashion.)0 2344 y Fg(4.3)92 b(Slo)o(w)22 b(System)i(Calls)0 2690 y Fh(A)e(\002nal)g(issue)i(with)f(implementing) i(httperf)g(is)e(that)g(e)n(v)o(en)0 2803 y(on)37 b(modern)h(systems,)j (some)c(OS)f(operations)k(are)d(rel-)0 2916 y(ati)n(v)o(ely)42 b(slo)n(w)e(when)g(dealing)j(with)d(se)n(v)o(eral)i(thousand)0 3029 y(TCP)22 b(control)k(blocks.)33 b(The)24 b(use)h(of)f(hash-tables) k(to)c(look)0 3142 y(up)e(TCP)d(control)24 b(blocks)f(for)f(incoming)h (netw)o(ork)g(traf)n(\002c)0 3255 y(is)j(standard)i(no)n(w)o(adays.)37 b(Ho)n(we)n(v)o(er)l(,)26 b(it)g(turns)h(out)f(that)g(at)0 3368 y(least)32 b(some)f(BSD-deri)n(v)o(ed)h(systems)g(still)g(perform) g(lin-)0 3481 y(ear)g(control)i(block)f(searches)h(for)e(the)h Fd(bind\(\))g Fh(and)f Fd(con-)0 3593 y(nect\(\))d Fh(system)g(calls.) 44 b(This)28 b(is)g(unfortunate)j(because)f(in)0 3706 y(the)d(case)h(of)f(httperf,)j(these)e(linear)g(searches)h(can)f (easily)0 3819 y(use)d(up)g(eighty)i(or)d(more)h(percent)i(of)e(its)g (total)g(e)o(x)o(ecution)0 3932 y(time.)34 b(This,)25 b(once)h(again,)g(can)g(se)n(v)o(erely)g(limit)g(the)f(max-)0 4045 y(imum)e(load)h(that)g(a)f(client)i(can)f(generate.)0 4271 y(F)o(ortunately)-6 b(,)21 b(this)e(is)f(an)g(issue)h(only)g(when) g(running)h(a)e(test)0 4384 y(that)k(causes)h(httperf)f(to)f(close)i (the)e(TCP)e(connection\227as)0 4497 y(long)g(as)g(the)f(serv)o(er)i (closes)f(the)g(connection,)j(no)d(problem)0 4610 y(occurs.)65 b(Ne)n(v)o(ertheless,)40 b(it)35 b(w)o(ould)h(be)f(better)i(to)e(a)n(v) n(oid)0 4723 y(the)27 b(problem)h(altogether)-5 b(.)41 b(Short)27 b(of)f(\002xing)h(the)g(OS,)e(the)0 4835 y(only)f(w)o (orkaround)i(we)d(ha)n(v)o(e)h(found)h(so)e(f)o(ar)h(is)f(to)h(change)0 4948 y(httperf)36 b(so)f(it)f(closes)i(connections)h(by)e(sending)i(a)d (RE-)0 5061 y(SET)c(instead)k(of)e(going)h(through)h(the)e(normal)h (connec-)0 5174 y(tion)20 b(shutdo)n(wn)h(handshak)o(e.)30 b(This)19 b(w)o(orkaround)j(may)d(be)0 5287 y(acceptable)27 b(for)c(certain)j(cases,)e(b)n(ut)g(should)i(not)e(be)f(used)0 5400 y(in)k(general.)41 b(The)26 b(reason)j(is)d(that)i(closing)h(a)d (connection)2010 91 y(via)33 b(a)f(RESET)e(may)i(cause)i(data)f (corruption)i(in)e(future)2010 204 y(TCP)24 b(connections)30 b(or)l(,)d(more)f(lik)o(ely)-6 b(,)28 b(can)e(lead)h(to)f(need-)2010 317 y(lessly)37 b(tying)f(up)g(serv)o(er)h(resources.)67 b(Also,)38 b(a)d(RESET)2010 430 y(arti\002cially)29 b Fd(lower)o(s)g Fh(the)e(cost)i(of)e(closing)i(a)e(connection,)2010 543 y(which)36 b(could)h(lead)f(to)f(o)o(v)o(erestimating)k(a)c(serv)o (er')-5 b(s)37 b(ca-)2010 656 y(pacity)-6 b(.)37 b(W)l(ith)27 b(these)g(reserv)n(ation)h(in)e(mind,)h(we)e(observ)o(e)2010 769 y(in)38 b(passing)i(that)e(at)g(least)h(one)f(popular)i(web)d(bro)n (wser)2010 882 y(\(IE)28 b(4.01\))h(appears)h(to)f(be)f(closing)i (connections)i(in)d(this)2010 995 y(manner)-5 b(.)2010 1298 y Fg(4.4)92 b(Futur)n(e)22 b(Dir)n(ections)2010 1615 y Fh(In)j(its)h(current)h(form)e(httperf)i(is)e(already)i(useful)g (for)e(per)n(-)2010 1728 y(forming)k(se)n(v)o(eral)f(web)f(serv)o(er)i (measurement)g(tasks)g(b)n(ut)2010 1841 y(its)20 b(de)n(v)o(elopment)i (has)f(by)f(no)g(means)g(come)g(to)g(a)g(halt.)28 b(In-)2010 1954 y(deed,)e(there)h(are)e(se)n(v)o(eral)i(features)g(that)f(are)f (lik)o(ely)i(to)e(be)2010 2067 y(added.)59 b(F)o(or)32 b(e)o(xample,)37 b(we)32 b(belie)n(v)o(e)j(it)d(w)o(ould)i(be)g(use-) 2010 2179 y(ful)40 b(to)h(add)f(a)g(w)o(orkload)i(generator)h(that)e (attempts)g(to)2010 2292 y(mimic)c(the)g(real-w)o(orld)i(traf)n(\002c)f (patterns)h(observ)o(ed)g(by)2010 2405 y(web)e(serv)o(ers.)70 b(T)-7 b(o)35 b(a)i(\002rst)f(de)o(gree)i(of)f(approximation,)2010 2518 y(this)d(could)h(be)e(done)i(by)e(implementing)j(a)d(SPECweb-)2010 2631 y(lik)o(e)26 b(w)o(orkload)g(generator)-5 b(.)36 b(Another)26 b(ob)o(vious)h(and)f(use-)2010 2744 y(ful)33 b(e)o(xtension)h(w)o(ould)g(be)e(to)g(modify)i(httperf)g(to)e(allo)n(w) 2010 2857 y(log)h(\002le)f(based)i(URL)c(generation.)59 b(Both)33 b(of)g(these)g(e)o(x-)2010 2970 y(tensions)c(can)e(be)g (realized)h(easily)g(thanks)h(to)d(the)h(e)n(v)o(ent-)2010 3083 y(oriented)f(structure)f(of)f(httperf.)2010 3309 y(Another)58 b(fruitful)g(direction)i(w)o(ould)d(be)g(to)f(modify)2010 3421 y(httperf)41 b(to)f(mak)o(e)g(it)g(easier)h(to)e(run)h(tests)h (with)f(multi-)2010 3534 y(ple)35 b(clients.)63 b(At)33 b(present,)39 b(it)34 b(is)h(the)g(tester')-5 b(s)36 b(responsi-)2010 3647 y(bility)j(to)g(start)g(httperf)g(on)g(each)g (client)g(machine)h(and)2010 3760 y(to)31 b(collect)i(and)e(summarize)i (the)e(per)n(-client)j(results.)53 b(A)2010 3873 y(daemon-based)37 b(approach)f(where)d(a)h(single)g(command)2010 3986 y(line)c(w)o(ould)g (control)h(multiple)g(clients)g(could)g(be)e(a)h(\002rst)2010 4099 y(step)24 b(in)g(this)g(direction.)2010 4519 y Ff(5)99 b(Conclusions)2010 4835 y Fh(The)31 b(e)o(xperience)k(gained)d(from)g (designing)i(and)f(imple-)2010 4948 y(menting)25 b(httperf)h(clearly)g (suggests)g(that)f(realizing)h(a)e(ro-)2010 5061 y(b)n(ust)33 b(and)g(high-performance)k(tool)d(for)e(assessing)k(web)2010 5174 y(serv)o(er)50 b(performance)h(is)e(a)f(non-tri)n(vial)k (undertaking.)2010 5287 y(Gi)n(v)o(en)21 b(the)h(increasing)j (importance)f(of)d(the)h(web)g(and)g(the)2010 5400 y(need)k(for)f (quantitati)n(v)o(e)i(performance)h(analysis,)f(the)e(im-)p eop %%Page: 9 9 9 8 bop 0 91 a Fh(portance)32 b(of)d(such)h(tools)h(will)e(continue)i (to)f(increase)h(as)0 204 y(well.)d(While)22 b(httperf)h(is)e (certainly)j(not)e(a)f(panacea,)j(it)d(has)0 317 y(pro)o(v)o(en)k (useful)g(in)f(a)f(number)i(of)f(web-related)i(measure-)0 430 y(ment)34 b(tasks)g(and)h(is)e(belie)n(v)o(ed)j(to)d(be)h(\003e)o (xible)g(and)g(per)n(-)0 543 y(formant)c(enough)h(that)e(it)g(could)h (pro)o(vide)h(a)d(solid)i(foun-)0 656 y(dation)37 b(to)e(realize)i (macro-le)n(v)o(el)g(benchmarks)h(such)e(as)0 769 y(SPECweb)l(.)48 b(F)o(or)29 b(those)j(cases)f(where)g(httperf)h(may)e(not)0 882 y(be)e(the)h(solution)h(of)e(choice,)j(we)c(hope)j(that)e(the)h(e)o (xperi-)0 995 y(ence)21 b(and)g(lessons)i(reported)g(in)d(this)h(paper) h(will)f(be)f(help-)0 1108 y(ful)g(in)g(a)n(v)n(oiding)j(the)e(most)f (common)g(pitf)o(alls)i(in)e(measur)n(-)0 1220 y(ing)k(web)f(serv)o(er) i(performance.)0 1654 y Ff(Ackno)o(wledgments)0 1984 y Fh(W)-7 b(e)33 b(w)o(ould)h(lik)o(e)g(to)f(thank)i(the)f(anon)o (ymous)h(re)n(vie)n(wers)0 2097 y(for)30 b(their)g(helpful)h(comments.) 48 b(Our)29 b(thanks)i(also)f(go)f(to)0 2210 y(Rick)f(Jones,)i(Rich)e (Friedrich,)i(and)e(Gita)g(Gopal)g(for)g(re-)0 2323 y(vie)n(wing)k(and) g(commenting)g(on)g(draft)g(v)o(ersions)h(of)e(this)0 2436 y(paper)25 b(on)e(e)o(xtremely)i(short)g(notice.)0 2869 y Ff(A)-10 b(v)o(ailability)0 3199 y Fh(The)18 b(httperf)j(tool)e (is)g(a)n(v)n(ailable)i(in)e(source)h(code)g(form)f(and)0 3312 y(free)24 b(of)f(char)n(ge)j(from)d(the)h(follo)n(wing)h(URL:)108 3607 y Fe(ftp://ftp.hpl.hp.com/pub/httperf/)0 4040 y Ff(Refer)n(ences)0 4299 y Fh([1])46 b(Gaura)n(v)29 b(Banga)f(and)g (Peter)f(Druschel.)48 b(Measuring)151 4412 y(the)27 b(capacity)h(of)e (a)g(web)f(serv)o(er)-5 b(.)43 b(In)26 b Fd(USENIX)e(Sym-)151 4525 y(posium)31 b(on)f(Internet)i(T)-8 b(ec)o(hnolo)o(gies)33 b(and)d(Systems)p Fh(,)151 4638 y(pages)25 b(61\22671,)g(Montere)o(y)-6 b(,)25 b(CA,)c(December)k(1997.)151 4751 y Fa(http://www)m (.usenix.org/pub)o(lications/libr)o(ar)q(y/p)o(roce)o(edin)o(gs/usit)o (s97/b)o(ang)o(a.ht)o(ml)p Fh(.)0 4948 y([2])46 b(R.)37 b(Fielding,)42 b(J.)37 b(Gettys,)42 b(J.)37 b(Mogul,)k(H.)36 b(Frystyk,)151 5061 y(and)g(T)-7 b(.)34 b(Berners-Lee.)72 b Fd(Hyperte)n(xt)37 b(T)-5 b(r)o(ansfer)36 b(Pr)l(o-)151 5174 y(tocol)g(\226)e(HTTP/1.1)p Fh(.)66 b(Internet)36 b(Engineering)h(T)-7 b(ask)151 5287 y(F)o(orce,)24 b(January)h(1997.) 151 5400 y Fa(ftp://ftp)n(.inter)q(nic.net/rfc/rfc2068.txt)o Fh(.)2010 91 y([3])46 b(Rai)36 b(Jain.)75 b Fd(The)35 b(Art)h(of)g(Computer)h(Systems)h(P)-7 b(er)n(-)2161 204 y(formance)33 b(Analysis)p Fh(.)57 b(John)31 b(W)l(ile)o(y)g(&)f (Sons,)i(Ne)n(w)2161 317 y(Y)-10 b(ork,)24 b(NY)-12 b(,)22 b(1991.)2010 505 y([4])46 b(H.)82 b(Nielsen,)99 b(J.)82 b(Gettys,)98 b(A.)82 b(Baird-Smith,)2161 618 y(E.)72 b(Prud'hommeaux,)87 b(Hak)o(on)73 b(W)-8 b(.)71 b(Lie,)85 b(and)2161 731 y(C.)47 b(Lille)o(y)-6 b(.)112 b(Netw)o(ork)48 b(performance)j(ef)n(fects)e(of)2161 844 y(HTTP/1.1,)24 b(CSS1,)f(and)i(PNG.)35 b(In)25 b Fd(Pr)l(oceedings)i(of)2161 956 y(SIGCOMM)44 b('97)i(Symposium)p Fh(,)52 b(pages)46 b(155\226166,)2161 1069 y(Cannes,)32 b(France,)f(October)f(1997.)g (Association)i(of)2161 1182 y(Computing)25 b(Machinery)-6 b(.)2161 1295 y Fa(http://www)m (.acm.org/sigcomm/sigcomm97/papers/p102.ht)o(ml)p Fh(.)2010 1483 y([5])46 b(Jon)h(Postel.)104 b Fd(T)-5 b(r)o(ansmission)48 b(Contr)l(ol)e(Pr)l(otocol)p Fh(.)2161 1596 y(D)l(ARP)-8 b(A,)21 b(September)k(1981.)2161 1709 y Fa(ftp://ftp)n(.inter)q (nic.net/rfc/rfc793.txt)p Fh(.)2010 1896 y([6])46 b(SPEC.)104 b(An)46 b(e)o(xplanation)j(of)e(the)f(SPECweb96)2161 2009 y(benchmark,)26 b(December)e(1996.)2161 2122 y Fa(http://www)m (.specbench.org/osg/web)o(96/w)o(ebp)o(ape)o(r)m(.html)p Fh(.)2010 2310 y([7])46 b(Richard)33 b(W)-8 b(.)30 b(Ste)n(v)o(ens.)60 b Fd(TCP/IP)30 b(Illustr)o(ated:)49 b(The)2161 2423 y(Pr)l(otocols)p Fh(,)37 b(v)n(olume)c(1.)62 b(Addison-W)-7 b(esle)o(y)h(,)37 b(Read-)2161 2535 y(ing,)24 b(MA,)e(1994.)2010 2723 y([8])46 b(Gene)27 b(T)m(rent)g(and)h(Mark)f(Sak)o(e.)44 b(W)-7 b(ebST)n(ONE:)25 b(The)2161 2836 y(\002rst)g(generation)j(in)d(HTTP)e (serv)o(er)j(benchmarking,)2161 2949 y(February)f(1995.)2161 3062 y Fa(http://www)m(.mindcraft.com/webstone/pape)o(r)m(.html)p Fh(.)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF