Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347412

Summary: [dstore] Need an option to set TCP NODELAYACKS
Product: [Tools] Target Management Reporter: Missing name <olivier.gauneau>
Component: RSEAssignee: David McKnight <dmcknigh>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: major    
Priority: P3 CC: xuanchen
Version: 3.2.1Flags: xuanchen: review+
Target Milestone: 3.3 RC3   
Hardware: Other   
OS: other   
Whiteboard:
Bug Depends on:    
Bug Blocks: 347445    
Attachments:
Description Flags
patch to provide TCPNODELAY option
none
patch fixing the build on J2SE-1.4
none
patch with option described in constants file none

Description Missing name CLA 2011-05-27 04:51:06 EDT
Analysis of TCP traffic might show packets delayed of 200ms on the receiving side for some commands. This is caused by delay ack.

When the DELAYACKS is active, the ACK for a particular inbound packet with data will be delayed 200ms seconds if the inbound packet has a payload of less than the MSS.  Looking at the sniffer trace, the payload at the time when you see the 200ms is about 300 bytes (smaller than the MSS), which supports the theory that the DELAYACKS is active.

To turn off the delay ack on the MVS side, you can code NODELAYACKS on the TCPCONFIG statement (global) or you can code it on the PORT reservation statement for the particular port being used. 

However it will be useful to be able to set it on the socket in RSE as well using _socket.setTcpNoDelay(true);
Comment 1 Missing name CLA 2011-05-27 04:52:55 EDT
A test with NODELAY shows great improvement on performance
Comment 2 Martin Oberhuber CLA 2011-05-27 06:23:44 EDT
Is this request specific to dstore?
Does it affect the client only, or server only, or both?
Comment 3 Missing name CLA 2011-05-27 06:39:05 EDT
Problem is on both sides client and server and I assume it is specific to dstore.
I have worked on this issue with David McKnight who will add more information.
Comment 4 David McKnight CLA 2011-05-27 08:20:49 EDT
Created attachment 196749 [details]
patch to provide TCPNODELAY option
Comment 5 David McKnight CLA 2011-05-27 08:21:22 EDT
Xuan, could you please review this?
Comment 6 Xuan Chen CLA 2011-05-27 13:51:21 EDT
The fix looks good.  Thanks.
Comment 7 David McKnight CLA 2011-05-27 13:55:28 EDT
Thanks for the review, Xuan.  I've committed the change to cvs.
Comment 8 Martin Oberhuber CLA 2011-05-30 04:40:13 EDT
Created attachment 196872 [details]
patch fixing the build on J2SE-1.4

This checkin broke the build, because dstore.core must still be J2SE-1.4 compliant and Boolean.parseBoolean() is not in J2SE-1.4

I fixed the issue by converting to
   Boolean.valueOf(s).booleanValue().

Please also apply this fix to the 3.2.2+ Stream, which is currently also broken.
And, please ensure that a J2SE-1.4 JVM is registered in your Workspace (Preferences : Java : JVM's) in order to detect such issues in your workspace.
Comment 9 Martin Oberhuber CLA 2011-05-30 04:47:21 EDT
I released the change for 3.3RC3.

Shouldn't we document system properties like the new DSTORE_TCP_NO_DELAY somewhere ?
Comment 10 David McKnight CLA 2011-05-30 08:21:57 EDT
Created attachment 196888 [details]
patch with option described in constants file

Other properties like this have been defined in a constants file and described there as this patch does.
Comment 11 Martin Oberhuber CLA 2011-05-31 08:50:58 EDT
I released the update for 3.3rc3, but cannot build currently due to bug 347744 .