EMA C++ Performace Tools Guide : 10 Performance Best Practices : 10.2 Enterprise Message API Best Practices : 10.2.5 System Send and Receive Buffers
 
10.2.5 System Send and Receive Buffers
For TCP socket connections, the OS uses system send and receive buffers for exchanging content. When the Enterprise Message API flushes data to the underlying transport, it passes through these system buffers. During times of high throughput, the application might provide data faster than the underlying transport can send it. If this happens, the system buffers can fill up, and as a result, the underlying transport refuses to accept data. In this case, the transport accepts new data only after some of its buffered content is sent and acknowledged.
If the user instructs the Enterprise Message API to pass queued data to the underlying transport but the OS cannot accept additional content at the time, then the content must be queued in the Enterprise Message API and Enterprise Message API should flush it at a subsequent time. However, this state is not considered a failure condition, and the Enterprise Message API still has the data in its buffers. In this situation, the OP_WRITE selection key write file descriptor of the connection can be added to the, which notifies the application when it can pass additional content to the OS.
You can configure the system’s send and receive buffer sizes in the OS, as detailed in OS-specific documentation. Additionally, the Enterprise Message API allows users to configure this via SysSendBufSize and SysRecvBufSize configuration parameters in Channel or Server group.