chore: sysctl template, service burst limits (#13050)

* chore: Increase LimitNOFILE and add StartLimit for lotus-daemon service

The latter to stop hotloops

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* chore: add template sysctl file for increasing socket buffers

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* Update scripts/98-udp-buf.conf

Co-authored-by: Rod Vagg <rod@vagg.org>

---------

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
This commit is contained in:
Jakub Sztandera
2025-04-23 10:42:27 +02:00
committed by GitHub
parent 1a6c93f914
commit 61c86adedb
2 changed files with 9 additions and 1 deletions

5
scripts/98-udp-buf.conf Normal file
View File

@ -0,0 +1,5 @@
# This configuration file adjusts the UDP buffer sizes for optimal network performance.
# It sets the maximum receive (rmem_max) and send (wmem_max) buffer sizes for UDP sockets.
# This file is typically placed in the /etc/sysctl.d/ directory.
net.core.rmem_max=7500000
net.core.wmem_max=7500000

View File

@ -10,6 +10,9 @@ ExecStart=/usr/local/bin/lotus daemon
Restart=always
RestartSec=10
StartLimitIntervalSec=60s
StartLimitBurst=4
# If running a node in a shared, memory constrained environment, enable MemoryAccounting to put
# pressure on allocations. This will slow the process down but keep it approximately within the
# limit specified.
@ -17,7 +20,7 @@ RestartSec=10
#MemoryHigh=64G
#MemoryMax=96G
LimitNOFILE=8192:10240
LimitNOFILE=8192:16384
[Install]
WantedBy=multi-user.target