scripts/nvmf_perf: update PCM measurements

Update PCM binary paths and executable names are these have
changed some time ago.
Update README.md with an explanation about int variables
for "pcm_settings" option.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I8270766ff2c429623a29e4c12427a3dd7e45f229
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13511
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
This commit is contained in:
Karol Latecki 2022-06-30 08:07:49 +00:00 committed by Tomasz Zawadzki
parent b0997a590a
commit 5d82cd2b08
2 changed files with 11 additions and 5 deletions

View File

@ -115,9 +115,14 @@ Optional, common:
Wait for "x" seconds before starting measurements, then do "z" samples
with "y" seconds intervals between them. Default: disabled.
- pcm_settings - [path, int(x), int(y), int(z)];
Enable [PCM](https://github.com/opcm/pcm.git) measurements on Tartet side.
Enable [PCM](https://github.com/opcm/pcm.git) measurements on Target side.
Measurements include CPU, memory and power consumption. "path" points to a
directory where pcm executables are present. Default: disabled.
directory where pcm executables are present.
"x" - time to wait before starting measurements (suggested it equals to fio
ramp_time).
"y" - time interval between measurements.
"z" - number of measurement samples.
Default: disabled.
- enable_bandwidth - [bool, int]. Wait a given number of seconds and run
bwm-ng until the end of test to measure bandwidth utilization on network
interfaces. Default: disabled.

View File

@ -650,14 +650,15 @@ class Target(Server):
def measure_pcm_memory(self, results_dir, pcm_file_name):
time.sleep(self.pcm_delay)
cmd = ["%s/pcm-memory.x" % self.pcm_dir, "%s" % self.pcm_interval, "-csv=%s/%s" % (results_dir, pcm_file_name)]
cmd = ["%s/build/bin/pcm-memory" % self.pcm_dir, "%s" % self.pcm_interval, "-csv=%s/%s" % (results_dir, pcm_file_name)]
pcm_memory = subprocess.Popen(cmd)
time.sleep(self.pcm_count)
pcm_memory.terminate()
def measure_pcm(self, results_dir, pcm_file_name):
time.sleep(self.pcm_delay)
cmd = ["%s/pcm.x" % self.pcm_dir, "%s" % self.pcm_interval, "-i=%s" % self.pcm_count, "-csv=%s/%s" % (results_dir, pcm_file_name)]
cmd = ["%s/build/bin/pcm" % self.pcm_dir, "%s" % self.pcm_interval, "-i=%s" % self.pcm_count,
"-csv=%s/%s" % (results_dir, pcm_file_name)]
subprocess.run(cmd)
df = pd.read_csv(os.path.join(results_dir, pcm_file_name), header=[0, 1])
df = df.rename(columns=lambda x: re.sub(r'Unnamed:[\w\s]*$', '', x))
@ -667,7 +668,7 @@ class Target(Server):
def measure_pcm_power(self, results_dir, pcm_power_file_name):
time.sleep(self.pcm_delay)
out = self.exec_cmd(["%s/pcm-power.x" % self.pcm_dir, "%s" % self.pcm_interval, "-i=%s" % self.pcm_count])
out = self.exec_cmd(["%s/build/bin/pcm-power" % self.pcm_dir, "%s" % self.pcm_interval, "-i=%s" % self.pcm_count])
with open(os.path.join(results_dir, pcm_power_file_name), "w") as fh:
fh.write(out)