Bug 57633

Summary: HTTP Request : provide a way to not compute MD5 nor use response, only use size
Product: JMeter - Now in Github Reporter: Vamsi Mohan Tirunagari <vamsimohan07>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: NEEDINFO ---    
Severity: enhancement CC: p.mouawad, vamsimohan07
Priority: P2    
Version: 2.12   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Logs contains JMeter Logs, Base and modified file of HTTPSampler.java, Wireshark Capture, jmx file.

Description Vamsi Mohan Tirunagari 2015-02-25 06:59:40 UTC
Created attachment 32520 [details]
Logs contains JMeter Logs, Base and modified file of HTTPSampler.java, Wireshark Capture, jmx file.

Situation:

I am doing performance testing using JMeter and my focus of testing is to measure performance of file upload and download of the server. The file sizes ranges for smaller files like 4KB to large files like 2GB.

While doing PUT testing, I had varied file ranges of 4KB to 1GB. PUT for sizes of 4KB and 1.6MB is working perfectly. However, the next size of 100MB and greater than that (500MB and 1GB) are failing. There is no apparent error seen in JMeter logs or console, but when I captured wireshark trace, I could see that TCP threeway handshake was successful, followed by HTTP PUT with right content length and then some data tranfer. However, after certain data transfer, there are no more transfers. Wireshark does not capture any further transfer. So, my Server Under Test times out and closes the connection as complete file is not received. 

JMeter Build:
I am using JMeter 2.12 r1636949.

Note: I have modified certain part of code in JMeter to handle GET request. Though I do not think these below changes have resulted in problem I see in PUT, I just wanted to mention this as an FYI. 

To enhance the performance of GET on client, I made modifications to JMeter code to ignore the data coming to client by not calculating MD5 hash. I only validate the status code received for GET.

Following changes are done:

  HTTPSamplerBase.java:

     Method Name: public byte[] readResponse
     Code Changed:
             if (asMD5) { // && md != null)
                    //md.update(readBuffer, 0 , bytesRead);
                    totalBytes += bytesRead;
                } else {
                    w.write(readBuffer, 0, bytesRead);
                }
            }
            if (first){ // Bug 46838 - if there was no data, still need to set latency
                sampleResult.latencyEnd();
            }
            in.close();
            w.flush();
            if (asMD5) { //&& md != null) 
                byte[] md5Result = new byte[1]; //md.digest();
                w.write(JOrphanUtils.baToHexBytes(md5Result)); 
                sampleResult.setBytes(totalBytes);
            }

Attachments to this bug:

    JMeter Logs, Base and modified file of HTTPSampler.java, Wireshark Capture, jmx file.   

*** This issue is currently blocking my testing commitments and hence request to take this up with priority****

Please let me know for any further information.
Comment 1 Philippe Mouawad 2015-03-12 21:07:34 UTC
Hi,
Few questions:
- Are you using GUI or NON GUI ? I think you are using GUI
- What is your Xmx value in jmeter ?
- Can you check the output of your shell to see if there is no OutOfMemoryError occuring ?

Thanks
Comment 2 Philippe Mouawad 2015-03-22 17:54:57 UTC
As we got no answer , from description of case and logs I see GUI mode is used (which is against best-practices) ,and no information provided on Xmx so temporary conclusion is that an OOM or GC issues were faced leading to this.
Requalifying as enhancement as per reporter whish to have an option to not compute MD5 but only size.
Comment 3 The ASF infrastructure team 2022-09-24 20:37:59 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3546