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



The following reply was made to PR bin/59865; it has been noted by GNATS.

From: Christof Meerwald <cmeerw%cmeerw.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/59865: ftp should not set socket send/receive buffers unless
 told to
Date: Sat, 27 Dec 2025 12:46:12 +0100

 > From: mlelstv%serpens.de@localhost (Michael van Elst)
 >  >Even if no socket buffer sizes are specified, ftp still gets and sets the socket buffer sizes. This has the side-effect that it disables auto-sizing of the socket buffers, resulting in slow file transfers (particularly over high-latency connections).
 >  
 >  That is mixing up two things, as you say because of a (historical)
 >  "side-effect".
 >  
 >  The better way is to remove that side-effect, which is currently
 >  possible by setting kern.sofixedbuf=0 with sysctl. Then configuring
 >  a buffer size just overrides the initial size (net.inet.*.sendspace,
 >  net.inet.*.recvspace) and keeps auto-sizing enabled.
 
 Not really convinced that changing the semantics of setsockopt is the
 better way here. Yes, the current semantics might be surprising, but
 as far as I can tell, everyone else also disables auto-sizing when
 calling setsockopt (at least FreeBSD and Linux).
 
 
 >  N.B. configuring a socket buffer size and using the same value for
 >  the size of I/O operations, as done by ftp, isn't optimal either. But
 >  that's a different issue.
 
 Yes, absolutely.
 


Home | Main Index | Thread Index | Old Index