diff --git a/scripts/perf/nvmf/README.md b/scripts/perf/nvmf/README.md index a01095337..7cbce0819 100644 --- a/scripts/perf/nvmf/README.md +++ b/scripts/perf/nvmf/README.md @@ -61,3 +61,18 @@ Fio job parameters. - run_time: time (in seconds) to run workload - ramp_time: time (in seconds) to run workload before statistics are gathered - run_num: how many times to run given workload in loop + +# Running Test +Before running the test script use the setup.sh script to bind the devices you want to +use in the test to the VFIO/UIO driver. +Run the script on the NVMe-oF target system: + + cd spdk + sudo PYTHONPATH=$PYTHONPATH:$PWD/scripts scripts/perf/nvmf/run_nvmf.py + +The script uses another spdk script (scripts/rpc.py) so we pass the path to rpc.py by setting the Python path +as a runtime environment parameter. + +# Test Results +When the test completes, you will find a csv file (nvmf_results.csv) containing the results in the target node +directory /tmp/results. diff --git a/scripts/perf/nvmf/config.json b/scripts/perf/nvmf/config.json index 2d3a388be..2c974f913 100644 --- a/scripts/perf/nvmf/config.json +++ b/scripts/perf/nvmf/config.json @@ -5,7 +5,7 @@ "transport": "transport_type" }, "target": { - "rdma_ips": ["192.0.1.1", "192.0.2.1"], + "nic_ips": ["192.0.1.1", "192.0.2.1"], "mode": "spdk", "use_null_block": false, "nvmet_dir": "/path/to/nvmetcli", @@ -14,19 +14,19 @@ }, "initiator1": { "ip": "10.0.0.1", - "rdma_ips": ["192.0.1.1"], + "nic_ips": ["192.0.1.1"], "mode": "spdk", "nvmecli_dir": "/path/to/nvmecli" }, "initiator2": { "ip": "10.0.0.2", - "rdma_ips": ["192.0.2.1"], + "nic_ips": ["192.0.2.1"], "mode": "spdk" }, "fio": { "bs": ["4k"], "qd": [128], - "rw": ["read"], + "rw": ["randrw"], "rwmixread": 100, "run_time": 5, "ramp_time": 1, diff --git a/scripts/perf/nvmf/run_nvmf.py b/scripts/perf/nvmf/run_nvmf.py index ee073eb07..953181899 100755 --- a/scripts/perf/nvmf/run_nvmf.py +++ b/scripts/perf/nvmf/run_nvmf.py @@ -159,6 +159,7 @@ class Target(Server): for row in rows: with open(os.path.join(results_dir, csv_file), "a") as fh: fh.write(row + "\n") + self.log_print("You can find the test results in the file %s" % os.path.join(results_dir, csv_file)) def measure_sar(self, results_dir, sar_file_name): self.log_print("Waiting %d delay before measuring SAR stats" % self.sar_delay) @@ -186,7 +187,7 @@ class Initiator(Server): self.nvmecli_bin = "nvme" # Use system-wide nvme-cli self.ssh_connection = paramiko.SSHClient() - self.ssh_connection.set_missing_host_key_policy(paramiko.AutoAddPolicy) + self.ssh_connection.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.ssh_connection.connect(self.ip, username=self.username, password=self.password) self.remote_call("sudo rm -rf %s/nvmf_perf" % self.spdk_dir) self.remote_call("mkdir -p %s" % self.spdk_dir) diff --git a/scripts/pkgdep.sh b/scripts/pkgdep.sh index 459873730..737aeb69a 100755 --- a/scripts/pkgdep.sh +++ b/scripts/pkgdep.sh @@ -92,6 +92,8 @@ elif [ -f /etc/debian_version ]; then "Note: Some SPDK CLI dependencies could not be installed." # Additional dependencies for ISA-L used in compression apt-get install -y autoconf automake libtool help2man + # Additional dependecies for nvmf performance test script + apt-get install -y python3-paramiko elif [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]; then zypper install -y gcc gcc-c++ make cunit-devel libaio-devel libopenssl-devel \ git-core lcov python-base python-pycodestyle libuuid-devel sg3_utils pciutils