From: Vratko Polak Date: Mon, 19 May 2025 11:06:39 +0000 (+0200) Subject: fix(hoststack): Apply chrt when starting iperf X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=565fc4bed46f671efde9746d85599a5068e3915f;p=csit.git fix(hoststack): Apply chrt when starting iperf This is needed to restore TCP ldpreload performance. UDP ldrpeload performance is still not good enough, to be addressed later. + Change strace command to print summary, useful for debugging. Change-Id: Ic08bcb59e47ef6a2e016ed80a9d02638f390e8db Signed-off-by: Vratko Polak --- diff --git a/resources/libraries/python/HoststackUtil.py b/resources/libraries/python/HoststackUtil.py index 2855938a12..920e8d6dc7 100644 --- a/resources/libraries/python/HoststackUtil.py +++ b/resources/libraries/python/HoststackUtil.py @@ -311,11 +311,11 @@ class HoststackUtil: args = program["args"] program_path = program.get("path", "") # NGINX used `worker_cpu_affinity` in configuration file - taskset_cmd = ( - "" if program_name == "nginx" else f"taskset --cpu-list {core_list}" - ) + taskset_cmd = "" + if program_name != "nginx": + taskset_cmd = f"taskset --cpu-list {core_list} chrt -r 99 " cmd = ( - f"nohup {taskset_cmd} {shell_cmd} '{env_vars} " + f"nohup {taskset_cmd}{shell_cmd} '{env_vars} " f"{program_path}{program_name} {args} >/tmp/{program_name}_" f"stdout.log 2>/tmp/{program_name}_stderr.log &'" ) @@ -388,7 +388,7 @@ class HoststackUtil: if other_node["type"] != "DUT": raise RuntimeError("Other node type is not a DUT!") - cmd = f"sh -c 'strace -qqe trace=none -p {program_pid}'" + cmd = f"sh -c 'strace -c -fp {program_pid}'" try: exec_cmd(node, cmd, sudo=True) except: