From 381d330dcd11797dee0f6907fd33bbbcaa2c2134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Eng=C3=A9libert?= Date: Fri, 27 Feb 2026 14:25:03 +0100 Subject: [PATCH] Make sa optional --- README.md | 6 ++++-- exp.py | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 884f9f4..eb269d9 100644 --- a/README.md +++ b/README.md @@ -369,19 +369,21 @@ sudo chmod u+s powercap ### Grid5000 ```bash -ssh lyon.g5k +ssh grenoble.g5k oarsub -q default -l host=2,walltime=2 -I # Check the name of the other node in https://intranet.grid5000.fr/oar/Lyon/drawgantt-svg/ # Let's call them p1 and p2 ping p2 # Note p2 addr to exp.py -pip3 install fabric --break-system-packages +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +pip3 install fabric python exp.py make g5k -c python exp.py send g5k # Notes scp /lib/x86_64-linux-gnu/libssl.so.3.6 lyon.g5k:~/ scp /lib/x86_64-linux-gnu/libcrypto.so.3.6 lyon.g5k:~/ +scp records/wikipedia grenoble.g5k:tlsbench/records/ LD_PRELOAD="/home/pengelib/tlsbench/libssl.so.3.6 /home/pengelib/tlsbench/libcrypto.so.3.6" ./netreplay --help ``` diff --git a/exp.py b/exp.py index c7c8caf..456c760 100644 --- a/exp.py +++ b/exp.py @@ -29,6 +29,7 @@ CONFIGS = { "wattmeter": False, "perf": False, "rapl": False, + "sa": True, "perf_dir": "/home/tuxmain/.cache/exp", "listen_port": 8080, "notify_listen": ("127.0.0.1", 8090), @@ -62,6 +63,7 @@ CONFIGS = { "wattmeter": False, "perf": True, "rapl": False, + "sa": True, "perf_dir": "/home/tuxmain/.cache/exp", "listen_port": 8080, "notify_listen": ("127.0.0.1", 8090), @@ -98,6 +100,7 @@ CONFIGS = { "wattmeter": True, "perf": False, "rapl": False, + "sa": True, "listen_port": 8080, "idle": "idle - - - - - - - - - 600.000081539154 0.0 896 4792 0.5399999999999991 0 -", "notify_listen": ("0.0.0.0", 8090), @@ -129,6 +132,7 @@ CONFIGS = { "wattmeter": False, "perf": True, "rapl": False, + "sa": True, "perf_dir": "/home/exp/.cache/exp", "listen_port": 8080, "notify_listen": ("127.0.0.1", 8090), @@ -165,6 +169,7 @@ CONFIGS = { "wattmeter": True, "perf": False, "rapl": False, + "sa": True, "listen_port": 8080, "idle": "idle - - - - - - - - - 1200.0000903606415 0 589 4764 3.478999999999999 0 -", "notify_listen": ("0.0.0.0", 8090), @@ -196,6 +201,7 @@ CONFIGS = { "wattmeter": False, "perf": True, "rapl": False, + "sa": True, "perf_dir": "/home/exp/.cache/exp", "listen_port": 8080, }, @@ -229,6 +235,7 @@ CONFIGS = { "wattmeter": True, "perf": False, "rapl": True, + "sa": True, "listen_port": 8080, "idle": "idle - - - - - - - - - 600.000194311142 0.0 1822 6541 1.3880000000000052 304283035 -", "notify_listen": ("0.0.0.0", 8090), @@ -260,6 +267,7 @@ CONFIGS = { "wattmeter": False, "perf": True, "rapl": False, + "sa": True, "perf_dir": "/home/exp/.cache/exp", "listen_port": 8080, }, @@ -292,6 +300,7 @@ CONFIGS = { "wattmeter": False, "perf": False, "rapl": False, + "sa": False, "listen_port": 8080, "idle": "idle - - - - - - - - - 600.000194311142 0.0 1822 6541 1.3880000000000052 304283035 -",#TODO "notify_listen": ("0.0.0.0", 8090), @@ -913,7 +922,9 @@ def run_exp(config, only_record=None, idle=False, shutdown=False, debug=False): ssh_run_bg(ssh, f"perf record -F 997 --call-graph dwarf,64000 -g -o {prof_filename} -p {process_pid}") # Measure - cpu = get_cpu_stat(ssh, ["netreplay-"+impl, "tokio-runtime-w"]) + cpu = 0 + if config["sa"]: + cpu = get_cpu_stat(ssh, ["netreplay-"+impl, "tokio-runtime-w"]) remote_bytes_in, remote_bytes_out = get_net_stat(ssh) energy = 0 energy_rapl = 0 @@ -953,7 +964,9 @@ def run_exp(config, only_record=None, idle=False, shutdown=False, debug=False): pass # Measure CPU after (as it may update only after the process is killed) - new_cpu = get_cpu_stat(ssh, ["netreplay-"+impl, "tokio-runtime-w"]) + new_cpu = 0 + if config["sa"]: + new_cpu = get_cpu_stat(ssh, ["netreplay-"+impl, "tokio-runtime-w"]) record_filename = record["filename"] cpu_diff = new_cpu - cpu