run-experiment 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. # Get the IP addresses
  3. p0addr=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' ramen_p0)
  4. p1addr=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' ramen_p1)
  5. p2addr=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' ramen_p2)
  6. lognitems=20
  7. naccess=10
  8. if [ "$1" != "" ]; then
  9. lognitems="$1"
  10. fi
  11. if [ "$2" != "" ]; then
  12. naccess="$2"
  13. fi
  14. echo ===== Running ramen $lognitems $naccess
  15. date "+===== Start %s %F %T"
  16. savefile0=$$.p0.out
  17. savefile1=$$.p1.out
  18. savefile2=$$.p2.out
  19. docker exec -w /root/ramen ramen_p2 bash -c "$RAMEN_NUMA_P2 stdbuf -o 0 ./target/release/examples/bench_doram -a $naccess -i 2 -s $lognitems -l $p2addr -p 6000 -c 0:$p0addr:8000 --connect-timeout-seconds 30 > $savefile2 2>&1" &
  20. docker exec -w /root/ramen ramen_p1 bash -c "$RAMEN_NUMA_P1 stdbuf -o 0 ./target/release/examples/bench_doram -a $naccess -i 1 -s $lognitems -l $p1addr -p 7000 -c 2:$p2addr:6000 --connect-timeout-seconds 30 > $savefile1 2>&1" &
  21. docker exec -w /root/ramen ramen_p0 bash -c "$RAMEN_NUMA_P0 stdbuf -o 0 ./target/release/examples/bench_doram -a $naccess -i 0 -s $lognitems -l $p0addr -p 8000 -c 1:$p1addr:7000 --connect-timeout-seconds 30 > $savefile0 2>&1" &
  22. wait
  23. echo ===== P0 output
  24. docker exec -w /root/ramen ramen_p0 cat $savefile0
  25. docker exec -w /root/ramen ramen_p0 rm -f $savefile0
  26. echo ===== P1 output
  27. docker exec -w /root/ramen ramen_p1 cat $savefile1
  28. docker exec -w /root/ramen ramen_p1 rm -f $savefile1
  29. echo ===== P2 output
  30. docker exec -w /root/ramen ramen_p2 cat $savefile2
  31. docker exec -w /root/ramen ramen_p2 rm -f $savefile2
  32. date "+===== End %s %F %T"