On Mon, 2009-12-28 at 00:55 +0200, Stefan Parvu wrote: > > We have seen that after the first run (usually 1min) > > the first response time recorded for the first request > > is 2milliseconds followed by the next requests with R=10ms or 11ms. > > Here maybe a much simpler example: > http://www.systemdatarecorder.org/ClientMultiThreadedExecution.java > which can compile easily. > > This code loops over 4 similar HTTP requests obtaining different > Response times. We have a sleep after hitting all 4 requests > set to 35secs. > > When we lower this value, the sleep, we obtain the response times > similar 10, 11 ms. When we increase the sleep time the first request > and second are ok, the others are bogus. > > Why this variation ? > > Makes sense ? >
Makes perfect sense. HttpClient allows only two concurrent connections to the same host per default as required by the HTTP spec. Therefore, those two threads that manage to lease a connection from the pool first execute faster than those that stay blocked waiting for a connection to free up. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
