summaryrefslogtreecommitdiffstats
path: root/run-server.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-08-15 19:21:15 +0200
committerSuren A. Chilingaryan <csa@suren.me>2018-08-15 19:21:15 +0200
commitd4f864cbd252a6156f7cc4b04f3daf1cd5149fc0 (patch)
tree253bd26151e1d53d977344189b37bc77322036fc /run-server.sh
parent5cdb425d6843c100189611c2edb37b03efc1dc5a (diff)
downloadods-d4f864cbd252a6156f7cc4b04f3daf1cd5149fc0.tar.gz
ods-d4f864cbd252a6156f7cc4b04f3daf1cd5149fc0.tar.bz2
ods-d4f864cbd252a6156f7cc4b04f3daf1cd5149fc0.tar.xz
ods-d4f864cbd252a6156f7cc4b04f3daf1cd5149fc0.zip
Multiple configurations
Diffstat (limited to 'run-server.sh')
-rwxr-xr-xrun-server.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/run-server.sh b/run-server.sh
index 8b04859..51f947d 100755
--- a/run-server.sh
+++ b/run-server.sh
@@ -3,8 +3,11 @@
. 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 "$@"
+ bufs=800000
+ [ $ip == "0.0.0.0" ] && bufs=$((bufs * 4))
+
+# 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=$bufs 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=$bufs LD_PRELOAD=$vma_lib $ods_path/bin/onlineDetectorSimulatorServer "$@"
# $ods_path/bin/onlineDetectorSimulatorServer "$@"
}
@@ -18,14 +21,16 @@ mtu=1500 #max 9000
[ -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
+if [ $ip != "0.0.0.0" ]; then
+ ipinfo=$(ip addr show | grep $ip)
+ [ $? -eq 0 ] || { echo "Specified IP $ip is not found" ; exit 1 ; }
+ int=$(echo $ipinfo | awk '{print $NF}')
+
+ ip link set $int mtu $mtu
+fi
-ip link set $int mtu $mtu
run $ip $first_port $num_ports