scripts/nvmf_perf: enable DPDK memory dump by default

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I65e8299cb887edd23c9d8b29535d596c419bc63d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15381
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Karol Latecki 2022-11-10 10:30:00 +01:00 committed by Konrad Sztyber
parent babef5b127
commit 9b3f5e98d5
2 changed files with 12 additions and 12 deletions

View File

@ -89,7 +89,7 @@ Optional:
"sar_settings": true, "sar_settings": true,
"pcm_settings": false, "pcm_settings": false,
"enable_bandwidth": [true, 60], "enable_bandwidth": [true, 60],
"enable_dpdk_memory": [true, 30] "enable_dpdk_memory": true
"num_shared_buffers": 4096, "num_shared_buffers": 4096,
"scheduler_settings": "static", "scheduler_settings": "static",
"zcopy_settings": false, "zcopy_settings": false,
@ -150,9 +150,9 @@ Optional, SPDK Target only:
creating transport layer. Default: false. creating transport layer. Default: false.
- null_block_dif_type - int, 0-3. Level of DIF type to use when creating - null_block_dif_type - int, 0-3. Level of DIF type to use when creating
null block bdev. Default: 0. null block bdev. Default: 0.
- enable_dpdk_memory - [bool, int]. Wait for a given number of seconds and - enable_dpdk_memory - bool. Wait for a fio ramp_time to finish and
call env_dpdk_get_mem_stats RPC call to dump DPDK memory stats. Typically call env_dpdk_get_mem_stats RPC call to dump DPDK memory stats.
wait time should be at least ramp_time of fio described in another section. Default: enabled.
- adq_enable - bool; only for TCP transport. - adq_enable - bool; only for TCP transport.
Configure system modules, NIC settings and create priority traffic classes Configure system modules, NIC settings and create priority traffic classes
for ADQ testing. You need and ADQ-capable NIC like the Intel E810. for ADQ testing. You need and ADQ-capable NIC like the Intel E810.

View File

@ -392,8 +392,7 @@ class Target(Server):
self.enable_sar = True self.enable_sar = True
self.enable_pcm = True self.enable_pcm = True
self.enable_bw = True self.enable_bw = True
self.enable_dpdk_memory = False self.enable_dpdk_memory = True
self.dpdk_wait_time = 0
if "null_block_devices" in target_config: if "null_block_devices" in target_config:
self.null_block = target_config["null_block_devices"] self.null_block = target_config["null_block_devices"]
@ -418,7 +417,7 @@ class Target(Server):
if "enable_bandwidth" in target_config: if "enable_bandwidth" in target_config:
self.enable_bw = target_config["enable_bandwidth"] self.enable_bw = target_config["enable_bandwidth"]
if "enable_dpdk_memory" in target_config: if "enable_dpdk_memory" in target_config:
self.enable_dpdk_memory, self.dpdk_wait_time = target_config["enable_dpdk_memory"] self.enable_dpdk_memory = target_config["enable_dpdk_memory"]
self.log.info("Items now on allowlist: %s" % self.nvme_allowlist) self.log.info("Items now on allowlist: %s" % self.nvme_allowlist)
self.log.info("Items now on blocklist: %s" % self.nvme_blocklist) self.log.info("Items now on blocklist: %s" % self.nvme_blocklist)
@ -565,12 +564,12 @@ class Target(Server):
# Improve this so that additional file containing measurements average is generated too. # Improve this so that additional file containing measurements average is generated too.
# TODO: Monitor only these interfaces which are currently used to run the workload. # TODO: Monitor only these interfaces which are currently used to run the workload.
def measure_dpdk_memory(self, results_dir): def measure_dpdk_memory(self, results_dir, dump_file_name, ramp_time):
self.log.info("INFO: waiting to generate DPDK memory usage") self.log.info("INFO: waiting to generate DPDK memory usage")
time.sleep(self.dpdk_wait_time) time.sleep(ramp_time)
self.log.info("INFO: generating DPDK memory usage") self.log.info("INFO: generating DPDK memory usage")
rpc.env.env_dpdk_get_mem_stats tmp_dump_file = rpc.env_dpdk.env_dpdk_get_mem_stats(self.client)["filename"]
os.rename("/tmp/spdk_mem_dump.txt", "%s/spdk_mem_dump.txt" % (results_dir)) os.rename(tmp_dump_file, "%s/%s" % (results_dir, dump_file_name))
def sys_config(self): def sys_config(self):
self.log.info("====Kernel release:====") self.log.info("====Kernel release:====")
@ -1586,7 +1585,8 @@ if __name__ == "__main__":
threads.append(t) threads.append(t)
if target_obj.enable_dpdk_memory: if target_obj.enable_dpdk_memory:
t = threading.Thread(target=target_obj.measure_dpdk_memory, args=(args.results)) dpdk_mem_file_name = "%s_%s_%s_run_%s_dpdk_mem.txt" % (block_size, rw, io_depth, run_no)
t = threading.Thread(target=target_obj.measure_dpdk_memory, args=(args.results, dpdk_mem_file_name, fio_ramp_time))
threads.append(t) threads.append(t)
if target_obj.enable_pm: if target_obj.enable_pm: