Each parallel sampler execution create a new httpclient + connection pool. That's bad as : - it does not reproduce the browser max connection per host limit - the connections are not re-used between download as a browser would do
Hi, I submitted this PR for this: https://github.com/apache/jmeter/pull/135 Please be aware that patch would not work if PR 132 for Bug 52073 was applied as the Thread Pool in the fix is shared among all threads while for now there is 1 pool per Virtual User Thread. If the PR 132 was applied, a solution would be for example to: - Create a Session Manager that generate a zone per virtual user (with UUID) - The current HTTPCLIENTS_CACHE_PER_THREAD_AND_HTTPCLIENTKEY would be available per the virtual user key - This would make it sharing possible without switching to InheritableThreadLocal I benchmarked current patch vs current trunk (5 minutes test / 15 threads): Before: summary = 499819 in 00:05:07 = 1627.8/s Avg: 14 Min: 0 Max: 11821 Err: 26 (0.01%) After: summary = 1177289 in 00:05:07 = 3834.1/s Avg: 4 Min: 0 Max: 2172 Err: 38 (0.00%) As you can see: - Throughput is 135% higher - Response times are also much more realistic - Compared to bench mentionned in Bug 58950, there is no more huge ephemeral ports consumption and no more CPU pause during the test Feedback very welcome
Created attachment 33577 [details] Test Plan used for benching against a Tomcat 8.30
*** Bug 59029 has been marked as a duplicate of this bug. ***
Author: pmouawad Date: Sun Feb 21 21:49:31 2016 New Revision: 1731570 URL: http://svn.apache.org/viewvc?rev=1731570&view=rev Log: Bug 59034 - Parallel downloads connection management is not realistic Bugzilla Id: 59034 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java jmeter/trunk/xdocs/changes.xml Based on: https://github.com/apache/jmeter/pull/135 https://github.com/apache/jmeter/pull/136
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3839