Performance improvements:
Solution: Use LinkedBlockingQueue with fixed capacity. The MAXQUEUESIZE is now set to 50,000. With the change, the system become stable.
Solution: Implemented more efficient way to compute header checksum. As a result, the throughout has more than doubled.See test results below. Used Cbench for testing.
Before:
RESULT: 16 switches 9 tests min/max/avg/stdev =
9598.35/10395.48/10193.23/225.24 responses/s
After:
RESULT: 16 switches 9 tests min/max/avg/stdev =
28767.44/32073.92/30335.74/999.70 responses/s
Solution: Transmit messages in a tight while loop until the Tx queue is empty.
Signed-off-by: Jason Ye <yisye@cisco.com>