From 16eb31236cdee6621b14de9d68844433aef21811 Mon Sep 17 00:00:00 2001 From: stolet Date: Wed, 19 Apr 2023 14:29:33 +0200 Subject: [PATCH] Make perf iso exps the same --- experiments/components/vm.py | 3 + .../exps/perf_iso_latconn/configs/bare_tas.py | 10 +-- .../perf_iso_latconn/configs/bare_vtas.py | 10 +-- .../perf_iso_latconn/configs/ovs_linux.py | 8 +-- .../exps/perf_iso_latconn/configs/ovs_tas.py | 12 ++-- .../exps/perf_iso_latconn/configs/virt_tas.py | 10 +-- .../exps/perf_iso_latconn/perf_iso_latconn.py | 10 +-- .../perf_iso_latmsize/configs/bare_tas.py | 10 +-- .../perf_iso_latmsize/configs/bare_vtas.py | 10 +-- .../perf_iso_latmsize/configs/ovs_linux.py | 8 +-- .../exps/perf_iso_latmsize/configs/ovs_tas.py | 12 ++-- .../perf_iso_latmsize/configs/virt_tas.py | 10 +-- experiments/exps/perf_iso_latmsize/parse.py | 49 ++++++++------ .../exps/perf_iso_latmsize/plot_script.plt | 40 +++++------ .../exps/perf_iso_tpconn/configs/bare_tas.py | 10 +-- .../exps/perf_iso_tpconn/configs/bare_vtas.py | 10 +-- .../exps/perf_iso_tpconn/configs/ovs_linux.py | 8 +-- .../exps/perf_iso_tpconn/configs/ovs_tas.py | 12 ++-- .../exps/perf_iso_tpconn/configs/virt_tas.py | 10 +-- experiments/exps/perf_iso_tpconn/parse.py | 9 +-- .../exps/perf_iso_tpconn/perf_iso_tpconn.py | 10 +-- .../exps/perf_iso_tpmsize/configs/bare_tas.py | 10 +-- .../perf_iso_tpmsize/configs/bare_vtas.py | 10 +-- .../perf_iso_tpmsize/configs/ovs_linux.py | 8 +-- .../exps/perf_iso_tpmsize/configs/ovs_tas.py | 12 ++-- .../exps/perf_iso_tpmsize/configs/virt_tas.py | 10 +-- experiments/exps/perf_iso_tpmsize/parse.py | 48 ++++++++------ .../exps/perf_iso_tpmsize/plot_script.plt | 10 +-- experiments/nodes/node.py | 6 +- experiments/plot_utils.py | 66 +++++++++++++------ experiments/run.py | 3 +- images/start-vm.sh | 10 +-- 32 files changed, 255 insertions(+), 209 deletions(-) diff --git a/experiments/components/vm.py b/experiments/components/vm.py index 687d72d3..1005d4e3 100644 --- a/experiments/components/vm.py +++ b/experiments/components/vm.py @@ -31,8 +31,11 @@ def enable_hugepages(self): def enable_noiommu(self, vendor_id): self.pane.send_keys("sudo su -") + time.sleep(1) self.pane.send_keys("sudo echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode") + time.sleep(1) self.pane.send_keys("sudo echo {} > /sys/bus/pci/drivers/vfio-pci/new_id".format(vendor_id)) + time.sleep(1) self.pane.send_keys("exit") time.sleep(1) diff --git a/experiments/exps/perf_iso_latconn/configs/bare_tas.py b/experiments/exps/perf_iso_latconn/configs/bare_tas.py index d69c2dfa..87142d0e 100644 --- a/experiments/exps/perf_iso_latconn/configs/bare_tas.py +++ b/experiments/exps/perf_iso_latconn/configs/bare_tas.py @@ -28,18 +28,18 @@ def __init__(self, exp_name, nconns): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -65,7 +65,7 @@ def __init__(self, exp_name, nconns): project_dir=self.defaults.default_otas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.c_tas_configs.append(tas_config) client0_config = ClientConfig(exp_name=exp_name, diff --git a/experiments/exps/perf_iso_latconn/configs/bare_vtas.py b/experiments/exps/perf_iso_latconn/configs/bare_vtas.py index da7570a4..084c9d98 100644 --- a/experiments/exps/perf_iso_latconn/configs/bare_vtas.py +++ b/experiments/exps/perf_iso_latconn/configs/bare_vtas.py @@ -28,18 +28,18 @@ def __init__(self, exp_name, nconns): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -65,7 +65,7 @@ def __init__(self, exp_name, nconns): project_dir=self.defaults.default_vtas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --vm-shm-len=4294967296' + tas_config.args = tas_config.args + ' --vm-shm-len=8589934592' self.c_tas_configs.append(tas_config) client0_config = ClientConfig(exp_name=exp_name, diff --git a/experiments/exps/perf_iso_latconn/configs/ovs_linux.py b/experiments/exps/perf_iso_latconn/configs/ovs_linux.py index 320c27c9..5ee30ea6 100644 --- a/experiments/exps/perf_iso_latconn/configs/ovs_linux.py +++ b/experiments/exps/perf_iso_latconn/configs/ovs_linux.py @@ -29,18 +29,18 @@ def __init__(self, exp_name, nconns): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) diff --git a/experiments/exps/perf_iso_latconn/configs/ovs_tas.py b/experiments/exps/perf_iso_latconn/configs/ovs_tas.py index 283e5243..3a79deab 100644 --- a/experiments/exps/perf_iso_latconn/configs/ovs_tas.py +++ b/experiments/exps/perf_iso_latconn/configs/ovs_tas.py @@ -29,18 +29,18 @@ def __init__(self, exp_name, nconns): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -72,7 +72,7 @@ def __init__(self, exp_name, nconns): project_dir=self.defaults.default_otas_dir_virt, ip=vm0_config.tas_tap_ip, n_cores=1, dpdk_extra="00:03.0") - tas0_config.args = tas0_config.args + ' --shm-len=4294967296' + tas0_config.args = tas0_config.args + ' --shm-len=8589934592' vm1_config = VMConfig(pane=self.defaults.c_vm_pane, @@ -85,7 +85,7 @@ def __init__(self, exp_name, nconns): project_dir=self.defaults.default_otas_dir_virt, ip=vm1_config.tas_tap_ip, n_cores=1, dpdk_extra="00:03.0") - tas1_config.args = tas1_config.args + ' --shm-len=4294967296' + tas1_config.args = tas1_config.args + ' --shm-len=8589934592' self.c_tas_configs.append(tas0_config) diff --git a/experiments/exps/perf_iso_latconn/configs/virt_tas.py b/experiments/exps/perf_iso_latconn/configs/virt_tas.py index 0fcff46e..b09bf4dd 100644 --- a/experiments/exps/perf_iso_latconn/configs/virt_tas.py +++ b/experiments/exps/perf_iso_latconn/configs/virt_tas.py @@ -31,18 +31,18 @@ def __init__(self, exp_name, nconns): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -68,7 +68,7 @@ def __init__(self, exp_name, nconns): project_dir=self.defaults.default_vtas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --vm-shm-len=4294967296' + tas_config.args = tas_config.args + ' --vm-shm-len=8589934592' self.c_tas_configs.append(tas_config) self.c_proxyh_config = HostProxyConfig(pane=self.defaults.c_proxyh_pane, diff --git a/experiments/exps/perf_iso_latconn/perf_iso_latconn.py b/experiments/exps/perf_iso_latconn/perf_iso_latconn.py index f41e3679..ee153ada 100644 --- a/experiments/exps/perf_iso_latconn/perf_iso_latconn.py +++ b/experiments/exps/perf_iso_latconn/perf_iso_latconn.py @@ -8,7 +8,7 @@ experiments = [] -n_conns = [128, 256, 512, 1024, 2048, 4096, 8192] +n_conns = [128, 256, 512, 1024, 2048, 4096, 8192, 16384] n_runs = 3 for n_r in range(n_runs): @@ -20,9 +20,9 @@ ovs_linux_exp = exp.Experiment(OVSLinuxConf(exp_name + "ovs-linux", n_c), name=exp_name) ovs_tas_exp = exp.Experiment(OVSTasConf(exp_name + "ovs-tas", n_c), name=exp_name) - # experiments.append(tas_bare_exp) - # experiments.append(vtas_bare_exp) - # experiments.append(tas_virt_exp) + experiments.append(tas_bare_exp) + experiments.append(vtas_bare_exp) + experiments.append(tas_virt_exp) experiments.append(ovs_tas_exp) - # experiments.append(ovs_linux_exp) + experiments.append(ovs_linux_exp) diff --git a/experiments/exps/perf_iso_latmsize/configs/bare_tas.py b/experiments/exps/perf_iso_latmsize/configs/bare_tas.py index b40c9f2f..c60422d4 100644 --- a/experiments/exps/perf_iso_latmsize/configs/bare_tas.py +++ b/experiments/exps/perf_iso_latmsize/configs/bare_tas.py @@ -28,18 +28,18 @@ def __init__(self, exp_name, msize): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -65,7 +65,7 @@ def __init__(self, exp_name, msize): project_dir=self.defaults.default_otas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.c_tas_configs.append(tas_config) client0_config = ClientConfig(exp_name=exp_name, diff --git a/experiments/exps/perf_iso_latmsize/configs/bare_vtas.py b/experiments/exps/perf_iso_latmsize/configs/bare_vtas.py index 57754525..f346fb50 100644 --- a/experiments/exps/perf_iso_latmsize/configs/bare_vtas.py +++ b/experiments/exps/perf_iso_latmsize/configs/bare_vtas.py @@ -28,18 +28,18 @@ def __init__(self, exp_name, msize): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -65,7 +65,7 @@ def __init__(self, exp_name, msize): project_dir=self.defaults.default_vtas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --vm-shm-len=4294967296' + tas_config.args = tas_config.args + ' --vm-shm-len=8589934592' self.c_tas_configs.append(tas_config) client0_config = ClientConfig(exp_name=exp_name, diff --git a/experiments/exps/perf_iso_latmsize/configs/ovs_linux.py b/experiments/exps/perf_iso_latmsize/configs/ovs_linux.py index fbf948b3..fd0a8663 100644 --- a/experiments/exps/perf_iso_latmsize/configs/ovs_linux.py +++ b/experiments/exps/perf_iso_latmsize/configs/ovs_linux.py @@ -29,18 +29,18 @@ def __init__(self, exp_name, msize): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) diff --git a/experiments/exps/perf_iso_latmsize/configs/ovs_tas.py b/experiments/exps/perf_iso_latmsize/configs/ovs_tas.py index cd985cd3..131c4221 100644 --- a/experiments/exps/perf_iso_latmsize/configs/ovs_tas.py +++ b/experiments/exps/perf_iso_latmsize/configs/ovs_tas.py @@ -29,18 +29,18 @@ def __init__(self, exp_name, msize): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -72,7 +72,7 @@ def __init__(self, exp_name, msize): project_dir=self.defaults.default_otas_dir_virt, ip=vm0_config.tas_tap_ip, n_cores=1, dpdk_extra="00:03.0") - tas0_config.args = tas0_config.args + ' --shm-len=4294967296' + tas0_config.args = tas0_config.args + ' --shm-len=8589934592' vm1_config = VMConfig(pane=self.defaults.c_vm_pane, @@ -85,7 +85,7 @@ def __init__(self, exp_name, msize): project_dir=self.defaults.default_otas_dir_virt, ip=vm1_config.tas_tap_ip, n_cores=1, dpdk_extra="00:03.0") - tas1_config.args = tas1_config.args + ' --shm-len=4294967296' + tas1_config.args = tas1_config.args + ' --shm-len=8589934592' self.c_tas_configs.append(tas0_config) diff --git a/experiments/exps/perf_iso_latmsize/configs/virt_tas.py b/experiments/exps/perf_iso_latmsize/configs/virt_tas.py index 65d653f8..38ca219d 100644 --- a/experiments/exps/perf_iso_latmsize/configs/virt_tas.py +++ b/experiments/exps/perf_iso_latmsize/configs/virt_tas.py @@ -31,18 +31,18 @@ def __init__(self, exp_name, msize): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -68,7 +68,7 @@ def __init__(self, exp_name, msize): project_dir=self.defaults.default_vtas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --vm-shm-len=4294967296' + tas_config.args = tas_config.args + ' --vm-shm-len=8589934592' self.c_tas_configs.append(tas_config) self.c_proxyh_config = HostProxyConfig(pane=self.defaults.c_proxyh_pane, diff --git a/experiments/exps/perf_iso_latmsize/parse.py b/experiments/exps/perf_iso_latmsize/parse.py index edc29989..6370e2a1 100644 --- a/experiments/exps/perf_iso_latmsize/parse.py +++ b/experiments/exps/perf_iso_latmsize/parse.py @@ -2,6 +2,7 @@ sys.path.append("../../../") import os +import numpy as np import experiments.plot_utils as putils @@ -52,7 +53,7 @@ def parse_metadata(): return data def parse_data(parsed_md): - lat_list = {} + data = {} out_dir = "./out/" for msize in parsed_md: data_point = {} @@ -60,22 +61,27 @@ def parse_data(parsed_md): latencies = putils.init_latencies() for run in parsed_md[msize][stack]: fname_c0 = out_dir + parsed_md[msize][stack][run]['0']['0'] - putils.add_latencies(latencies, fname_c0) - - putils.divide_latencies(latencies, len(parsed_md[msize][stack])) - data_point[stack] = latencies - - lat_list[msize] = data_point + putils.append_latencies(latencies, fname_c0) + + data_point[stack] = { + "lat": putils.get_latency_avg(latencies), + "std": putils.get_latency_std(latencies) + } + data[msize] = data_point - return lat_list + return data -def save_dat_file(exp_lats): - header = "nconns bare-tas bare-vtas virt-tas ovs-linux ovs-tas\n" +def save_dat_file(data): + header = "msize " + \ + "bare-tas-avg bare-vtas-avg virt-tas-avg " + \ + "ovs-linux-avg " + \ + "bare-tas-std bare-vtas-std virt-tas-std " + \ + "ovs-linux-std\n" - msizes = list(exp_lats.keys()) + msizes = list(data.keys()) msizes = list(map(str, sorted(map(int, msizes)))) - stacks = list(exp_lats[msizes[0]].keys()) - percentiles = list(exp_lats[msizes[0]][stacks[0]].keys()) + stacks = list(data[msizes[0]].keys()) + percentiles = list(data[msizes[0]][stacks[0]]['lat'].keys()) for percentile in percentiles: fname = "./lat_{}.dat".format(percentile) @@ -83,14 +89,17 @@ def save_dat_file(exp_lats): f.write(header) for msize in msizes: - f.write("{} {} {} {} {} {}\n".format( + f.write("{} {} {} {} {} {} {} {} {}\n".format( msize, - exp_lats[msize]['bare-tas'][percentile], - exp_lats[msize]['bare-vtas'][percentile], - exp_lats[msize]['virt-tas'][percentile], - exp_lats[msize]['ovs-linux'][percentile], - exp_lats[msize]['ovs-tas'][percentile]) - ) + data[msize]['bare-tas']['lat'][percentile], + data[msize]['bare-vtas']["lat"][percentile], + data[msize]['virt-tas']["lat"][percentile], + data[msize]['ovs-linux']["lat"][percentile], + data[msize]['bare-tas']["std"][percentile], + data[msize]['bare-vtas']["std"][percentile], + data[msize]['virt-tas']["std"][percentile], + data[msize]['ovs-linux']["std"][percentile])) + def main(): parsed_md = parse_metadata() diff --git a/experiments/exps/perf_iso_latmsize/plot_script.plt b/experiments/exps/perf_iso_latmsize/plot_script.plt index e7d6de98..cfa26593 100644 --- a/experiments/exps/perf_iso_latmsize/plot_script.plt +++ b/experiments/exps/perf_iso_latmsize/plot_script.plt @@ -25,22 +25,22 @@ unset xtics set key center left set yrange [0:] set title "50p Latency" -plot 'lat_50p.dat' using 1:2:xtic(1) title 'bare-tas' linetype 2 ps 0.3 w lp, \ - 'lat_50p.dat' using 1:3:xtic(1) title 'bare-virtuoso' linetype 3 ps 0.3 w lp, \ - 'lat_50p.dat' using 1:4:xtic(1) title 'virtuoso' linetype 4 ps 0.3 w lp, \ - 'lat_50p.dat' using 1:5:xtic(1) title 'ovs-linux' linetype 5 ps 0.3 w lp, \ - 'lat_50p.dat' using 1:6:xtic(1) title 'ovs-tas' linetype 6 ps 0.3 w lp, \ +plot 'lat_50p.dat' using 1:2:6 with yerrorlines title 'bare-tas' linetype 2 ps 0.3, \ + 'lat_50p.dat' using 1:3:7 with yerrorlines title 'bare-virtuoso' linetype 3 ps 0.3, \ + 'lat_50p.dat' using 1:4:8 with yerrorlines title 'virtuoso' linetype 4 ps 0.3, \ + 'lat_50p.dat' using 1:5:9 with yerrorlines title 'ovs-linux' linetype 5 ps 0.3, \ + # 'lat_50p.dat' using 1:6: with yerrorlines title 'ovs-tas' linetype 6 ps 0.3, \ # Plot 90p latency unset xtics set key top right set yrange [0:] set title "90p Latency" -plot 'lat_90p.dat' using 1:2:xtic(1) title 'bare-tas' linetype 2 ps 0.3 w lp, \ - 'lat_90p.dat' using 1:3:xtic(1) title 'bare-virtuoso' linetype 3 ps 0.3 w lp, \ - 'lat_90p.dat' using 1:4:xtic(1) title 'virtuoso' linetype 4 ps 0.3 w lp, \ - 'lat_90p.dat' using 1:5:xtic(1) title 'ovs-linux' linetype 5 ps 0.3 w lp, \ - 'lat_90p.dat' using 1:6:xtic(1) title 'ovs-tas' linetype 6 ps 0.3 w lp, \ +plot 'lat_90p.dat' using 1:2:6 with yerrorlines title 'bare-tas' linetype 2 ps 0.3, \ + 'lat_90p.dat' using 1:3:7 with yerrorlines title 'bare-virtuoso' linetype 3 ps 0.3, \ + 'lat_90p.dat' using 1:4:8 with yerrorlines title 'virtuoso' linetype 4 ps 0.3, \ + 'lat_90p.dat' using 1:5:9 with yerrorlines title 'ovs-linux' linetype 5 ps 0.3, \ + # 'lat_90p.dat' using 1:6: with yerrorlines title 'ovs-tas' linetype 6 ps 0.3, \ # Plot 99p latency @@ -49,11 +49,11 @@ set xtics font "Computer Modern Roman,6" set key center left set yrange [0:] set title "99p Latency" -plot 'lat_99p.dat' using 1:2:xtic(1) title 'bare-tas' linetype 2 ps 0.3 w lp, \ - 'lat_99p.dat' using 1:3:xtic(1) title 'bare-virtuoso' linetype 3 ps 0.3 w lp, \ - 'lat_99p.dat' using 1:4:xtic(1) title 'virtuoso' linetype 4 ps 0.3 w lp, \ - 'lat_99p.dat' using 1:5:xtic(1) title 'ovs-linux' linetype 5 ps 0.3 w lp, \ - 'lat_99p.dat' using 1:6:xtic(1) title 'ovs-tas' linetype 6 ps 0.3 w lp, \ +plot 'lat_99p.dat' using 1:2:6 with yerrorlines title 'bare-tas' linetype 2 ps 0.3, \ + 'lat_99p.dat' using 1:3:7 with yerrorlines title 'bare-virtuoso' linetype 3 ps 0.3, \ + 'lat_99p.dat' using 1:4:8 with yerrorlines title 'virtuoso' linetype 4 ps 0.3, \ + 'lat_99p.dat' using 1:5:9 with yerrorlines title 'ovs-linux' linetype 5 ps 0.3, \ + # 'lat_99p.dat' using 1:6: with yerrorlines title 'ovs-tas' linetype 6 ps 0.3, \ # Plot 99.9p latency set xtics @@ -61,8 +61,8 @@ set xtics font "Computer Modern Roman,6" set key center right set yrange [0:] set title "99.9p Latency" -plot 'lat_99.9p.dat' using 1:2:xtic(1) title 'bare-tas' linetype 2 ps 0.3 w lp, \ - 'lat_99.9p.dat' using 1:3:xtic(1) title 'bare-virtuoso' linetype 3 ps 0.3 w lp, \ - 'lat_99.9p.dat' using 1:4:xtic(1) title 'virtuoso' linetype 4 ps 0.3 w lp, \ - 'lat_99.9p.dat' using 1:5:xtic(1) title 'ovs-linux' linetype 5 ps 0.3 w lp, \ - 'lat_99.9p.dat' using 1:6:xtic(1) title 'ovs-tas' linetype 6 ps 0.3 w lp, \ +plot 'lat_99.9p.dat' using 1:2:6 with yerrorlines title 'bare-tas' linetype 2 ps 0.3, \ + 'lat_99.9p.dat' using 1:3:7 with yerrorlines title 'bare-virtuoso' linetype 3 ps 0.3, \ + 'lat_99.9p.dat' using 1:4:8 with yerrorlines title 'virtuoso' linetype 4 ps 0.3, \ + 'lat_99.9p.dat' using 1:5:9 with yerrorlines title 'ovs-linux' linetype 5 ps 0.3, \ + # 'lat_99.9p.dat' using 1:6: with yerrorlines title 'ovs-tas' linetype 6 ps 0.3, \ diff --git a/experiments/exps/perf_iso_tpconn/configs/bare_tas.py b/experiments/exps/perf_iso_tpconn/configs/bare_tas.py index 74a375f8..c5c95fc5 100644 --- a/experiments/exps/perf_iso_tpconn/configs/bare_tas.py +++ b/experiments/exps/perf_iso_tpconn/configs/bare_tas.py @@ -28,18 +28,18 @@ def __init__(self, exp_name, nconns): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -65,7 +65,7 @@ def __init__(self, exp_name, nconns): project_dir=self.defaults.default_otas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.c_tas_configs.append(tas_config) client0_config = ClientConfig(exp_name=exp_name, diff --git a/experiments/exps/perf_iso_tpconn/configs/bare_vtas.py b/experiments/exps/perf_iso_tpconn/configs/bare_vtas.py index 9d771734..9b9e5541 100644 --- a/experiments/exps/perf_iso_tpconn/configs/bare_vtas.py +++ b/experiments/exps/perf_iso_tpconn/configs/bare_vtas.py @@ -28,18 +28,18 @@ def __init__(self, exp_name, nconns): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, groupid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, groupid=1, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) @@ -66,7 +66,7 @@ def __init__(self, exp_name, nconns): project_dir=self.defaults.default_vtas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --vm-shm-len=4294967296' + tas_config.args = tas_config.args + ' --vm-shm-len=8589934592' self.c_tas_configs.append(tas_config) client0_config = ClientConfig(exp_name=exp_name, diff --git a/experiments/exps/perf_iso_tpconn/configs/ovs_linux.py b/experiments/exps/perf_iso_tpconn/configs/ovs_linux.py index 19545cd7..838e5983 100644 --- a/experiments/exps/perf_iso_tpconn/configs/ovs_linux.py +++ b/experiments/exps/perf_iso_tpconn/configs/ovs_linux.py @@ -29,18 +29,18 @@ def __init__(self, exp_name, nconns): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) diff --git a/experiments/exps/perf_iso_tpconn/configs/ovs_tas.py b/experiments/exps/perf_iso_tpconn/configs/ovs_tas.py index d7c95f24..4ada0270 100644 --- a/experiments/exps/perf_iso_tpconn/configs/ovs_tas.py +++ b/experiments/exps/perf_iso_tpconn/configs/ovs_tas.py @@ -29,18 +29,18 @@ def __init__(self, exp_name, nconns): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -71,7 +71,7 @@ def __init__(self, exp_name, nconns): project_dir=self.defaults.default_otas_dir_virt, ip=vm0_config.vm_ip, n_cores=1, dpdk_extra="00:03.0") - tas0_config.args = tas0_config.args + ' --shm-len=4294967296' + tas0_config.args = tas0_config.args + ' --shm-len=8589934592' vm1_config = VMConfig(pane=self.defaults.c_vm_pane, @@ -84,7 +84,7 @@ def __init__(self, exp_name, nconns): project_dir=self.defaults.default_otas_dir_virt, ip=vm1_config.vm_ip, n_cores=1, dpdk_extra="00:03.0") - tas1_config.args = tas1_config.args + ' --shm-len=4294967296' + tas1_config.args = tas1_config.args + ' --shm-len=8589934592' self.c_tas_configs.append(tas0_config) diff --git a/experiments/exps/perf_iso_tpconn/configs/virt_tas.py b/experiments/exps/perf_iso_tpconn/configs/virt_tas.py index 53c0d125..f7cd6534 100644 --- a/experiments/exps/perf_iso_tpconn/configs/virt_tas.py +++ b/experiments/exps/perf_iso_tpconn/configs/virt_tas.py @@ -31,18 +31,18 @@ def __init__(self, exp_name, nconns): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -68,7 +68,7 @@ def __init__(self, exp_name, nconns): project_dir=self.defaults.default_vtas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --vm-shm-len=4294967296' + tas_config.args = tas_config.args + ' --vm-shm-len=8589934592' self.c_tas_configs.append(tas_config) self.c_proxyh_config = HostProxyConfig(pane=self.defaults.c_proxyh_pane, diff --git a/experiments/exps/perf_iso_tpconn/parse.py b/experiments/exps/perf_iso_tpconn/parse.py index 60cc62f6..e139dba5 100644 --- a/experiments/exps/perf_iso_tpconn/parse.py +++ b/experiments/exps/perf_iso_tpconn/parse.py @@ -104,10 +104,11 @@ def parse_data(parsed_md): def save_dat_file(data, fname): f = open(fname, "w+") - header = "nconns bare-tas-avg bare-vtas-avg " + \ - "virt-tas-avg ovs-linux-avg ovs-tas-avg " + \ - "bare-tas-std " + \ - "virt-tas-std ovs-linux-std\n" + header = "nconns " + \ + "bare-tas-avg bare-vtas-avg virt-tas-avg " + \ + "ovs-linux-avg " + \ + "bare-tas-std bare-vtas-std virt-tas-std " + \ + "ovs-linux-std\n" f.write(header) for dp in data: f.write("{} {} {} {} {} {} {} {} {}\n".format( diff --git a/experiments/exps/perf_iso_tpconn/perf_iso_tpconn.py b/experiments/exps/perf_iso_tpconn/perf_iso_tpconn.py index 1c262dac..319040af 100644 --- a/experiments/exps/perf_iso_tpconn/perf_iso_tpconn.py +++ b/experiments/exps/perf_iso_tpconn/perf_iso_tpconn.py @@ -8,7 +8,7 @@ experiments = [] -n_conns = [128, 256, 512, 1024, 2048, 4096, 8192] +n_conns = [128, 256, 512, 1024, 2048, 4096, 8192, 16384] n_runs = 3 for n_r in range(n_runs): @@ -20,9 +20,9 @@ ovs_linux_exp = exp.Experiment(OVSLinuxConf(exp_name + "ovs-linux", n_c), name=exp_name) ovs_tas_exp = exp.Experiment(OVSTasConf(exp_name + "ovs-tas", n_c), name=exp_name) - # experiments.append(tas_bare_exp) - # experiments.append(vtas_bare_exp) - # experiments.append(tas_virt_exp) + experiments.append(tas_bare_exp) + experiments.append(vtas_bare_exp) + experiments.append(tas_virt_exp) experiments.append(ovs_tas_exp) - # experiments.append(ovs_linux_exp) + experiments.append(ovs_linux_exp) diff --git a/experiments/exps/perf_iso_tpmsize/configs/bare_tas.py b/experiments/exps/perf_iso_tpmsize/configs/bare_tas.py index 3ec57379..33275fbc 100644 --- a/experiments/exps/perf_iso_tpmsize/configs/bare_tas.py +++ b/experiments/exps/perf_iso_tpmsize/configs/bare_tas.py @@ -28,18 +28,18 @@ def __init__(self, exp_name, msize): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -65,7 +65,7 @@ def __init__(self, exp_name, msize): project_dir=self.defaults.default_otas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.c_tas_configs.append(tas_config) client0_config = ClientConfig(exp_name=exp_name, diff --git a/experiments/exps/perf_iso_tpmsize/configs/bare_vtas.py b/experiments/exps/perf_iso_tpmsize/configs/bare_vtas.py index a9533f54..eeb52beb 100644 --- a/experiments/exps/perf_iso_tpmsize/configs/bare_vtas.py +++ b/experiments/exps/perf_iso_tpmsize/configs/bare_vtas.py @@ -28,18 +28,18 @@ def __init__(self, exp_name, msize): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, groupid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, groupid=1, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) @@ -66,7 +66,7 @@ def __init__(self, exp_name, msize): project_dir=self.defaults.default_vtas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --vm-shm-len=4294967296' + tas_config.args = tas_config.args + ' --vm-shm-len=8589934592' self.c_tas_configs.append(tas_config) client0_config = ClientConfig(exp_name=exp_name, diff --git a/experiments/exps/perf_iso_tpmsize/configs/ovs_linux.py b/experiments/exps/perf_iso_tpmsize/configs/ovs_linux.py index eafeb4d1..92b0897a 100644 --- a/experiments/exps/perf_iso_tpmsize/configs/ovs_linux.py +++ b/experiments/exps/perf_iso_tpmsize/configs/ovs_linux.py @@ -29,18 +29,18 @@ def __init__(self, exp_name, msize): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) diff --git a/experiments/exps/perf_iso_tpmsize/configs/ovs_tas.py b/experiments/exps/perf_iso_tpmsize/configs/ovs_tas.py index 3c5942ec..9a94a730 100644 --- a/experiments/exps/perf_iso_tpmsize/configs/ovs_tas.py +++ b/experiments/exps/perf_iso_tpmsize/configs/ovs_tas.py @@ -29,18 +29,18 @@ def __init__(self, exp_name, msize): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -72,7 +72,7 @@ def __init__(self, exp_name, msize): project_dir=self.defaults.default_otas_dir_virt, ip=vm0_config.tas_tap_ip, n_cores=1, dpdk_extra="00:03.0") - tas0_config.args = tas0_config.args + ' --shm-len=4294967296' + tas0_config.args = tas0_config.args + ' --shm-len=8589934592' vm1_config = VMConfig(pane=self.defaults.c_vm_pane, @@ -85,7 +85,7 @@ def __init__(self, exp_name, msize): project_dir=self.defaults.default_otas_dir_virt, ip=vm1_config.tas_tap_ip, n_cores=1, dpdk_extra="00:03.0") - tas1_config.args = tas1_config.args + ' --shm-len=4294967296' + tas1_config.args = tas1_config.args + ' --shm-len=8589934592' self.c_tas_configs.append(tas0_config) diff --git a/experiments/exps/perf_iso_tpmsize/configs/virt_tas.py b/experiments/exps/perf_iso_tpmsize/configs/virt_tas.py index fb0a7924..1f6e939c 100644 --- a/experiments/exps/perf_iso_tpmsize/configs/virt_tas.py +++ b/experiments/exps/perf_iso_tpmsize/configs/virt_tas.py @@ -31,18 +31,18 @@ def __init__(self, exp_name, msize): machine_config=self.s_machine_config, project_dir=self.defaults.default_otas_dir_bare, ip=self.s_machine_config.ip, - n_cores=12) - tas_config.args = tas_config.args + ' --shm-len=4294967296' + n_cores=14) + tas_config.args = tas_config.args + ' --shm-len=8589934592' self.s_tas_configs.append(tas_config) server0_config = ServerConfig(pane=self.defaults.s_server_pane, idx=0, vmid=0, - port=1234, ncores=8, max_flows=4096, max_bytes=4096, + port=1234, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) server1_config = ServerConfig(pane=self.defaults.s_server_pane, idx=1, vmid=0, - port=1235, ncores=8, max_flows=4096, max_bytes=4096, + port=1235, ncores=12, max_flows=4096, max_bytes=4096, bench_dir=self.defaults.default_obenchmark_dir_bare, tas_dir=self.defaults.default_otas_dir_bare) self.server_configs.append(server0_config) @@ -68,7 +68,7 @@ def __init__(self, exp_name, msize): project_dir=self.defaults.default_vtas_dir_bare, ip=self.c_machine_config.ip, n_cores=1) - tas_config.args = tas_config.args + ' --vm-shm-len=4294967296' + tas_config.args = tas_config.args + ' --vm-shm-len=8589934592' self.c_tas_configs.append(tas_config) self.c_proxyh_config = HostProxyConfig(pane=self.defaults.c_proxyh_pane, diff --git a/experiments/exps/perf_iso_tpmsize/parse.py b/experiments/exps/perf_iso_tpmsize/parse.py index fba9b93b..5214b94d 100644 --- a/experiments/exps/perf_iso_tpmsize/parse.py +++ b/experiments/exps/perf_iso_tpmsize/parse.py @@ -2,6 +2,7 @@ sys.path.append("../../../") import os +import numpy as np import experiments.plot_utils as putils @@ -72,12 +73,12 @@ def parse_metadata(): return data def parse_data(parsed_md): - tp = [] + data = [] out_dir = "./out/" for msize in parsed_md: data_point = {"msize": msize} for stack in parsed_md[msize]: - avg_tp = 0 + tp_x = np.array([]) for run in parsed_md[msize][stack]: is_virt = stack == "virt-tas" or stack == "ovs-tas" or stack == "ovs-linux" if is_virt: @@ -87,33 +88,40 @@ def parse_data(parsed_md): c0_fname = out_dir + parsed_md[msize][stack][run]["0"]["0"] c1_fname = out_dir + parsed_md[msize][stack][run]["0"]["1"] - avg_tp += get_avg_tp(c0_fname, c1_fname) + tp = get_avg_tp(c0_fname, c1_fname) + if tp > 0: + tp_x = np.append(tp_x, tp) - data_point[stack] = avg_tp / len(parsed_md[msize][stack]) + data_point[stack] = { + "tp": tp_x.mean(), + "std": tp_x.std(), + } - tp.append(data_point) + data.append(data_point) - tp = sorted(tp, key=lambda d: int(d['msize'])) - return tp + data = sorted(data, key=lambda d: int(d['msize'])) + return data -def save_dat_file(avg_tps, fname): +def save_dat_file(data, fname): f = open(fname, "w+") - header = "msize bare-tas bare-vtas virt-tas ovs-linux ovs-tas\n" + header = "msize " + \ + "bare-tas-avg bare-vtas-avg virt-tas-avg " + \ + "ovs-linux-avg " + \ + "bare-tas-std bare-vtas-std virt-tas-std " + \ + "ovs-linux-std\n" f.write(header) - for tp in avg_tps: - f.write("{} {} {} {} {} {}\n".format( - tp["msize"], - tp["bare-tas"], - tp["bare-vtas"], - tp["virt-tas"], - tp["ovs-linux"], - tp["ovs-tas"] - )) + for dp in data: + f.write("{} {} {} {} {} {} {} {} {}\n".format( + dp["msize"], + dp["bare-tas"]["tp"], dp["bare-vtas"]["tp"], dp["virt-tas"]["tp"], + dp["ovs-linux"]["tp"], + dp["bare-tas"]["std"], dp["bare-vtas"]["std"], dp["virt-tas"]["std"], + dp["ovs-linux"]["std"])) def main(): parsed_md = parse_metadata() - avg_tps = parse_data(parsed_md) - save_dat_file(avg_tps, "./tp.dat") + data = parse_data(parsed_md) + save_dat_file(data, "./tp.dat") if __name__ == '__main__': main() \ No newline at end of file diff --git a/experiments/exps/perf_iso_tpmsize/plot_script.plt b/experiments/exps/perf_iso_tpmsize/plot_script.plt index 7d3d7445..584b0580 100644 --- a/experiments/exps/perf_iso_tpmsize/plot_script.plt +++ b/experiments/exps/perf_iso_tpmsize/plot_script.plt @@ -12,8 +12,8 @@ set label 1 "Aggressor Client Message Size" at screen 0.5, 0.03 center set label 2 "Victim Client Throughput (Mbps)" at screen 0.01, 0.5 rotate by 90 center set yrange [0:2000] -plot 'tp.dat' using 1:2:xtic(1) title 'bare-tas' linetype 2 w lp, \ - 'tp.dat' using 1:3:xtic(1) title 'bare-virtuoso' linetype 3 w lp, \ - 'tp.dat' using 1:4:xtic(1) title 'virt-tas' linetype 4 w lp, \ - 'tp.dat' using 1:5:xtic(1) title 'ovs-linux' linetype 5 w lp, \ - 'tp.dat' using 1:6:xtic(1) title 'ovs-tas' linetype 6 w lp, \ +plot 'tp.dat' using 1:2:6 with yerrorlines title 'tas' linetype 2 ps 0.7, \ + 'tp.dat' using 1:3:7 with yerrorlines title 'bare-virtuoso' linetype 3 ps 0.7, \ + 'tp.dat' using 1:4:8 with yerrorlines title 'virtuoso' linetype 4 ps 0.7, \ + 'tp.dat' using 1:5:9 with yerrorlines title 'ovs-linux' linetype 5 ps 0.7, \ + # 'tp.dat' using 1:6:11 with yerrorlines title 'ovs-tas' linetype 6 ps 0.7, \ diff --git a/experiments/nodes/node.py b/experiments/nodes/node.py index c70f84bd..72fb704c 100644 --- a/experiments/nodes/node.py +++ b/experiments/nodes/node.py @@ -60,7 +60,7 @@ def start_ovs(self, script_dir): time.sleep(1) cmd = "sudo bash ovs-start.sh" self.setup_pane.send_keys(cmd) - time.sleep(2) + time.sleep(4) def stop_ovs(self, script_dir): cmd = "cd {}".format(script_dir) @@ -76,7 +76,7 @@ def ovsbr_add(self, br_name, ip, interface, script_dir): time.sleep(1) cmd = "sudo bash ovsbr-add.sh {} {} {}".format(br_name, ip, interface) self.setup_pane.send_keys(cmd) - time.sleep(2) + time.sleep(4) def ovsbr_del(self, br_name): cmd = "sudo ovs-vsctl del-br {}".format(br_name) @@ -90,7 +90,7 @@ def ovsvhost_add(self, br_name, vhost_name, script_dir): cmd = "sudo bash ovsvhost-add.sh {} {}".format( br_name, vhost_name) self.setup_pane.send_keys(cmd) - time.sleep(2) + time.sleep(4) def ovstap_add(self, br_name, tap_name, multi_queue, script_dir): cmd = "cd {}".format(script_dir) diff --git a/experiments/plot_utils.py b/experiments/plot_utils.py index 2d36b0e4..7e875644 100644 --- a/experiments/plot_utils.py +++ b/experiments/plot_utils.py @@ -1,38 +1,64 @@ - +import numpy as np import re def init_latencies(): latencies = { - "50p": 0, - "90p": 0, - "99p": 0, - "99.9p": 0, - "99.99p": 0 + "50p": np.array([]), + "90p": np.array([]), + "99p": np.array([]), + "99.9p": np.array([]), + "99.99p": np.array([]) } return latencies -def divide_latencies(latencies, den): - latencies["50p"] /= den - latencies["90p"] /= den - latencies["99p"] /= den - latencies["99.9p"] /= den - latencies["99.99p"] /= den - -def add_latencies(latencies, fname_c0): +def append_latencies(latencies, fname_c0): f = open(fname_c0) lines = f.readlines() # Latencies are already accumulated over all time # period in the logs line = lines[len(lines) - 1] - latencies["50p"] += int(get_50p_lat(line)) - latencies["90p"] += int(get_90p_lat(line)) - latencies["99p"] += int(get_99p_lat(line)) - latencies["99.9p"] += int(get_99_9p_lat(line)) - latencies["99.99p"] += int(get_99_99p_lat(line)) - return latencies + lat = int(get_50p_lat(line)) + if lat > 0: + latencies["50p"] = np.append(latencies["50p"], lat) + + lat = int(get_90p_lat(line)) + if lat > 0: + latencies["90p"] = np.append(latencies["90p"], lat) + + lat = int(get_99p_lat(line)) + if lat > 0: + latencies["99p"] = np.append(latencies["99p"], lat) + + lat = int(get_99_9p_lat(line)) + if lat > 0: + latencies["99.9p"] = np.append(latencies["99.9p"], lat) + + lat = int(get_99_99p_lat(line)) + if lat > 0: + latencies["99.99p"] = np.append(latencies["99.99p"], lat) + +def get_latency_avg(latencies): + avg_lats = { + "50p": latencies["50p"].mean(), + "90p": latencies["90p"].mean(), + "99p": latencies["99p"].mean(), + "99.9p": latencies["99.9p"].mean(), + "99.99p": latencies["99.99p"].mean() + } + + return avg_lats + +def get_latency_std(latencies): + return { + "50p": latencies["50p"].std(), + "90p": latencies["90p"].std(), + "99p": latencies["99p"].std(), + "99.9p": latencies["99.9p"].std(), + "99.99p": latencies["99.99p"].std() + } def get_expname_msize(fname): regex = "(?<=-msize)[0-9]*" diff --git a/experiments/run.py b/experiments/run.py index bb749cb7..8cc8e279 100644 --- a/experiments/run.py +++ b/experiments/run.py @@ -52,7 +52,6 @@ continue print('******' + e.get_name() + '********') e.run() - time.sleep(80) + time.sleep(120) e.save_logs() - time.sleep(15) e.reset() \ No newline at end of file diff --git a/images/start-vm.sh b/images/start-vm.sh index 61aa80b8..583742ff 100755 --- a/images/start-vm.sh +++ b/images/start-vm.sh @@ -64,14 +64,14 @@ elif [[ "$stack" == 'ovs-linux' ]]; then -machine accel=kvm,type=q35 \ -cpu host \ -smp 12 \ - -m 10G \ + -m 25G \ -snapshot \ -netdev user,id=net0,hostfwd=tcp::222${vm_id}-:22 \ -device virtio-net-pci,netdev=net0 \ -chardev socket,id=char0,path=/usr/local/var/run/openvswitch/$vhost \ -netdev type=vhost-user,chardev=char0,vhostforce=on,queues=12,id=net1 \ -device virtio-net-pci,netdev=net1,mac=$alt_mac,mq=on,vectors=26 \ - -object memory-backend-file,id=mem,size=10G,mem-path=/dev/hugepages,share=on \ + -object memory-backend-file,id=mem,size=25G,mem-path=/dev/hugepages,share=on \ -numa node,memdev=mem -mem-prealloc \ -drive if=virtio,format=qcow2,file="base.snapshot.qcow2" \ -drive if=virtio,format=raw,file="seed.img" \ @@ -82,14 +82,14 @@ elif [[ "$stack" == 'ovs-tas' ]]; then -machine accel=kvm,type=q35 \ -cpu host \ -smp 12 \ - -m 10G \ + -m 25G \ -snapshot \ -netdev user,id=net0,hostfwd=tcp::222${vm_id}-:22 \ -device virtio-net-pci,netdev=net0 \ -chardev socket,id=char0,path=/usr/local/var/run/openvswitch/$vhost \ -netdev type=vhost-user,chardev=char0,vhostforce=on,queues=12,id=net1 \ -device virtio-net-pci,netdev=net1,mac=$alt_mac,mq=on,vectors=26 \ - -object memory-backend-file,id=mem,size=10G,mem-path=/dev/hugepages,share=on \ + -object memory-backend-file,id=mem,size=25G,mem-path=/dev/hugepages,share=on \ -numa node,memdev=mem -mem-prealloc \ -drive if=virtio,format=qcow2,file="base.snapshot.qcow2" \ -drive if=virtio,format=raw,file="seed.img" \ @@ -100,7 +100,7 @@ elif [[ "$stack" == 'tap-tas' ]]; then -machine accel=kvm,type=q35 \ -cpu host \ -smp 12 \ - -m 6G \ + -m 25G \ -snapshot \ -netdev user,id=net0 \ -device virtio-net-pci,netdev=net0 \