Bug 59029 - httpclient PoolingConnectionManager has inappropriate default values
Summary: httpclient PoolingConnectionManager has inappropriate default values
Status: RESOLVED DUPLICATE of bug 59034
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.13
Hardware: Macintosh Windows CE
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2016-02-18 17:20 UTC by benoit.wiart
Modified: 2016-02-21 21:46 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description benoit.wiart 2016-02-18 17:20:43 UTC
looks like jmeter is using the PoolingConnectionManager default values.
From PoolingConnectionManager javadoc
* PoolingConnectionManager maintains a maximum limit of connection on
* a per route basis and in total. Per default this implementation will
* create no more than than 2 concurrent connections per given route
* and no more 20 connections in total.

We should initialize the MeasuringConnectionManager with better (higher) default values.
Comment 1 Sebb 2016-02-18 19:07:36 UTC
Each JMeter thread is intended to simulate an independent user.

So I'm not sure it makes sense to pool connections across threads.
In fact that was one of the issues with using the Java HTTP implementation - it was not possible to control connection pooling.

The defaults seem reasonable to me for a single user.
Comment 2 benoit.wiart 2016-02-18 20:48:30 UTC
a connection pool is created for each user (thread) see HTTPHC4Impl#setupClient
So this is not about sharing connections across threads.

Modern browsers use more connections than the current JMeter default.
see http://sgdev-blog.blogspot.fr/2014/01/maximum-concurrent-connection-to-same.html

Even for a single user, current defaults are not reasonable
Comment 3 Sebb 2016-02-18 21:19:10 UTC
JMeter is not a browser.

JMeter threads behave more like a single browser tab. A browser with a single tab does not need as many connections.

Unless you can show that there is a need to change the default, I think it should be left as it is. If there is a need to change the default for a particular test, then there should be a way to configure the values.
Comment 4 benoit.wiart 2016-02-18 22:47:09 UTC
> JMeter is not a browser.
thanx I wasn't aware... 
But, to be realist, the load should simulate a browser behavior.

> A browser with a single tab does not need as many connections.
Where did you take this information ?
I'm afraid that's wrong. Google for "browser max connection per host".
for example for ie 8 :
"The connection limit is per process, the browser will make the determination about process creation as a web site owner you can't really change that. The process may be shared between multiple tabs/windows or it may not, it depends on many factors outside your control."

the new default value will not change the "main" http samplers as for a given user they are executed sequentially.
But it will make the embedded resources parallel downloads more realistic.

a global parameter that let the user choose a custom value is fine BUT the default value should also be increased.

BTW, did you know that JMeter is not a browser ? ;-)
Comment 5 Philippe Mouawad 2016-02-21 21:46:17 UTC
Will be fixed within Bug 59034

*** This bug has been marked as a duplicate of bug 59034 ***