forked from efficient/HERD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-servers.sh
executable file
·51 lines (42 loc) · 1.43 KB
/
run-servers.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Action:
# 1. Run server processes on the server machine
# 2. ssh into client machines and run the run-machine.sh script
shm-rm.sh # Remove hugepages
export ROCE=0 # Don't use RoCE on Apt
export APT=1
NUM_SERVERS=7 # Number of server processes on the server machine
NUM_CLIENT_MACHINES=12 # Number of client machines
rm -rf client-tput # Re-create a folder for clients to write their stuff into
mkdir client-tput
for i in `seq 1 $NUM_SERVERS`; do
id=`expr $i - 1`
sock_port=`expr 5500 + $i - 1`
if [ $APT -eq 1 ] # There is only one socket on Apt's r320 nodes
then
sudo -E ./main $id $sock_port &
else
if [ $ROCE -eq 1 ] # Susitna's RoCE RNIC is connected to CPU 0
then
core=`expr 0 + $id`
sudo -E numactl --physcpubind $core --interleave 0,1 ./main $id $sock_port &
else # Susitna's IB RNIC is connected to CPU 3
core=`expr 32 + $id`
sudo -E numactl --physcpubind $core --interleave 4,5 ./main $id $sock_port &
fi
fi
if [ $i -eq 1 ] # Give the master server plenty of time to setup
then
sleep 2
else
sleep .1
fi
done
for i in `seq 1 $NUM_CLIENT_MACHINES`; do
mc=`expr $i + 1`
client_id=`expr $mc - 2`
ssh -oStrictHostKeyChecking=no node-$mc.RDMA.fawn.apt.emulab.net "cd HERD; ./run-machine.sh $client_id" &
echo "Starting client $client_id"
# Removing this sleep sometimes causes the tput to drop drastically.
# Bug: which part of the code requires clients to connect in order?
sleep .5
done