Skip to content

Commit

Permalink
Update docs: network optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
staffik committed Jun 12, 2024
1 parent 9a1cf98 commit 627c85a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/validator/compile-and-run-a-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ If you are looking to learn how to compile and run a NEAR validator node nativel
$ apt update
$ apt install -y git binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev cmake gcc g++ python docker.io protobuf-compiler libssl-dev pkg-config clang llvm cargo awscli
```
### Network optimizations {#network-optimizations}
To optimize the network settings for better performance, execute the following commands:
```bash
MaxExpectedPathBDP=8388608
sudo sysctl -w net.core.rmem_max=$MaxExpectedPathBDP
sudo sysctl -w net.core.wmem_max=$MaxExpectedPathBDP
sudo sysctl -w net.ipv4.tcp_rmem="4096 87380 $MaxExpectedPathBDP"
sudo sysctl -w net.ipv4.tcp_wmem="4096 16384 $MaxExpectedPathBDP"
sudo sysctl -w net.ipv4.tcp_slow_start_after_idle=0
```

It is required to apply these changes for freshly started node and after each restart.

## How to use this document {#how-to-use-this-document}

Expand Down

0 comments on commit 627c85a

Please sign in to comment.