iproto: reduce effects of input buffer fragmentation on large cfg.readahead
When cfg.readahead is large, iproto_reset_input() has a tendency to leave all input buffers large enough for a long time. On the other hand, the input buffer is not recycled until its maximal size is reached. This leaves to a case when we keep shifting the read position towards the end of the buffer, fragmenting memory and growing it to readahead size, even if input packets and batches are actually small. Suggested by Alexander Turenko.
Loading
Please register or sign in to comment