Environment
- Linux/RedHat
- 6 cores
- Java 7/8
- 10G
Application
- Its a low latency high frequency trading application
- Receives broadcast via multicast UDP
- There are multiple datastreams
- Each Incoming packet size is less than 1K(fixed size)
- Application latency is around 4 microsecond
Architecture
- Separate application thread is mapped to each incoming multicast stream
- Receives data from socket using multicastsocket.receive() in native bytes
- Bytes are parsed and orderbook is prepared
Problem
Inspite of tolerable app latency of around 4 microsec we are not able to receive desirable performance. We believe it is because of network latency.
Tuning steps used
- Increased size of following parameters:
- netdev_max_backlog
- NIC ring buffer receive size
- rmem_max
- tcp_mem
- socketreceivebuffer (in the code)
Question:
- We observed that the performance of the application deteriorated after we increased the values of above mentioned parameters. What are the suggested parameters to be optimized & the recommended values. A guide towards optimizing incoming broadcast is requested?
- Is there are a way to measure the network latency in a more accurate manner in environment like this. Note that the UDP sender is an external entity (exchange)
Thanks in advance