summaryrefslogtreecommitdiffstats
path: root/ctdb/include
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2013-08-05 17:28:47 +1000
committerAmitay Isaacs <amitay@gmail.com>2013-08-09 11:07:37 +1000
commitd349b56e2d36282e464efac48e50b15c7fadda14 (patch)
tree45668083bddf28253cb902a66e38dc93a59752ab /ctdb/include
parent6f9090648a63dd428fae4d85856a9a455dd7a0b5 (diff)
common/io: Keep queue buffer size multiple of 4K
Currently queue buffer size is realloc'd every time we need to extend the buffer. Small increments can cause memory fragmentation. Instead always extend buffer in multiples of 4K. This should reduce multiple talloc_realloc calls when there are lots of packets in the socket buffer. Also, if queue buffer has grown larger than 64K, throw away the buffer once all the requests in the queue have been processed. That way queue does not hold on to large buffers. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 5e9b1a7e24d058ff88aaa0563db36a804e866fa9)
Diffstat (limited to 'ctdb/include')
0 files changed, 0 insertions, 0 deletions