You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by js...@apache.org on 2004/01/16 15:42:02 UTC
cvs commit: jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler PostWriter.java
jsalvata 2004/01/16 06:42:02
Modified: src/protocol/http/org/apache/jmeter/protocol/http/sampler
PostWriter.java
Log:
Fix excessive (and unnecessary) request-lived object
allocation that was causing an OOM when a GC was
triggered at a time when 10 file uploads were running
concurrently.
Revision Changes Path
1.11 +6 -3 jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/PostWriter.java
Index: PostWriter.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/PostWriter.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- PostWriter.java 19 Oct 2003 22:43:51 -0000 1.10
+++ PostWriter.java 16 Jan 2004 14:42:02 -0000 1.11
@@ -210,8 +210,11 @@
writeln(out, "Content-Type: " + mimetype);
out.write(CRLF);
- byte[] buf = new byte[1024 * 100];
- //100k
+ byte[] buf = new byte[1024];
+ //1k - the previous 100k made no sense (there's tons of buffers
+ // elsewhere in the chain) and it caused OOM when many concurrent
+ // uploads were being done. Could be fixed by increasing the evacuation
+ // ratio in bin/jmeter[.bat], but this is better.
int read;
while ((read = in.read(buf)) > 0)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org