Skip to content

Commit d4321e0

Browse files
committed
Try 128 minimum
1 parent ce4553b commit d4321e0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

deps/rabbit/src/rabbit_networking.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ handshake(Ref, ProxyProtocolEnabled) ->
571571

572572
tune_buffer_size(Sock) ->
573573
% case tune_buffer_size1(Sock) of
574-
case rabbit_net:setopts(Sock, [{buffer, 1024}]) of
574+
case rabbit_net:setopts(Sock, [{buffer, 128}]) of
575575
ok -> ok;
576576
{error, _} -> rabbit_net:fast_close(Sock),
577577
exit(normal)

deps/rabbit/src/rabbit_reader.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
throttle,
102102
proxy_socket,
103103
%% dynamic buffer
104-
dynamic_buffer_size = 1024,
104+
dynamic_buffer_size = 128,
105105
dynamic_buffer_moving_average = 0
106106
}).
107107

@@ -543,7 +543,7 @@ mainloop(Deb, Buf, BufLen, State = #v1{sock = Sock,
543543

544544
maybe_resize_buffer(State=#v1{sock=Sock, dynamic_buffer_size=BufferSize0,
545545
dynamic_buffer_moving_average=MovingAvg0}, Data) ->
546-
LowDynamicBuffer = 1024,
546+
LowDynamicBuffer = 128,
547547
HighDynamicBuffer = 131072,
548548
DataLen = byte_size(Data),
549549
MovingAvg = (MovingAvg0 * 31 + DataLen) div 32,

0 commit comments

Comments
 (0)