FIXReader calls sockRead too many times

Description

FIXReader calls sockRead too many times. I think the optimal way here is to have a userspace buffer or stream that is filled in once by a single call to sockRead. Then until the buffer/stream is not empty read op just read from it, not socket. When the socket/buffer is empty, real socket read is called.

Environment

Ubuntu 13.10 x64 gcc4.8

Activity

Show:
David Dight
November 23, 2013, 11:08 PM

Not sure your suggested approach will improve performance. Here's why:

  1. In Linux, I think read is already in the VDSO

  2. The kernel already reads frames way ahead into the tcp buffers, so the only difference will be between performance in user and kernel modes (hence why VDSO will make a huge difference)

  3. Fix8 also supports user configured tcp send/rcv buffers which are used by the kernel for buffering

Sergey Sedreev
November 24, 2013, 6:48 AM

Right, still I'd like to reduce the number of calls to places that we don't control and even the number of calls itself. recv call is still takes much-much longer than just our own buffer current ptr increment...
I'll prepare the fix in couple of days and send you for review.

Sergey Sedreev
November 27, 2013, 7:46 AM

Created pull request

Assignee

Sergey Sedreev

Reporter

Sergey Sedreev

Labels

None

Branch

None

Products

None

Fix versions

Affects versions

Priority

Major
Configure