NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/59865 (ftp should not set socket send/receive buffers unless told to)



Synopsis: ftp should not set socket send/receive buffers unless told to

State-Changed-From-To: analyzed->feedback
State-Changed-By: lukem%NetBSD.org@localhost
State-Changed-When: Sat, 07 Feb 2026 03:15:03 +0000
State-Changed-Why:
I've simplified the socket buffer handling per the discussion
and feedback from Christof.
ftp only sets the socket buffer sizes if the user provides a positive value.
The transfer buffer size is determined from the user-provided socket buffer
size clamped between 1KiB and 128KiB, defaulting to 128KiB if the socket
buffer size is 0.
getsockopt() isn't used at all.

On a simple test of the old code versus new I saw:
old: 33554432 bytes received in 00:23 (1.37 MiB/s)
new: 33554432 bytes received in 00:07 (4.50 MiB/s)

the old code got to 1.37 MiB/s in the first second and stayed there.
the new code increased speed up to 4.5 MB/s.

If the behaviour seems acceptable, this could be a candidate for pullups





Home | Main Index | Thread Index | Old Index