12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

41.1.2 PackMimeHTTP Server Applic<strong>at</strong>ionEach web server controls the respo<strong>ns</strong>e sizes th<strong>at</strong> are tra<strong>ns</strong>ferred. <strong>The</strong> server is started by when a new TCP connection isstarted. Each PackMimeHTTP client takes the following steps:• listen for an HTTP request from the associ<strong>at</strong>ed client• when the entire request arrives, the server samples the server delay time from the server delay distribution• set a timer to expire when the server delay has passed• when the timer expires, the server sends respo<strong>ns</strong>e (the size of which was sampled by the client <strong>and</strong> passed to the server)• this process is repe<strong>at</strong>ed until the requests are exhausted – the server is told how many requests will be sent in theconnection• send a FIN to close the connection41.2 PackMimeHTTP R<strong>and</strong>om VariablesThis implement<strong>at</strong>ion of PackMimeHTTP provides several <strong>ns</strong> R<strong>and</strong>omVariable objects for specifying distributio<strong>ns</strong> of Pack-MimeHTTP connection variables. <strong>The</strong> implement<strong>at</strong>io<strong>ns</strong> were taken from source code provided by Bell <strong>Lab</strong>s <strong>and</strong> modified tofit into the <strong>ns</strong> R<strong>and</strong>omVariable framework. This allows PackMimeHTTP connection variables to be specified by any type of<strong>ns</strong> R<strong>and</strong>omVariable, which now include PackMimeHTTP-specific r<strong>and</strong>om variables. If no R<strong>and</strong>omVariables are specified inthe TCL script, PackMimeHTTP will set these autom<strong>at</strong>ically.<strong>The</strong> PackMimeHTTP-specific r<strong>and</strong>om variable syntax for TCL scripts is as follows:• $<strong>ns</strong> [new R<strong>and</strong>omVariable/PackMimeHTTPFlowArrive ], where r<strong>at</strong>e is the specified Pack-MimeHTTP connection r<strong>at</strong>e (number of new connectio<strong>ns</strong> per second)• $<strong>ns</strong> [new R<strong>and</strong>omVariable/PackMimeHTTPReqSize ], where r<strong>at</strong>e is the specified PackMime-HTTP connection r<strong>at</strong>e• $<strong>ns</strong> [new R<strong>and</strong>omVariable/PackMimeHTTPRspSize ], where r<strong>at</strong>e is the specified PackMime-HTTP connection r<strong>at</strong>e• $<strong>ns</strong> [new R<strong>and</strong>omVariable/PackMimeHTTPPersistRspSize]• $<strong>ns</strong> [new R<strong>and</strong>omVariable/PackMimeHTTPPersistent ], where probability isthe probability th<strong>at</strong> the connection is persistent• $<strong>ns</strong> [new R<strong>and</strong>omVariable/PackMimeHTTPNumPages ], whereprobability is the probability th<strong>at</strong> there is a single page in the connection <strong>and</strong> shape <strong>and</strong> scale are parametersto the Weibull distribution to determine the number of pages in the connection.• $<strong>ns</strong> [new R<strong>and</strong>omVariable/PackMimeHTTPSingleObjPages ], where probabilityis the probability th<strong>at</strong> there is a single object on the current page.• $<strong>ns</strong> [new R<strong>and</strong>omVariable/PackMimeHTTPObjsPerPage ], where shape <strong>and</strong> scaleare parameters to the Gamma distribution to determine the number of objects on a single page.• $<strong>ns</strong> [new R<strong>and</strong>omVariable/PackMimeHTTPTimeBtwnObjs]• $<strong>ns</strong> [new R<strong>and</strong>omVariable/PackMimeHTTPTimeBtwnPages]365

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!