From 5172421d248250b4ab3b69eb57fd83656e23a4da Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 3 Sep 2020 03:00:30 +0200 Subject: This is unfinished work implemeting out-of-UFO network servers --- tests/roof-vma.sh | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) mode change 120000 => 100755 tests/roof-vma.sh (limited to 'tests/roof-vma.sh') diff --git a/tests/roof-vma.sh b/tests/roof-vma.sh deleted file mode 120000 index 2faff84..0000000 --- a/tests/roof-vma.sh +++ /dev/null @@ -1 +0,0 @@ -roof.sh \ No newline at end of file diff --git a/tests/roof-vma.sh b/tests/roof-vma.sh new file mode 100755 index 0000000..3e97738 --- /dev/null +++ b/tests/roof-vma.sh @@ -0,0 +1,48 @@ +#! /bin/bash + +. config.sh + +function pyroof { +# numactl --cpunodebind=1 + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib$arch" GI_TYPELIB_PATH="/usr/local/lib$arch/girepository-1.0/" \ + python3 roof.py "$@" +# numactl --cpunodebind=1 python3 roof.py "$@" +} + +if [[ "$0" =~ roof-vma ]]; then + function roof { + bufs=800000 + bufs=$((bufs * 4)) + + ulimit -l unlimited + echo 1000000000 > /proc/sys/kernel/shmmax # 18446744073692774399 + echo 8000 > /proc/sys/vm/nr_hugepages # 0 + + + tuned-adm profile latency-performance + cpupower frequency-set --governor performance # powersave + echo 100000000 > /proc/sys/kernel/sched_min_granularity_ns # 3000000 + echo 50000000 > /proc/sys/kernel/sched_migration_cost_ns # 500000 + echo 0 > /proc/sys/kernel/numa_balancing # 1 + + echo 0 > /proc/sys/vm/swappiness + sysctl -w vm.swappiness=0 + sysctl -w vm.zone_reclaim_mode=0 + echo never > /sys/kernel/mm/transparent_hugepage/enabled + + #VMA_SPEC=latency VMA_INTERNAL_THREAD_AFFINITY=1 + VMA_THREAD_MODE=3 VMA_MTU=0 VMA_RX_POLL=10 VMA_SELECT_POLL=10 VMA_RING_ALLOCATION_LOGIC_RX=20 VMA_MEM_ALLOC_TYPE=2 VMA_RX_BUFS=$bufs VMA_CQ_AIM_INTERRUPTS_RATE_PER_SEC=1000 LD_PRELOAD=$vma_lib \ + pyroof "$@" + } +else + function roof { + pyroof "$@" + } +fi + +#cat roof.yaml | sed '/simulation/,$d' | yq . > roof.json +#cat roof.yaml | yq r - -j | jq '' | sed -r '/\[$/ {:a;N;s/\]/&/;Ta;s/\n +//g;s/,(.)/, \1/}' > roof.json +#This is real +#cat roof.yaml | python3 yaml2json.py | sed -r '/\[$/ {:a;N;s/\]/&/;Ta;s/\n +//g;s/,(.)/, \1/}' > roof.json + +roof "$@" -- cgit v1.2.3