perf/nvmf: add FIO I/O rate limit to the config
Added 'rate_iops' FIO option to the performance scripts. This will be used during tests where limiting factor has to be artifically imposed, rather than come from the target/initiator system or enviroment. One case for this are scheduler tests, to limit each connection and balance the threads accordingly. Signed-off-by: Maciej Szwed <maciej.szwed@intel.com> Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I10bb09be9205a8b7ba90b36cd4e0bf922b0ecbc3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7840 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
1ae601b573
commit
1c71de70bd
@ -227,6 +227,7 @@ Optional, SPDK Initiator only:
|
||||
"qd": [32, 128],
|
||||
"rw": ["randwrite", "write"],
|
||||
"rwmixread": 100,
|
||||
"rate_iops": 10000,
|
||||
"num_jobs": 2,
|
||||
"run_time": 30,
|
||||
"ramp_time": 30,
|
||||
@ -247,6 +248,10 @@ Required:
|
||||
- run_num - number of times each workload combination is run.
|
||||
If more than 1 then final result is the average of all runs.
|
||||
|
||||
Optional:
|
||||
|
||||
- rate_iops - limit IOPS to this number
|
||||
|
||||
#### Test Combinations
|
||||
|
||||
It is possible to specify more than one value for bs, qd and rw parameters.
|
||||
|
@ -777,7 +777,7 @@ class Initiator(Server):
|
||||
# Logic implemented in SPDKInitiator and KernelInitiator classes
|
||||
pass
|
||||
|
||||
def gen_fio_config(self, rw, rwmixread, block_size, io_depth, subsys_no, num_jobs=None, ramp_time=0, run_time=10):
|
||||
def gen_fio_config(self, rw, rwmixread, block_size, io_depth, subsys_no, num_jobs=None, ramp_time=0, run_time=10, rate_iops=0):
|
||||
fio_conf_template = """
|
||||
[global]
|
||||
ioengine={ioengine}
|
||||
@ -794,6 +794,7 @@ bs={block_size}
|
||||
time_based=1
|
||||
ramp_time={ramp_time}
|
||||
runtime={run_time}
|
||||
rate_iops={rate_iops}
|
||||
"""
|
||||
if "spdk" in self.mode:
|
||||
bdev_conf = self.gen_spdk_bdev_conf(self.subsystem_info_list)
|
||||
@ -835,7 +836,7 @@ runtime={run_time}
|
||||
|
||||
fio_config = fio_conf_template.format(ioengine=ioengine, spdk_conf=spdk_conf,
|
||||
rw=rw, rwmixread=rwmixread, block_size=block_size,
|
||||
ramp_time=ramp_time, run_time=run_time)
|
||||
ramp_time=ramp_time, run_time=run_time, rate_iops=rate_iops)
|
||||
if num_jobs:
|
||||
fio_config = fio_config + "numjobs=%s \n" % num_jobs
|
||||
if self.cpus_allowed is not None:
|
||||
@ -1342,6 +1343,7 @@ if __name__ == "__main__":
|
||||
fio_run_time = data[k]["run_time"]
|
||||
fio_ramp_time = data[k]["ramp_time"]
|
||||
fio_rw_mix_read = data[k]["rwmixread"]
|
||||
fio_rate_iops = data[k]["rate_iops"]
|
||||
fio_run_num = data[k]["run_num"] if "run_num" in data[k].keys() else None
|
||||
fio_num_jobs = data[k]["num_jobs"] if "num_jobs" in data[k].keys() else None
|
||||
else:
|
||||
@ -1369,7 +1371,7 @@ if __name__ == "__main__":
|
||||
i.kernel_init_connect(i.target_nic_ips, target_obj.subsys_no)
|
||||
|
||||
cfg = i.gen_fio_config(rw, fio_rw_mix_read, block_size, io_depth, target_obj.subsys_no,
|
||||
fio_num_jobs, fio_ramp_time, fio_run_time)
|
||||
fio_num_jobs, fio_ramp_time, fio_run_time, fio_rate_iops)
|
||||
configs.append(cfg)
|
||||
|
||||
for i, cfg in zip(initiators, configs):
|
||||
|
Loading…
Reference in New Issue
Block a user