-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample_job_advanced.txt
111 lines (89 loc) · 5.76 KB
/
example_job_advanced.txt
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# -*- python -*-
# Define settings and jobs with python dictionaries
# default_timeout set to expected number of seconds, or None for no timeout
# test_name - The name of the test
# Send from rdbsender to zreceiver
{"settings": "",
"results_dir": "pcap", # Root dir of where to save pcap and log files
"session_name": "rdbsender_to_zreceiver",
"simulate": False, # Simulate will not execute the commands
"default_user": "root"
}
{"delay_between_session_jobs_secs": 6,
"default_session_job_timeout_secs": None,
"default_settings": { "thin-rdb": { "stream_duration": "-d 5",
"stream": "-I d:2,i:80,S:100",
"stream_count": "-c 1",
"options": "-r"
},
"thin" : { "stream_duration": "-d 5",
"stream": "-I d:2,i:80,S:100",
"stream_count": "-c 1",
"options": ""
},
"netem_uplink": { "delay": "delay 200ms 30ms 25%", "loss": "loss 0.1%" },
"netem_downlink": { "delay": "delay 200ms 30ms 25%", "loss": "" },
},
"session_jobs": [
{"description": "1 thin vs 1 thin rdb streams",
"name_id": "1thin_vs_1thin_rdb",
"substitutions": { "thin-rdb": { "stream_count": "-c 1" }, "thin": { "stream_count": "-c 1" } }
},
{"description": "2 thin vs 2 thin rdb streams",
"name_id": "2thin_vs_2thin_rdb",
"substitutions": { "thin-rdb": { "stream_count": "-c 2" }, "thin": { "stream_count": "-c 2" } }
},
{"description": "70 thin vs 70 thin rdb streams",
"name_id": "70thin_vs_70thin_rdb",
"substitutions": { "thin-rdb": { "stream_count": "-c 70" }, "thin": { "stream_count": "-c 70" } }
},
]}
# Setup tcpdump for zreceiver
{"host" : "root@zreceiver", "logfile" : "zreceiver_tcpdump.log", "type" : "ssh", "kill" : True }
{"command" : "tcpdump -i eth1 -nn -w test.pcap" }
{"host" : "root@rdbsender", "logfile" : "rdbsender_tcpdump.log", "type" : "ssh", "kill" : True }
{"command" : "tcpdump -i eth1 -nn -w test.pcap" }
{"host" : "root@rdbsender", "logfile" : "rdbsender_ttrace.log", "type" : "ssh", "kill" : True }
{"command" : "/root/ttrace.sh" }
# Setup netem
# 'wait' here means that this job must finish before we continue
{"host" : "root@bridge2", "logfile" : "bridge2.log", "type" : "ssh", "wait": True }
{"command" : "sysctl -w net.ipv4.tcp_retrans_collapse=0" }
{"command" : "tc qdisc del dev eth1 root", "return_values": {"pass":[0,2]} } # If no root device exists, exit value 2 should also pass
{"command" : "tc qdisc add dev eth1 handle 1: root htb" }
{"command" : "tc class add dev eth1 parent 1: classid 1:1 htb rate 1Mbps" }
{"command" : "tc class add dev eth1 parent 1:1 classid 1:11 htb rate 1Mbps" }
{"command" : "tc qdisc add dev eth1 parent 1:11 handle 10: netem %(delay)s %(loss)s", "substitute_id": "netem_uplink" }
{"command" : "tc filter add dev eth1 protocol ip prio 1 u32 match ip dport 5000 0xffff flowid 1:11" }
{"command" : "tc qdisc del dev eth3 root" }
{"command" : "tc qdisc add dev eth3 handle 1: root htb" }
{"command" : "tc class add dev eth3 parent 1: classid 1:1 htb rate 1Mbps" }
{"command" : "tc class add dev eth3 parent 1:1 classid 1:11 htb rate 1Mbps" }
{"command" : "tc qdisc add dev eth3 parent 1:11 handle 10: netem delay 200ms 30ms 25%" }
{"command" : "tc filter add dev eth3 protocol ip prio 1 u32 match ip dport 5000 0xffff flowid 1:11" }
{"host" : "root@rdbsender", "logfile" : "rdbsender_ttrace.log", "type" : "ssh", "kill" : True }
{"command" : "/root/ttrace.sh" }
# Wait for tcpdump to setup
{"sleep" : 1 }
{"host" : "root@zreceiver", "logfile" : "zreceiver.log", "type" : "ssh", "kill" : True }
{"command" : "/root/streamzero_srv -p 5000 -A" }
{"host" : "root@zreceiver", "logfile" : "zreceiver2.log", "type" : "ssh", "kill" : True }
{"command" : "/root/streamzero_srv -p 5001 -A" }
# Wait for servers to start up
{"sleep" : 1 }
{"host" : "root@rdbsender", "id": "thin-rdb", "logfile" : "rdbsender1.log", "type" : "ssh", "print_output" : False, "color": "yellow" }
{"command" : "sysctl -w net.ipv4.tcp_retrans_collapse=0" }
{"command" : "/root/streamzero_client -s 10.0.0.13 -p 5000 -P 15001 -v2 -z -x %(stream_duration)s %(stream)s %(stream_count)s %(options)s", "substitute_id": "thin-rdb"}
{"host" : "root@rdbsender", "logfile" : "rdbsender2.log", "type" : "ssh", "print_output" : False, "color": "cyan" }
{"command" : "sysctl -w net.ipv4.tcp_retrans_collapse=0" }
{"command" : "/root/streamzero_client -s 10.0.0.13 -p 5001 -P 16001 -v2 -z -x %(stream_duration)s %(stream)s %(stream_count)s %(options)s", "substitute_id": "thin", "print_output" : False }
# Wait for jobs (threads) to finish. When processes has finished, sleep 5 seconds before continuing
{"wait" : "", "sleep": 5 }
# Cleanup
{"host" : "root@bridge2", "logfile" : "bridge2_cleanup.log", "type" : "ssh", "cleanup": True }
{"command" : "sysctl -w net.ipv4.tcp_retrans_collapse=0" }
{"command" : "tc qdisc del dev eth1 root", "return_values": {"pass":[0,2]} } # If no root device exists, exit value 2 should also pass
# Copy pcap files
{"type" : "scp", "host" : "localhost", "remote_host" : "root@zreceiver", "filename": "test.pcap", "target_filename": "zreceiver.pcap", "logfile" : "zreceiver_scp.log", }
{"type" : "scp", "host" : "localhost", "remote_host" : "root@rdbsender", "filename": "test.pcap", "target_filename": "rdbsender.pcap", "logfile" : "rdbsender_scp.log", }
{"type" : "scp", "host" : "localhost", "remote_host" : "root@rdbsender", "filename": "ftrace.log", "target_filename": "rdbsender.ftrace", "logfile" : "rdbsender_scp_ftrace.log" }