Skip to content

Increase maximum socket receive and send buffer size (#1964)#1968

Merged
agners merged 1 commit intohome-assistant:devfrom
agners:increase-max-seceive-send-socket-buffer-size
Jun 8, 2022
Merged

Increase maximum socket receive and send buffer size (#1964)#1968
agners merged 1 commit intohome-assistant:devfrom
agners:increase-max-seceive-send-socket-buffer-size

Conversation

@agners
Copy link
Member

@agners agners commented Jun 8, 2022

Some applications try to increase the buffers for performance reason. The
QUIC Go implementation for instance tries to request a 2048 kiB buffer
size.

The kernel default depends on skubuf size (which is architecture
dependent), but it is memory size independet and typically around 200 kiB
(see 1).

Other network tuning guides suggest 16MiB for 1GB ethernet, as well as
changing the default as well as maximum bufffer size (see 2). This
conservatively increases the maximum buffer size to 4MiB.

…1964)

Some applications try to increase the buffers for performance reason. The
QUIC Go implementation for instance tries to request a 2048 kiB buffer
size.

The kernel default depends on skubuf size (which is architecture
dependent), but it is memory size independet and typically around 200 kiB
(see [1]).

Other network tuning guides suggest 16MiB for 1GB ethernet, as well as
changing the default as well as maximum bufffer size (see [2]). This
conservatively increases the maximum buffer size to 4MiB.

[1]: https://elixir.bootlin.com/linux/v5.15.45/source/include/net/sock.h#L2742
[2]: https://nateware.com/2013/04/06/linux-network-tuning-for-2013/
@agners agners added the os label Jun 8, 2022
@agners agners added REL-8 and removed cla-signed labels Jun 8, 2022
jens-maus added a commit to OpenCCU/OpenCCU that referenced this pull request Jun 8, 2022
/etc/sysctl.conf which increases net.core.Xmem_max to 4 MiB to
potentially increase the network performance. Also added an increase of
the allowed IGMP memberships to 1024 to provide more room for addons to
potentially come up with own IGMP membership uses (cf.
home-assistant/operating-system#1968).
@agners agners merged commit 720f604 into home-assistant:dev Jun 8, 2022
agners added a commit that referenced this pull request Jun 8, 2022
Some applications try to increase the buffers for performance reason. The
QUIC Go implementation for instance tries to request a 2048 kiB buffer
size.

The kernel default depends on skubuf size (which is architecture
dependent), but it is memory size independet and typically around 200 kiB
(see [1]).

Other network tuning guides suggest 16MiB for 1GB ethernet, as well as
changing the default as well as maximum bufffer size (see [2]). This
conservatively increases the maximum buffer size to 4MiB.

[1]: https://elixir.bootlin.com/linux/v5.15.45/source/include/net/sock.h#L2742
[2]: https://nateware.com/2013/04/06/linux-network-tuning-for-2013/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants