You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Managed client: fixed socket buffers cap fetch speed on high-latency links #1312
A receive buffer set by hand turns off receive window auto-tuning for that socket, so throughput is capped at roughly PacketSize / round-trip time. With the default 8192 and a 75 ms round trip that is about 100 KB/s, whatever the bandwidth. Measurements are in my comment on #1197: the same query took 163 s with the default PacketSize, 54 s with 32767, and 20-23 s with the two lines removed, the same as fbclient on that link.
I am opening this separately because #1264 decouples the blob segment size from PacketSize, and once it is merged #1197 will be closed. In #1264PacketSize stays as the socket buffer setting, which makes sense to me, so here is a proposal that keeps it:
if Packet Size is not in the connection string, do not set ReceiveBuffer and SendBuffer and leave them to the OS, as fbclient does (src/remote/inet.cpp sets only TCP_NODELAY and SO_KEEPALIVE);
if it is set explicitly, apply it as today.
Nothing changes for anyone who sets Packet Size on purpose; the default gets the OS behaviour. On a LAN there is no visible difference either way.
If this direction works for you, I can open a pull request with the change and a test.
The analysis was done with the help of an AI assistant (Claude).
Activity