From a3922d23e9c1c72cce23ffad079ab098fe70a9bf Mon Sep 17 00:00:00 2001 From: Rob Walker Date: Thu, 12 Jul 2018 15:56:52 -0700 Subject: [PATCH] fixups --- multinode-demo/common.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/multinode-demo/common.sh b/multinode-demo/common.sh index 60ff6e327d35d5..f453dd4bc155be 100644 --- a/multinode-demo/common.sh +++ b/multinode-demo/common.sh @@ -107,12 +107,14 @@ tune_networking() { # Reference: https://medium.com/@CameronSparr/increase-os-udp-buffers-to-improve-performance-51d167bb1360 [[ $(uname) = Linux ]] && ( set -x - set +e # these error out on WSL - # TODO: Check values and warn instead, it's a little rude to set them here. - sudo sysctl -w net.core.rmem_max=26214400 1>/dev/null 2>/dev/null - sudo sysctl -w net.core.rmem_default=26214400 1>/dev/null 2>/dev/null - : + # test the existence of the sysctls before trying to set them + sysctl net.core.rmem_max=26214400 2>/dev/null 1>/dev/null && + sudo sysctl -w net.core.rmem_max=26214400 1>/dev/null 2>/dev/null + + sysctl net.core.rmem_default=26214400 2>/dev/null 1>/dev/null && + sudo sysctl -w net.core.rmem_default=26214400 1>/dev/null 2>/dev/null ) + return 0 } SOLANA_CONFIG_DIR=${SNAP_DATA:-$PWD}/config