2019-09-03 07:45:20 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
HERE="$(dirname "$0")"
|
|
|
|
|
2020-04-20 16:43:13 -07:00
|
|
|
# shellcheck source=ci/setup-new-buildkite-agent/utils.sh
|
2019-09-03 07:45:20 -07:00
|
|
|
source "$HERE"/utils.sh
|
|
|
|
|
|
|
|
ensure_env || exit 1
|
|
|
|
|
|
|
|
# Setup kernel constants
|
|
|
|
cat > /etc/sysctl.d/20-solana-node.conf <<EOF
|
|
|
|
|
|
|
|
# Solana networking requirements
|
2019-10-17 14:52:24 -07:00
|
|
|
net.core.rmem_default=134217728
|
|
|
|
net.core.rmem_max=134217728
|
|
|
|
net.core.wmem_default=134217728
|
|
|
|
net.core.wmem_max=134217728
|
2019-09-03 07:45:20 -07:00
|
|
|
|
|
|
|
# Solana earlyoom setup
|
|
|
|
kernel.sysrq=$(( $(cat /proc/sys/kernel/sysrq) | 64 ))
|
2019-11-06 08:48:45 -08:00
|
|
|
|
|
|
|
# Allow kernel and CPU perf events
|
|
|
|
kernel.perf_event_paranoid=0
|
2019-09-03 07:45:20 -07:00
|
|
|
EOF
|
|
|
|
|