Bug 58852 - Memory consumption when sending large files with method PUT
Summary: Memory consumption when sending large files with method PUT
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
: 47660 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-13 20:55 UTC by Felix Schumacher
Modified: 2016-02-27 08:38 UTC (History)
2 users (show)



Attachments
Use less memory when using large files on PUT method (2.78 KB, patch)
2016-01-13 20:55 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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