Bug 59034 - Parallel downloads connection management is not realistic
Summary: Parallel downloads connection management is not realistic
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.13
Hardware: SGI All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
: 59029 (view as bug list)
Depends on:
Reported: 2016-02-19 15:09 UTC by benoit.wiart
Modified: 2019-09-09 09:18 UTC (History)
1 user (show)

Test Plan used for benching against a Tomcat 8.30 (26.95 KB, application/xml)
2016-02-21 15:32 UTC, Philippe Mouawad

Note You need to log in before you can comment on or make changes to this bug.
Description benoit.wiart 2016-02-19 15:09:29 UTC
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
Comment 1 Philippe Mouawad 2016-02-21 15:31:11 UTC
I submitted this PR for this:

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):

summary = 499819 in 00:05:07 = 1627.8/s Avg:    14 Min:     0 Max: 11821 Err:    26 (0.01%)

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
Comment 2 Philippe Mouawad 2016-02-21 15:32:22 UTC
Created attachment 33577 [details]
Test Plan used for benching against a Tomcat 8.30
Comment 3 Philippe Mouawad 2016-02-21 21:46:17 UTC
*** Bug 59029 has been marked as a duplicate of this bug. ***
Comment 4 Philippe Mouawad 2016-02-21 21:55:21 UTC
Author: pmouawad
Date: Sun Feb 21 21:49:31 2016
New Revision: 1731570

URL: http://svn.apache.org/viewvc?rev=1731570&view=rev
Bug 59034 - Parallel downloads connection management is not realistic
Bugzilla Id: 59034


Based on:
Comment 5 The ASF infrastructure team 2022-09-24 20:38:02 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3839