Bug 58852

Summary: Memory consumption when sending large files with method PUT
Product: JMeter - Now in Github Reporter: Felix Schumacher <felix.schumacher>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: numberzero1029, p.mouawad
Priority: P2    
Version: 2.13   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Use less memory when using large files on PUT method

Description Felix Schumacher 2016-01-13 20:55:41 UTC
Created attachment 33435 [details]
Use less memory when using large files on PUT method

When sending large files with PUT method, at HTTPHC4Impl and HTTPHC3Implwill store the entire content in the sampler. This will lead to OutOfMemory errors rather quickly.

As in POST method, we should store a short message in the sampler, to reduce the amount of memory needed.
Comment 1 Felix Schumacher 2016-01-16 15:23:42 UTC
Date: Sat Jan 16 15:23:12 2016
New Revision: 1724996

URL: http://svn.apache.org/viewvc?rev=1724996&view=rev
Log:
Use less memory for PUT requests.

Bugzilla Id: 58852

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 Ahmad 2016-02-12 00:20:31 UTC
Hi Felix
I tested the fix with 1GB * 10 users and 4GB heap and that worked with no issues.

I tested the fix with 5GB * 10 users and got OOM exception ((with 4GB heap as well).  

is there a way to improve the fix to allow for larger Object sizes and higher concurrency?? 

Is there a formula to increase the heap size (taking into account object sizes and concurrent users?)>??


thanks
Comment 3 Felix Schumacher 2016-02-12 18:03:55 UTC
How big is the response to your PUT requests? (See "Save response as MD5 hash?" in http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request)

I have tested upload with POST and PUT with 10G each without any problems.
Comment 4 Philippe Mouawad 2016-02-20 00:01:33 UTC
Hi Felix,
Can this one be closed ?
Thanks
Comment 5 Philippe Mouawad 2016-02-26 21:28:50 UTC
*** Bug 47660 has been marked as a duplicate of this bug. ***
Comment 6 Philippe Mouawad 2016-02-27 08:38:03 UTC
As per last answer on this discussion:
http://mail-archives.apache.org/mod_mbox/jmeter-user/201601.mbox/%3CSNT148-W94797335406CF5C8BA15FEDDF60%40phx.gbl%3E

I am closing issue as fixed
Comment 7 The ASF infrastructure team 2022-09-24 20:38:02 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3777