mozilla / neqo

Neqo, the Mozilla Firefox implementation of QUIC in Rust
https://firefox-source-docs.mozilla.org/networking/http/http3.html
Apache License 2.0
1.86k stars 124 forks source link

Consider increasing OS socket buffer (`SO_SNDBUF`, `SO_RCVBUF`) #1962

Open mxinden opened 4 months ago

mxinden commented 4 months ago

For increased performance, we might want to increase the OS UDP socket send and receive buffer.

See also:

larseggert commented 4 months ago

Are we currently running with the OS defaults? What do other stacks use?

mxinden commented 4 months ago

Are we currently running with the OS defaults?

In Firefox we attempt to set it to 1 MiB. I wasn't aware of this until today trying to add another pref.

# Receive buffer size of QUIC socket
- name: network.http.http3.recvBufferSize
  type: RelaxedAtomicInt32
  value: 1048576
  mirror: always

https://searchfox.org/mozilla-central/rev/01aaa47e62a2015e7641f26ab0bc2bb00ab579b8/modules/libpref/init/StaticPrefList.yaml

larseggert commented 4 months ago

Thanks for finding this out. We could do the same in neqo, but would it be worth it?

Do we also do something for the send buffer?

mxinden commented 4 months ago

As far as I can tell we only alter the receive buffer, not the send buffer. I am not familiar enough with the code base to know for sure.

We could do the same in neqo, but would it be worth it?

:+1: worth experimenting with in neqo-server and neqo-client.