DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32472>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32472





------- Additional Comments From [EMAIL PROTECTED]  2004-12-02 02:37 -------
wowzers a 52mb file upload. I'm gonna guess it's going to take some tuning to 
get jmeter to handle files that big. I know the current code simply open an 
inputstream and passes it right to the outputstream of the connection. The 
Postwriter currently does this.

    private void writeFileToURL(
        OutputStream out,
        String filename,
        String fieldname,
        InputStream in,
        String mimetype)
        throws IOException
    {
        writeln(
            out,
            "Content-Disposition: form-data; name=\""
                + encode(fieldname)
                + "\"; filename=\""
                + encode(filename)
                + "\"");
        writeln(out, "Content-Type: " + mimetype);
        out.write(CRLF);

        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)
        {
            out.write(buf, 0, read);
        }
        out.write(CRLF);
        in.close();
    }


As you can see, the post writer creates a byte array of 1024 and uses it to 
pass the data from one stream to another. If I run the test plan as it and 
provide my own zip file for the upload, will it work?  If it will work, I will 
profile it tomorrow and verify that only one byte array is created.

if I remember correctly, in jdk1.4.2 it internally uses the NIO stuff, so it 
could be a leak in the JVM. The current jmeter implementation is so simple, 
it's highly unlikely there a bug in how jmeter handles large files.

peter

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to