summaryrefslogtreecommitdiffstats
path: root/run-server.sh
blob: 8b04859b779da211f12b34a78ef59725e19c8b5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/bash

. config.sh

function run {
#    VMA_TRACELEVEL=DEBUG 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_lib $ods_path/bin/onlineDetectorSimulatorServer "$@"
    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_lib $ods_path/bin/onlineDetectorSimulatorServer "$@"
#    $ods_path/bin/onlineDetectorSimulatorServer "$@"
}


ip=$1
first_port=4000
num_ports=27
mtu=1500 #max 9000
[ -n "$1" ] || { echo "Usage: run <ip> [first_port] [num_ports] [mtu]" ; exit 1 ; }
[ -n "$2" ] && first_port=$2
[ -n "$3" ] && num_ports=$3
[ -n "$4" ] && mtu=$4

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 $first_port $num_ports