Re: squid, DNS and no buffer space

Stephen Borrill <[email protected]>
Newsgroups gmane.os.netbsd.devel.network
Message-ID <Pine.NEB.4.64.2412061611110.1680@ugly>
On Fri, 6 Dec 2024, Michael van Elst wrote:
> On Fri, Dec 06, 2024 at 02:49:03PM +0000, Stephen Borrill wrote:
>> At 13:17 I doubled the values again:
>> 13:17   sysctl -w kern.somaxkva=134217728
>> 13:17   sysctl -w kern.sbmax=134217728
>>
>> The warnings continued:
>
> sbmax is the limit for a single socket buffer.
> somaxkva is the limit for the whole network stack.
>
> If you make the same size, this allows one socket buffer to
> eat all allowed memory. I doubt that this is the problem,
> otherwise you'd need more mbufs allocated to fill the
> larger somaxkva now, but the netstat output didn't change.
>
> But please verify with somaxkva >> sbmax (and a much
> smaller sbmax).

I'm not sure I got that figure from and my recvbuf/sendbuf settings. 
Various posts on the mailing lists, I guess. My local commit message for 
those settings was "TCP tuning to improve scp and rsync-over-ssh 
performance", but I didn't bother giving a reference unfortunately. It 
probably relates to my previous complaints about terrible scp 
performance with a NetBSD ssh server compared to Linux (both with a NetBSD 
ssh client).

Here's what I am currently using after reducing sbmax:

net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.recvbuf_inc=786432
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.sendbuf_inc=786432
net.inet.tcp.recvspace=262144
net.inet.tcp.sendspace=262144
kern.sbmax=16777216
kern.somaxkva=268435456

There won't be any load until Monday now.

-- 
Stephen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.