Skip to content

Commit

Permalink
Increase UDP buffer sizes (#1024)
Browse files Browse the repository at this point in the history
* Increase UDP buffer sizes

The new size is 7.5M as recommended by quic-go [1]

[1]: https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes/a3327deff89d2428d48596ce0e643531f9944f99

Signed-off-by: Mauro Morales <[email protected]>

* Bump version

Signed-off-by: Mauro Morales <[email protected]>

* Add source of the rmem_max

* Bump version

---------

Signed-off-by: Mauro Morales <[email protected]>
  • Loading branch information
mauromorales authored Sep 27, 2024
1 parent 08a1048 commit 0ad384e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/static/kairos-overlay-files/collection.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
packages:
- name: "kairos-overlay-files"
category: "static"
version: "1.1.52"
version: "1.1.53"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ StandardInput=tty
StandardOutput=tty
LimitNOFILE=49152
ExecStartPre=-/bin/sh -c "dmesg -D"
ExecStartPre=-/bin/sh -c "sysctl -w net.core.rmem_max=2500000"
# This source explains why we are using this number
# https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes/a3327deff89d2428d48596ce0e643531f9944f99
ExecStartPre=-/bin/sh -c "sysctl -w net.core.rmem_max=7500000"
# Stop systemd messages on tty
ExecStartPre=-/usr/bin/kill -SIGRTMIN+21 1
TTYPath=/dev/tty1
Expand All @@ -16,4 +18,4 @@ ExecStart=/usr/bin/kairos-agent recovery
# Start systemd messages on tty
ExecStartPost=-/usr/bin/kill -SIGRTMIN+20 1
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ stages:
boot:
- name: "Default sysctl settings"
sysctl:
net.core.rmem_max: 2500000
# This source explains why we are using this number
# https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes/a3327deff89d2428d48596ce0e643531f9944f99
net.core.rmem_max: 7500000
vm.max_map_count: 262144
fs.inotify.max_user_instances: 8192
fs.inotify.max_user_watches: 524288
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/edgevpn-systemd/definition.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: edgevpn
category: systemd-service
version: "20211216"
version: "20240830"
requires:
- name: edgevpn
category: utils
Expand Down
5 changes: 4 additions & 1 deletion packages/utils/edgevpn-systemd/edgevpn.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ After=network.target
[Service]
EnvironmentFile=/etc/systemd/system.conf.d/edgevpn.env
LimitNOFILE=49152
ExecStartPre=-/bin/sh -c "sysctl -w net.core.rmem_max=2500000"
# This source explains why we are using this number
# https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes/a3327deff89d2428d48596ce0e643531f9944f99
ExecStartPre=-/bin/sh -c "sysctl -w net.core.rmem_max=7500000"
ExecStartPre=-/bin/sh -c "sysctl -w net.core.wmem_max=7500000"
ExecStart=/usr/bin/edgevpn
Restart=always

Expand Down

0 comments on commit 0ad384e

Please sign in to comment.