diff options
Diffstat (limited to 'run-server.sh')
-rwxr-xr-x | run-server.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/run-server.sh b/run-server.sh new file mode 100755 index 0000000..7d29c10 --- /dev/null +++ b/run-server.sh @@ -0,0 +1,25 @@ +#! /bin/bash + +. config.sh + +function run { + VMA_THREAD_MODE=3 VMA_MTU=0 VMA_RX_POLL=0 VMA_SELECT_POLL=0 VMA_RING_ALLOCATION_LOGIC_RX=20 VMA_RX_BUFS=800000 LD_PRELOAD=$vma_path/lib64/libvma.so.8.6.10 $ods_path/bin/onlineDetectorSimulatorServer "$@" +} + + +ip=$1 +mtu=1500 #max 9000 +[ -n "$1" ] || { echo "Usage: run <ip> [mtu]" ; exit 1 ; } +[ -n "$2" ] && mtu=$2 + +ipinfo=$(ip addr show | grep $ip) +[ $? -eq 0 ] || { echo "Specified IP $ip is not found" ; exit 1 ; } +int=$(echo $ipinfo | awk '{print $NF}') + +echo 1000000000 > /proc/sys/kernel/shmmax # 18446744073692774399 +echo 8000 > /proc/sys/vm/nr_hugepages # 0 + + + +ip link set $int mtu $mtu +run $ip |