Closed liang-hiwin closed 2 years ago
Not a bug. The issue is explained here: https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size
Hi !
While large buffer size is better for high-bandwidth server, measurements show larger buffers are worse (ie more packet loss) for servers with low-to-average bandwidth. See Higher rmem_max value leading to more packet loss
dnsproxy exposes option "--udp-buf-size=", so I tried using this parameter to use my system default:
./dnsproxy --udp-buf-size=0 -u ...
./dnsproxy --udp-buf-size=212992 ...
Unfortunately the warning persist regarless of parameter udp-buf-size:
dnsproxy[1180629]: 2022/12/03 13:07:08 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.
This is confusing, I don't know if the parameter is being ignored, or if there's something else going on. To investigate I added logging to proxy/server_udp.go to verify my buffer size is passed to the UDP Listener. It shows the requested value is use when calling udpListen.SetReadBuffer(...) so I'm wondering why there's still this warning.
Aside from the warning, dnsproxy is working nicely. Thanks to developers on the DoQ implementation !
I don't know if the parameter is being ignored, or if there's something else going on.
I recall this from another issue mentioning it's not used... https://github.com/AdguardTeam/dnsproxy/issues/277
Check the link: https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size
dnsproxy's udp-buf-size is not linked to that warning.