scripts/nvmf_perf: unify PCM options into single setting
Instead enabling each measurement (cpu/power/memory) just use a single flag and enable them all at once. Change-Id: I8a639b697285aa741f28b5ddec11ce70c34fc760 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5980 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
90761053ef
commit
abe273b8d1
@ -146,14 +146,15 @@ Before using PCM Tools in nvmf perf scripts it needs to be installed on Target m
|
||||
PCM source and instructions are available on https://github.com/opcm/pcm.
|
||||
To enable PCM in perf test you need to add Target setting in config.json file:
|
||||
```
|
||||
"pcm_settings": ["pcm_directory", "measure_cpu", "measure_memory", "measure_power", delay_time, measure_interval, sample_count]
|
||||
"pcm_settings": ["pcm_directory", delay_time, measure_interval, sample_count]
|
||||
```
|
||||
example:
|
||||
```
|
||||
"pcm_settings": ["/tmp/pcm", true, true, true, 10, 1, 30]
|
||||
"pcm_settings": ["/tmp/pcm", 10, 1, 30]
|
||||
```
|
||||
Example above will run PCM measure for cpu and memory, with start delay 10s, sample every 1 second,
|
||||
and 30 samples for cpu measure. PCM memory do not support sample count.
|
||||
Example above will run PCM measure for cpu, memory and power. Start will be delayed by 10s,
|
||||
sample taken every 1 second. Last parameter is number of samples for cpu and power measure.
|
||||
PCM memory do not support sample count.
|
||||
|
||||
# Bandwidth monitor (bwm-ng)
|
||||
PCM Tools provides a number of command-line utilities for real-time monitoring.
|
||||
|
@ -47,8 +47,6 @@ class Target(Server):
|
||||
super(Target, self).__init__(name, username, password, mode, nic_ips, transport)
|
||||
self.null_block = null_block_devices
|
||||
self.enable_sar = False
|
||||
self.enable_pcm_power = False
|
||||
self.enable_pcm_memory = False
|
||||
self.enable_pcm = False
|
||||
self.enable_bandwidth = False
|
||||
self.enable_dpdk_memory = False
|
||||
@ -59,8 +57,8 @@ class Target(Server):
|
||||
self.enable_sar, self.sar_delay, self.sar_interval, self.sar_count = sar_settings
|
||||
|
||||
if pcm_settings:
|
||||
self.pcm_dir, self.enable_pcm, self.enable_pcm_memory, self.enable_pcm_power,\
|
||||
self.pcm_delay, self.pcm_interval, self.pcm_count = pcm_settings
|
||||
self.pcm_dir, self.pcm_delay, self.pcm_interval, self.pcm_count = pcm_settings
|
||||
self.enable_pcm = True
|
||||
|
||||
if bandwidth_settings:
|
||||
self.enable_bandwidth, self.bandwidth_count = bandwidth_settings
|
||||
@ -985,22 +983,15 @@ if __name__ == "__main__":
|
||||
threads.append(t)
|
||||
|
||||
if target_obj.enable_pcm:
|
||||
pcm_file_name = "_".join(["pcm_cpu", str(block_size), str(rw), str(io_depth)])
|
||||
pcm_file_name = ".".join([pcm_file_name, "csv"])
|
||||
t = threading.Thread(target=target_obj.measure_pcm, args=(target_results_dir, pcm_file_name,))
|
||||
threads.append(t)
|
||||
pcm_fnames = ["%s_%s_%s_%s.csv" % (block_size, rw, io_depth, x) for x in ["pcm_cpu", "pcm_memory", "pcm_power"]]
|
||||
|
||||
if target_obj.enable_pcm_memory:
|
||||
pcm_file_name = "_".join(["pcm_memory", str(block_size), str(rw), str(io_depth)])
|
||||
pcm_file_name = ".".join([pcm_file_name, "csv"])
|
||||
t = threading.Thread(target=target_obj.measure_pcm_memory, args=(target_results_dir, pcm_file_name,))
|
||||
threads.append(t)
|
||||
pcm_cpu_t = threading.Thread(target=target_obj.measure_pcm, args=(target_results_dir, pcm_fnames[0],))
|
||||
pcm_mem_t = threading.Thread(target=target_obj.measure_pcm_memory, args=(target_results_dir, pcm_fnames[1],))
|
||||
pcm_pow_t = threading.Thread(target=target_obj.measure_pcm_power, args=(target_results_dir, pcm_fnames[2],))
|
||||
|
||||
if target_obj.enable_pcm_power:
|
||||
pcm_file_name = "_".join(["pcm_power", str(block_size), str(rw), str(io_depth)])
|
||||
pcm_file_name = ".".join([pcm_file_name, "csv"])
|
||||
t = threading.Thread(target=target_obj.measure_pcm_power, args=(target_results_dir, pcm_file_name,))
|
||||
threads.append(t)
|
||||
threads.append(pcm_cpu_t)
|
||||
threads.append(pcm_mem_t)
|
||||
threads.append(pcm_pow_t)
|
||||
|
||||
if target_obj.enable_bandwidth:
|
||||
bandwidth_file_name = "_".join(["bandwidth", str(block_size), str(rw), str(io_depth)])
|
||||
|
Loading…
x
Reference in New Issue
Block a user