-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: script for setting kernel tunables and check when running neard (…
…#12577) Standalone script for setting the recommended networking settings on Linux and addition of a check when starting neard. If the settings are not right, errors will be printed without halting the process. --------- Co-authored-by: Razvan Barbascu <razvan@nearone.org> Co-authored-by: Akhilesh Singhania <akhi3030@gmail.com>
- Loading branch information
1 parent
8a4e813
commit 53503e8
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# This script sets specific sysctl parameters for running a validator. | ||
# Run it as: sudo ./set_kernel_params.sh | ||
|
||
# Increase maximum read and write buffer sizes | ||
sysctl -w net.core.rmem_max=8388608 | ||
sysctl -w net.core.wmem_max=8388608 | ||
|
||
# Configure TCP read and write memory parameters | ||
sysctl -w net.ipv4.tcp_rmem="4096 87380 8388608" | ||
sysctl -w net.ipv4.tcp_wmem="4096 16384 8388608" | ||
|
||
# Disable slow start after idle | ||
sysctl -w net.ipv4.tcp_slow_start_after_idle=0 | ||
|
||
echo "Network settings have been updated." |