def main() -> None: stats = read_stats("fio.json") settings = create_settings() storage = Storage(settings) system = set(stats["system"]) benchmarks = { "native": benchmark_native, "sgx-io": benchmark_sgx_io, "scone": benchmark_scone, "sgx-lkl": benchmark_sgx_lkl, } for name, benchmark in benchmarks.items(): if name in system: print(f"skip {name} benchmark") continue benchmark(storage, stats) write_stats("fio.json", stats) csv = f"fio-throughput-{NOW}.tsv" print(csv) throughput_df = pd.DataFrame(stats) throughput_df.to_csv(csv, index=False, sep="\t") throughput_df.to_csv("fio-throughput-latest.tsv", index=False, sep="\t")
def main() -> None: stats = read_stats("dd.json") settings = create_settings() storage = Storage(settings) # provide nix expressions for native and sgx_lkl case benchmarks = { #"native": benchmark_native_dd, #"sgx-lkl": benchmark_sgx_lkl_dd, "sgx-io": benchmark_sgx_io_dd, } system = set(stats["system"]) for name, benchmark in benchmarks.items(): if name in system: print(f"skip {name} benchmark") continue benchmark(storage, stats) write_stats("dd.json", stats) csv = f"dd-test-{NOW}.tsv" df = pd.DataFrame(stats) df.to_csv(csv, index=False, sep="\t") df.to_csv("dd-test-latest.tsv", index=False, sep="\t")
def main() -> None: stats = read_stats("redis.json") settings = create_settings() setup_remote_network(settings) record_count = 100000 op_count = 10000 benchmark = Benchmark(settings, record_count, op_count) benchmarks = { "native": benchmark_redis_native, "sgx-lkl": benchmark_redis_sgx_lkl, "sgx-io": benchmark_redis_sgx_io, "scone": benchmark_redis_scone, } system = set(stats["system"]) for name, benchmark_func in benchmarks.items(): if name in system: print(f"skip {name} benchmark") continue benchmark_func(benchmark, stats) write_stats("redis.json", stats) csv = f"redis-{NOW}.tsv" print(csv) throughput_df = pd.DataFrame(stats) throughput_df.to_csv(csv, index=False, sep="\t") throughput_df.to_csv("redis-latest.tsv", index=False, sep="\t")
def main() -> None: stats = read_stats("spdk-zerocopy.json") storage = Storage(create_settings()) mount = storage.setup(StorageKind.SPDK) with mount as mnt: extra_env1 = mount.extra_env() extra_env1["SGXLKL_SPDK_ZEROCOPY"] = "1" benchmark_simpleio(storage, "optimized", "simpleio-sgx-io", mnt, stats, extra_env=extra_env1) import time time.sleep(5) extra_env2 = mount.extra_env() extra_env2["SGXLKL_SPDK_ZEROCOPY"] = "0" benchmark_simpleio(storage, "not-optimized", "simpleio-sgx-io", mnt, stats, extra_env=extra_env2) write_stats("spdk-zerocopy.json", stats) csv = f"spdk-zerocopy-{NOW}.tsv" print(csv) df = pd.DataFrame(stats) df.to_csv(csv, index=False, sep="\t") df.to_csv("spdk-zerocopy-latest.tsv", index=False, sep="\t")
def main() -> None: if len(sys.argv) <= 1: benchmarks = BENCHMARKS else: benchmarks = {k: BENCHMARKS[k] for k in (sys.argv[1:])} stats = read_stats("simpleio-stats.json") storage = Storage(create_settings()) system = set(stats["system"]) # batch sizes in kilobytes batch_sizes = [4, 8, 16, 32, 64, 128, 256, 512] #batch_sizes = [128] for bs in batch_sizes: for name, benchmark in benchmarks.items(): if name in system and len(sys.argv) <= 1: print(f"skip {name} benchmark") continue benchmark(storage, stats, bs) write_stats("simpleio-stats.json", stats) csv = f"simpleio-{NOW}.tsv" print(csv) df = pd.DataFrame(stats) df.to_csv(csv, index=False, sep="\t") df.to_csv("simpleio-latest.tsv", index=False, sep="\t")
def run_variant(name: str, benchmark: Benchmark, extra_env: Dict[str, str]) -> None: stats_file = f"iperf-{name}.json" stats = read_stats(stats_file) system = set(stats["system"]) if "sgx-io" in system: print(f"skip {name} benchmark") else: extra_env.update(benchmark.network.setup(NetworkKind.DPDK)) benchmark.run("iperf-sgx-io", "sgx-io", stats, extra_env=extra_env) write_stats(stats_file, stats) csv = f"iperf-{name}-latest.tsv" print(csv) pd.DataFrame(stats).to_csv(csv, index=False, sep="\t")
def main() -> None: stats = read_stats("syscall-perf.json") system = set(stats["system"]) benchmark = Benchmark() for name, benchmark_func in BENCHMARKS.items(): if name in system: print(f"skip {name} benchmark") continue benchmark_func(benchmark, stats) write_stats("syscall-perf.json", stats) csv = f"syscall-perf-{NOW}.tsv" print(csv) df = pd.DataFrame(stats) df.to_csv(csv, index=False, sep="\t") df.to_csv("syscall-perf-latest.tsv", index=False, sep="\t")
def main() -> None: stats = read_stats("aesni.json") storage = Storage(create_settings()) if "x86_acc" not in stats["type"]: benchmark_sgx_io(storage, stats, x86_acc=True) else: print("skip x86_acc") if "no_x86_acc" not in stats["type"]: benchmark_sgx_io(storage, stats, x86_acc=False) else: print("skip no_x86_acc") write_stats("aesni.json", stats) csv = f"aesni-{NOW}.tsv" print(csv) df = pd.DataFrame(stats) df.to_csv(csv, index=False, sep="\t") df.to_csv("aesni-latest.tsv", index=False, sep="\t")
def main() -> None: stats = read_stats("smp.json") settings = create_settings() storage = Storage(settings) done_cores = set(stats["cores"]) for cores in [1, 2, 4, 6, 8]: if cores in done_cores: print(f"skip {cores} cores") continue benchmark_sgx_io(storage, stats, cores) write_stats("smp.json", stats) csv = f"smp-{NOW}.tsv" print(csv) throughput_df = pd.DataFrame(stats) throughput_df.to_csv(csv, index=False, sep="\t") throughput_df.to_csv("smp-latest.tsv", index=False, sep="\t")
def main() -> None: stats = read_stats("network-test-bs.json") settings = create_settings() setup_remote_network(settings) benchmark = Benchmark(settings) benchmarks = { #"sgx-lkl": benchmark_nw_test_sgx_lkl, "sgx-io": benchmark_nw_test_sgx_io, } system = set(stats["system"]) for name, bench_func in benchmarks.items(): if name in system: print(f"skip {name} benchmark") continue bench_func(benchmark, stats) write_stats("network-test-bs.json", stats) csv = f"network-test-bs-{NOW}.tsv" throughput_df = pd.DataFrame(stats) throughput_df.to_csv(csv, index=False, sep="\t") throughput_df.to_csv("network-test-bs-latest.tsv", index=False, sep="\t")
def main() -> None: stats = read_stats("iperf.json") settings = create_settings() setup_remote_network(settings) benchmark = Benchmark(settings) benchmarks = { "native": benchmark_native, "sgx-io": benchmark_sgx_io, "sgx-lkl": benchmark_sgx_lkl, "scone": benchmark_scone, } system = set(stats["system"]) for name, benchmark_func in benchmarks.items(): if name in system: print(f"skip {name} benchmark") continue benchmark_func(benchmark, stats) write_stats("iperf.json", stats) csv = f"iperf-latest.tsv" print(csv) pd.DataFrame(stats).to_csv(csv, index=False, sep="\t")