1b06212cfSKarol Latecki# Running NVMe-OF Performance Test Cases 2a42dfab1SKarol Latecki 3b06212cfSKarol LateckiScripts contained in this directory are used to run TCP and RDMA benchmark tests, 4b06212cfSKarol Lateckithat are later published at [spdk.io performance reports section](https://spdk.io/doc/performance_reports.html). 5b06212cfSKarol LateckiTo run the scripts in your environment please follow steps below. 6a42dfab1SKarol Latecki 7b06212cfSKarol Latecki## Test Systems Requirements 8a42dfab1SKarol Latecki 9b06212cfSKarol Latecki- The OS installed on test systems must be a Linux OS. 10b06212cfSKarol Latecki Scripts were primarily used on systems with Fedora and 11b06212cfSKarol Latecki Ubuntu 18.04/20.04 distributions. 12b06212cfSKarol Latecki- Each test system must have at least one RDMA-capable NIC installed for RDMA tests. 13b06212cfSKarol Latecki For TCP tests any TCP-capable NIC will do. However, high-bandwidth, 14b06212cfSKarol Latecki high-performance NICs like Intel E810 CQDA2 or Mellanox ConnectX-5 are 15b06212cfSKarol Latecki suggested because the NVMe-oF workload is network bound. 16b06212cfSKarol Latecki So, if you use a NIC capable of less than 100Gbps on NVMe-oF target 17b06212cfSKarol Latecki system, you will quickly saturate your NICs. 18b06212cfSKarol Latecki- Python3 interpreter must be available on all test systems. 19b06212cfSKarol Latecki Paramiko and Pandas modules must be installed. 20b06212cfSKarol Latecki- nvmecli package must be installed on all test systems. 21b06212cfSKarol Latecki- fio must be downloaded from [Github](https://github.com/axboe/fio) and built. 22b06212cfSKarol Latecki This must be done on Initiator test systems to later build SPDK with 23b06212cfSKarol Latecki "--with-fio" option. 24b06212cfSKarol Latecki- All test systems must have a user account with a common name, 25b06212cfSKarol Latecki password and passwordless sudo enabled. 26b06212cfSKarol Latecki- [mlnx-tools](https://github.com/Mellanox/mlnx-tools) package must be downloaded 27b06212cfSKarol Latecki to /usr/src/local directory in order to configure NIC ports IRQ affinity. 28b06212cfSKarol Latecki If custom directory is to be used, then it must be set using irq_scripts_dir 29b06212cfSKarol Latecki option in Target and Initiator configuration sections. 3093be26a5SKarol Latecki 31b06212cfSKarol Latecki### Optional 32a42dfab1SKarol Latecki 33b06212cfSKarol Latecki- For test using the Kernel Target, nvmet-cli must be downloaded and build on Target system. 34b06212cfSKarol Latecki nvmet-cli is available [here](http://git.infradead.org/users/hch/nvmetcli.git). 3593be26a5SKarol Latecki 36b06212cfSKarol Latecki## Manual configuration 3793be26a5SKarol Latecki 38b06212cfSKarol LateckiBefore running the scripts some manual test systems configuration is required: 3993be26a5SKarol Latecki 40b06212cfSKarol Latecki- Configure IP address assignment on the NIC ports that will be used for test. 41b06212cfSKarol Latecki Make sure to make these assignments persistent, as in some cases NIC drivers may be reloaded. 42b06212cfSKarol Latecki- Adjust firewall service to allow traffic on IP - port pairs used in test 43b06212cfSKarol Latecki (or disable firewall service completely if possible). 44b06212cfSKarol Latecki- Adjust or completely disable local security engines like AppArmor or SELinux. 45a42dfab1SKarol Latecki 46b06212cfSKarol Latecki## JSON configuration for test run automation 4793be26a5SKarol Latecki 48b06212cfSKarol LateckiAn example json configuration file with the minimum configuration required 49b06212cfSKarol Lateckito automate NVMe-oF testing is provided in this repository. 50b06212cfSKarol LateckiThe following sub-chapters describe each configuration section in more detail. 5193be26a5SKarol Latecki 52b06212cfSKarol Latecki### General settings section 5393be26a5SKarol Latecki 54b06212cfSKarol Latecki``` ~sh 55b06212cfSKarol Latecki"general": { 56b06212cfSKarol Latecki "username": "user", 57b06212cfSKarol Latecki "password": "password", 58b06212cfSKarol Latecki "transport": "transport_type", 59b06212cfSKarol Latecki "skip_spdk_install": bool 60b06212cfSKarol Latecki} 61b06212cfSKarol Latecki``` 6293be26a5SKarol Latecki 63b06212cfSKarol LateckiRequired: 6493be26a5SKarol Latecki 65b06212cfSKarol Latecki- username - username for the SSH session 66b06212cfSKarol Latecki- password - password for the SSH session 67b06212cfSKarol Latecki- transport - transport layer to be used throughout the test ("tcp" or "rdma") 6893be26a5SKarol Latecki 69b06212cfSKarol LateckiOptional: 7093be26a5SKarol Latecki 71b06212cfSKarol Latecki- skip_spdk_install - by default SPDK sources will be copied from Target 72b06212cfSKarol Latecki to the Initiator systems each time run_nvmf.py script is run. If the SPDK 73b06212cfSKarol Latecki is already in place on Initiator systems and there's no need to re-build it, 74b06212cfSKarol Latecki then set this option to true. 75b06212cfSKarol Latecki Default: false. 7693be26a5SKarol Latecki 77b06212cfSKarol Latecki### Target System Configuration 7866f42f37SKarol Latecki 79b06212cfSKarol Latecki``` ~sh 80b06212cfSKarol Latecki"target": { 81b06212cfSKarol Latecki "mode": "spdk", 82b06212cfSKarol Latecki "nic_ips": ["192.0.1.1", "192.0.2.1"], 83b06212cfSKarol Latecki "core_mask": "[1-10]", 84b06212cfSKarol Latecki "null_block_devices": 8, 85b06212cfSKarol Latecki "nvmet_bin": "/path/to/nvmetcli", 86b06212cfSKarol Latecki "sar_settings": [true, 30, 1, 60], 87b06212cfSKarol Latecki "pcm_settings": [/tmp/pcm, 30, 1, 60], 88b06212cfSKarol Latecki "enable_bandwidth": [true, 60], 89b06212cfSKarol Latecki "enable_dpdk_memory": [true, 30] 90b06212cfSKarol Latecki "num_shared_buffers": 4096, 91b06212cfSKarol Latecki "scheduler_settings": "static", 92b06212cfSKarol Latecki "zcopy_settings": false, 93b06212cfSKarol Latecki "dif_insert_strip": true, 9404dd0282SMichal Berger "null_block_dif_type": 3, 9504dd0282SMichal Berger "enable_pm": true 96b06212cfSKarol Latecki} 97b06212cfSKarol Latecki``` 9866f42f37SKarol Latecki 99b06212cfSKarol LateckiRequired: 10093be26a5SKarol Latecki 101b06212cfSKarol Latecki- mode - Target application mode, "spdk" or "kernel". 102b06212cfSKarol Latecki- nic_ips - IP addresses of NIC ports to be used by the target to export 103b06212cfSKarol Latecki NVMe-oF subsystems. 104b06212cfSKarol Latecki- core_mask - Used by SPDK target only. 105b06212cfSKarol Latecki CPU core mask either in form of actual mask (i.e. 0xAAAA) or core list 106b06212cfSKarol Latecki (i.e. [0,1,2-5,6). 107b06212cfSKarol Latecki At this moment the scripts cannot restrict the Kernel target to only 108b06212cfSKarol Latecki use certain CPU cores. Important: upper bound of the range is inclusive! 10993be26a5SKarol Latecki 110b06212cfSKarol LateckiOptional, common: 11193be26a5SKarol Latecki 112b06212cfSKarol Latecki- null_block_devices - int, number of null block devices to create. 113b06212cfSKarol Latecki Detected NVMe devices are not used if option is present. Default: 0. 114b06212cfSKarol Latecki- sar_settings - [bool, int(x), int(y), int(z)]; 115b06212cfSKarol Latecki Enable SAR CPU utilization measurement on Target side. 116b06212cfSKarol Latecki Wait for "x" seconds before starting measurements, then do "z" samples 117b06212cfSKarol Latecki with "y" seconds intervals between them. Default: disabled. 118b06212cfSKarol Latecki- pcm_settings - [path, int(x), int(y), int(z)]; 1195d82cd2bSKarol Latecki Enable [PCM](https://github.com/opcm/pcm.git) measurements on Target side. 120b06212cfSKarol Latecki Measurements include CPU, memory and power consumption. "path" points to a 1215d82cd2bSKarol Latecki directory where pcm executables are present. 1225d82cd2bSKarol Latecki "x" - time to wait before starting measurements (suggested it equals to fio 1235d82cd2bSKarol Latecki ramp_time). 1245d82cd2bSKarol Latecki "y" - time interval between measurements. 1255d82cd2bSKarol Latecki "z" - number of measurement samples. 1265d82cd2bSKarol Latecki Default: disabled. 127b06212cfSKarol Latecki- enable_bandwidth - [bool, int]. Wait a given number of seconds and run 128b06212cfSKarol Latecki bwm-ng until the end of test to measure bandwidth utilization on network 129b06212cfSKarol Latecki interfaces. Default: disabled. 130b06212cfSKarol Latecki- tuned_profile - tunedadm profile to apply on the system before starting 131b06212cfSKarol Latecki the test. 132b06212cfSKarol Latecki- irq_scripts_dir - path to scripts directory of Mellanox mlnx-tools package; 133b06212cfSKarol Latecki Used to run set_irq_affinity.sh script. 134b06212cfSKarol Latecki Default: /usr/src/local/mlnx-tools/ofed_scripts 13504dd0282SMichal Berger- enable_pm - if set to true, power measurement is enabled via collect-bmc-pm 13604dd0282SMichal Berger on the target side. 13793be26a5SKarol Latecki 138b06212cfSKarol LateckiOptional, Kernel Target only: 13993be26a5SKarol Latecki 140b06212cfSKarol Latecki- nvmet_bin - path to nvmetcli binary, if not available in $PATH. 141b06212cfSKarol Latecki Only for Kernel Target. Default: "nvmetcli". 142a42dfab1SKarol Latecki 143b06212cfSKarol LateckiOptional, SPDK Target only: 144f252ff1fSKarol Latecki 145b06212cfSKarol Latecki- zcopy_settings - bool. Disable or enable target-size zero-copy option. 146b06212cfSKarol Latecki Default: false. 147b06212cfSKarol Latecki- scheduler_settings - str. Select SPDK Target thread scheduler (static/dynamic). 148b06212cfSKarol Latecki Default: static. 149b06212cfSKarol Latecki- num_shared_buffers - int, number of shared buffers to allocate when 150b06212cfSKarol Latecki creating transport layer. Default: 4096. 151160af093SKarol Latecki- max_queue_depth - int, max number of outstanding I/O per queue. Default: 128. 152b06212cfSKarol Latecki- dif_insert_strip - bool. Only for TCP transport. Enable DIF option when 153b06212cfSKarol Latecki creating transport layer. Default: false. 154b06212cfSKarol Latecki- null_block_dif_type - int, 0-3. Level of DIF type to use when creating 155b06212cfSKarol Latecki null block bdev. Default: 0. 156b06212cfSKarol Latecki- enable_dpdk_memory - [bool, int]. Wait for a given number of seconds and 157b06212cfSKarol Latecki call env_dpdk_get_mem_stats RPC call to dump DPDK memory stats. Typically 158b06212cfSKarol Latecki wait time should be at least ramp_time of fio described in another section. 15902cb1fe8SKarol Latecki- adq_enable - bool; only for TCP transport. 16002cb1fe8SKarol Latecki Configure system modules, NIC settings and create priority traffic classes 16102cb1fe8SKarol Latecki for ADQ testing. You need and ADQ-capable NIC like the Intel E810. 1624ce17359SKarol Latecki- bpf_scripts - list of bpftrace scripts that will be attached during the 1634ce17359SKarol Latecki test run. Available scripts can be found in the spdk/scripts/bpf directory. 164ffef30aeSpaul luse- dsa_settings - bool. Only for TCP transport. Enable offloading CRC32C 165ffef30aeSpaul luse calculation to DSA. You need a CPU with the Intel(R) Data Streaming 166b7e49409SJohn Kariuki Accelerator (DSA) engine. 1679c262548SJaroslaw Chachulski- scheduler_core_limit - int, 0-100. Dynamic scheduler option to load limit on 1689c262548SJaroslaw Chachulski the core to be considered full. 169f252ff1fSKarol Latecki 170b06212cfSKarol Latecki### Initiator system settings section 171f9dd94b5SKarol Latecki 172b06212cfSKarol LateckiThere can be one or more `initiatorX` setting sections, depending on the test setup. 173f9dd94b5SKarol Latecki 174b06212cfSKarol Latecki``` ~sh 175b06212cfSKarol Latecki"initiator1": { 176b06212cfSKarol Latecki "ip": "10.0.0.1", 177b06212cfSKarol Latecki "nic_ips": ["192.0.1.2"], 1789bacb862SKarol Latecki "target_nic_ips": ["192.0.1.1"], 179b06212cfSKarol Latecki "mode": "spdk", 180b06212cfSKarol Latecki "fio_bin": "/path/to/fio/bin", 181b06212cfSKarol Latecki "nvmecli_bin": "/path/to/nvmecli/bin", 182b06212cfSKarol Latecki "cpus_allowed": "0,1,10-15", 183b06212cfSKarol Latecki "cpus_allowed_policy": "shared", 184b06212cfSKarol Latecki "num_cores": 4, 185b06212cfSKarol Latecki "cpu_frequency": 2100000, 1862c8baa46Swawryk "adq_enable": false, 1872c8baa46Swawryk "kernel_engine": "io_uring" 188b06212cfSKarol Latecki} 189b06212cfSKarol Latecki``` 19093be26a5SKarol Latecki 191b06212cfSKarol LateckiRequired: 19293be26a5SKarol Latecki 193b06212cfSKarol Latecki- ip - management IP address of initiator system to set up SSH connection. 194b06212cfSKarol Latecki- nic_ips - list of IP addresses of NIC ports to be used in test, 195b06212cfSKarol Latecki local to given initiator system. 1969bacb862SKarol Latecki- target_nic_ips - list of IP addresses of Target NIC ports to which initiator 197b06212cfSKarol Latecki will attempt to connect to. 198b06212cfSKarol Latecki- mode - initiator mode, "spdk" or "kernel". For SPDK, the bdev fio plugin 199b06212cfSKarol Latecki will be used to connect to NVMe-oF subsystems and submit I/O. For "kernel", 200b06212cfSKarol Latecki nvmecli will be used to connect to NVMe-oF subsystems and fio will use the 201b06212cfSKarol Latecki libaio ioengine to submit I/Os. 20293be26a5SKarol Latecki 203b06212cfSKarol LateckiOptional, common: 20493be26a5SKarol Latecki 205b06212cfSKarol Latecki- nvmecli_bin - path to nvmecli binary; Will be used for "discovery" command 206b06212cfSKarol Latecki (for both SPDK and Kernel modes) and for "connect" (in case of Kernel mode). 207b06212cfSKarol Latecki Default: system-wide "nvme". 208b06212cfSKarol Latecki- fio_bin - path to custom fio binary, which will be used to run IO. 209b06212cfSKarol Latecki Additionally, the directory where the binary is located should also contain 210b06212cfSKarol Latecki fio sources needed to build SPDK fio_plugin for spdk initiator mode. 211b06212cfSKarol Latecki Default: /usr/src/fio/fio. 212b06212cfSKarol Latecki- cpus_allowed - str, list of CPU cores to run fio threads on. Takes precedence 213b06212cfSKarol Latecki before `num_cores` setting. Default: None (CPU cores randomly allocated). 214b06212cfSKarol Latecki For more information see `man fio`. 215b06212cfSKarol Latecki- cpus_allowed_policy - str, "shared" or "split". CPU sharing policy for fio 216b06212cfSKarol Latecki threads. Default: shared. For more information see `man fio`. 217b06212cfSKarol Latecki- num_cores - By default fio threads on initiator side will use as many CPUs 218b06212cfSKarol Latecki as there are connected subsystems. This option limits the number of CPU cores 219b06212cfSKarol Latecki used for fio threads to this number; cores are allocated randomly and fio 220b06212cfSKarol Latecki `filename` parameters are grouped if needed. `cpus_allowed` option takes 221b06212cfSKarol Latecki precedence and `num_cores` is ignored if both are present in config. 222b06212cfSKarol Latecki- cpu_frequency - int, custom CPU frequency to set. By default test setups are 223b06212cfSKarol Latecki configured to run in performance mode at max frequencies. This option allows 224b06212cfSKarol Latecki user to select CPU frequency instead of running at max frequency. Before 225b06212cfSKarol Latecki using this option `intel_pstate=disable` must be set in boot options and 226b06212cfSKarol Latecki cpupower governor be set to `userspace`. 227b06212cfSKarol Latecki- tuned_profile - tunedadm profile to apply on the system before starting 228b06212cfSKarol Latecki the test. 229b06212cfSKarol Latecki- irq_scripts_dir - path to scripts directory of Mellanox mlnx-tools package; 230b06212cfSKarol Latecki Used to run set_irq_affinity.sh script. 231b06212cfSKarol Latecki Default: /usr/src/local/mlnx-tools/ofed_scripts 2322c8baa46Swawryk- kernel_engine - Select fio ioengine mode to run tests. io_uring libraries and 2332c8baa46Swawryk io_uring capable fio binaries must be present on Initiator systems! 2342c8baa46Swawryk Available options: 2352c8baa46Swawryk - libaio (default) 2362c8baa46Swawryk - io_uring 23793be26a5SKarol Latecki 23802cb1fe8SKarol LateckiOptional, SPDK Initiator only: 23902cb1fe8SKarol Latecki 24002cb1fe8SKarol Latecki- adq_enable - bool; only for TCP transport. Configure system modules, NIC 24102cb1fe8SKarol Latecki settings and create priority traffic classes for ADQ testing. 24202cb1fe8SKarol Latecki You need an ADQ-capable NIC like Intel E810. 243b7e49409SJohn Kariuki- enable_data_digest - bool; only for TCP transport. Enable the data 244b7e49409SJohn Kariuki digest for the bdev controller. The target can use IDXD to calculate the 245b7e49409SJohn Kariuki data digest or fallback to a software optimized implementation on system 246b7e49409SJohn Kariuki that don't have the Intel(R) Data Streaming Accelerator (DSA) engine. 24702cb1fe8SKarol Latecki 248b06212cfSKarol Latecki### Fio settings section 249c4a330c9SKarol Latecki 250b06212cfSKarol Latecki``` ~sh 251b06212cfSKarol Latecki"fio": { 252b06212cfSKarol Latecki "bs": ["4k", "128k"], 253b06212cfSKarol Latecki "qd": [32, 128], 254b06212cfSKarol Latecki "rw": ["randwrite", "write"], 255b06212cfSKarol Latecki "rwmixread": 100, 2561c71de70STomasz Zawadzki "rate_iops": 10000, 257b06212cfSKarol Latecki "num_jobs": 2, 258*23e767c4SKarol Latecki "offset": true, 259*23e767c4SKarol Latecki "offset_inc": 10, 260b06212cfSKarol Latecki "run_time": 30, 261b06212cfSKarol Latecki "ramp_time": 30, 262b06212cfSKarol Latecki "run_num": 3 263b06212cfSKarol Latecki} 264b06212cfSKarol Latecki``` 265c4a330c9SKarol Latecki 266b06212cfSKarol LateckiRequired: 26793be26a5SKarol Latecki 268b06212cfSKarol Latecki- bs - fio IO block size 269b06212cfSKarol Latecki- qd - fio iodepth 270b06212cfSKarol Latecki- rw - fio rw mode 271b06212cfSKarol Latecki- rwmixread - read operations percentage in case of mixed workloads 272b06212cfSKarol Latecki- num_jobs - fio numjobs parameter 273b06212cfSKarol Latecki Note: may affect total number of CPU cores used by initiator systems 274b06212cfSKarol Latecki- run_time - fio run time 275b06212cfSKarol Latecki- ramp_time - fio ramp time, does not do measurements 276b06212cfSKarol Latecki- run_num - number of times each workload combination is run. 277b06212cfSKarol Latecki If more than 1 then final result is the average of all runs. 27893be26a5SKarol Latecki 2791c71de70STomasz ZawadzkiOptional: 2801c71de70STomasz Zawadzki 2811c71de70STomasz Zawadzki- rate_iops - limit IOPS to this number 282*23e767c4SKarol Latecki- offset - bool; enable offseting of the IO to the file. When this option is 283*23e767c4SKarol Latecki enabled the file is "split" into a number of chunks equal to "num_jobs" 284*23e767c4SKarol Latecki parameter value, and each "num_jobs" fio thread gets it's own chunk to 285*23e767c4SKarol Latecki work with. 286*23e767c4SKarol Latecki For more detail see "offset", "offset_increment" and "size" in fio man 287*23e767c4SKarol Latecki pages. Default: false. 288*23e767c4SKarol Latecki- offset_inc - int; Percentage value determining the offset, size and 289*23e767c4SKarol Latecki offset_increment when "offset" option is enabled. By default if "offset" 290*23e767c4SKarol Latecki is enabled fio file will get split evenly between fio threads doing the 291*23e767c4SKarol Latecki IO. Offset_inc can be used to specify a custom value. 2921c71de70STomasz Zawadzki 293b06212cfSKarol Latecki#### Test Combinations 29493be26a5SKarol Latecki 295b06212cfSKarol LateckiIt is possible to specify more than one value for bs, qd and rw parameters. 296b06212cfSKarol LateckiIn such case script creates a list of their combinations and runs IO tests 297b06212cfSKarol Lateckifor all of these combinations. For example, the following configuration: 298e068db83SMaciej Wawryk 299b06212cfSKarol Latecki``` ~sh 300b06212cfSKarol Latecki "bs": ["4k"], 301b06212cfSKarol Latecki "qd": [32, 128], 302b06212cfSKarol Latecki "rw": ["write", "read"] 303b06212cfSKarol Latecki``` 304e068db83SMaciej Wawryk 305b06212cfSKarol Lateckiresults in following workloads being tested: 30693be26a5SKarol Latecki 307b06212cfSKarol Latecki- 4k-write-32 308b06212cfSKarol Latecki- 4k-write-128 309b06212cfSKarol Latecki- 4k-read-32 310b06212cfSKarol Latecki- 4k-read-128 31193be26a5SKarol Latecki 312b06212cfSKarol Latecki#### Important note about queue depth parameter 31393be26a5SKarol Latecki 314b06212cfSKarol Lateckiqd in fio settings section refers to iodepth generated per single fio target 315b06212cfSKarol Lateckidevice ("filename" in resulting fio configuration file). It is re-calculated 316b06212cfSKarol Lateckiwhile the script is running, so generated fio configuration file might contain 317b06212cfSKarol Lateckia different value than what user has specified at input, especially when also 318b06212cfSKarol Lateckiusing "numjobs" or initiator "num_cores" parameters. For example: 31993be26a5SKarol Latecki 320b06212cfSKarol LateckiTarget system exposes 4 NVMe-oF subsystems. One initiator system connects to 321b06212cfSKarol Lateckiall of these systems. 32293be26a5SKarol Latecki 323b06212cfSKarol LateckiInitiator configuration (relevant settings only): 32493be26a5SKarol Latecki 325b06212cfSKarol Latecki``` ~sh 326b06212cfSKarol Latecki"initiator1": { 327b06212cfSKarol Latecki "num_cores": 1 328b06212cfSKarol Latecki} 329b06212cfSKarol Latecki``` 330f9dd94b5SKarol Latecki 331b06212cfSKarol LateckiFio configuration: 332f9dd94b5SKarol Latecki 333b06212cfSKarol Latecki``` ~sh 334b06212cfSKarol Latecki"fio": { 335b06212cfSKarol Latecki "bs": ["4k"], 336b06212cfSKarol Latecki "qd": [128], 337b06212cfSKarol Latecki "rw": ["randread"], 338b06212cfSKarol Latecki "rwmixread": 100, 339b06212cfSKarol Latecki "num_jobs": 1, 340b06212cfSKarol Latecki "run_time": 30, 341b06212cfSKarol Latecki "ramp_time": 30, 342b06212cfSKarol Latecki "run_num": 1 343b06212cfSKarol Latecki} 344b06212cfSKarol Latecki``` 34593be26a5SKarol Latecki 346b06212cfSKarol LateckiIn this case generated fio configuration will look like this 347b06212cfSKarol Latecki(relevant settings only): 348a42dfab1SKarol Latecki 349b06212cfSKarol Latecki``` ~sh 350b06212cfSKarol Latecki[global] 351b06212cfSKarol Lateckinumjobs=1 35293be26a5SKarol Latecki 353b06212cfSKarol Latecki[job_section0] 354b06212cfSKarol Lateckifilename=Nvme0n1 355b06212cfSKarol Lateckifilename=Nvme1n1 356b06212cfSKarol Lateckifilename=Nvme2n1 357b06212cfSKarol Lateckifilename=Nvme3n1 358b06212cfSKarol Lateckiiodepth=512 359b06212cfSKarol Latecki``` 3603d8a0b19SKarol Latecki 361b06212cfSKarol Latecki`num_cores` option results in 4 connected subsystems to be grouped under a 362b06212cfSKarol Lateckisingle fio thread (job_section0). Because `iodepth` is local to `job_section0`, 363b06212cfSKarol Lateckiit is distributed between each `filename` local to job section in round-robin 364b06212cfSKarol Latecki(by default) fashion. In case of fio targets with the same characteristics 365b06212cfSKarol Latecki(IOPS & Bandwidth capabilities) it means that iodepth is distributed **roughly** 366b06212cfSKarol Lateckiequally. Ultimately above fio configuration results in iodepth=128 per filename. 367d6013743SJohn Kariuki 368b06212cfSKarol Latecki`numjobs` higher than 1 is also taken into account, so that desired qd per 369b06212cfSKarol Lateckifilename is retained: 37093be26a5SKarol Latecki 371b06212cfSKarol Latecki``` ~sh 372b06212cfSKarol Latecki[global] 373b06212cfSKarol Lateckinumjobs=2 374b06212cfSKarol Latecki 375b06212cfSKarol Latecki[job_section0] 376b06212cfSKarol Lateckifilename=Nvme0n1 377b06212cfSKarol Lateckifilename=Nvme1n1 378b06212cfSKarol Lateckifilename=Nvme2n1 379b06212cfSKarol Lateckifilename=Nvme3n1 380b06212cfSKarol Lateckiiodepth=256 381b06212cfSKarol Latecki``` 382b06212cfSKarol Latecki 383b06212cfSKarol LateckiBesides `run_num`, more information on these options can be found in `man fio`. 384b06212cfSKarol Latecki 385b06212cfSKarol Latecki## Running the test 386b06212cfSKarol Latecki 387b06212cfSKarol LateckiBefore running the test script run the spdk/scripts/setup.sh script on Target 388b06212cfSKarol Lateckisystem. This binds the devices to VFIO/UIO userspace driver and allocates 389b06212cfSKarol Lateckihugepages for SPDK process. 390b06212cfSKarol Latecki 391d6013743SJohn KariukiRun the script on the NVMe-oF target system: 392d6013743SJohn Kariuki 393b06212cfSKarol Latecki``` ~sh 394d6013743SJohn Kariukicd spdk 3956e8e184bSKonrad Sztybersudo PYTHONPATH=$PYTHONPATH:$PWD/python scripts/perf/nvmf/run_nvmf.py 3963c8451e6SMaciej Wawryk``` 397da5c9b32SMaciej Wawryk 398b06212cfSKarol LateckiBy default script uses config.json configuration file in the scripts/perf/nvmf 399b06212cfSKarol Lateckidirectory. You can specify a different configuration file at runtime as below: 400da5c9b32SMaciej Wawryk 401b06212cfSKarol Latecki``` ~sh 4026e8e184bSKonrad Sztybersudo PYTHONPATH=$PYTHONPATH:$PWD/python scripts/perf/nvmf/run_nvmf.py -c /path/to/config.json 403da5c9b32SMaciej Wawryk``` 404e7fb0e9aSMaciej Wawryk 405b06212cfSKarol LateckiPYTHONPATH environment variable is needed because script uses SPDK-local Python 4066e8e184bSKonrad Sztybermodules. If you'd like to get rid of `PYTHONPATH=$PYTHONPATH:$PWD/python` 407b06212cfSKarol Lateckiyou need to modify your environment so that Python interpreter is aware of 408b06212cfSKarol Latecki`spdk/scripts` directory. 409b06212cfSKarol Latecki 410b06212cfSKarol Latecki## Test Results 411b06212cfSKarol Latecki 412b06212cfSKarol LateckiTest results for all workload combinations are printed to screen once the tests 413b06212cfSKarol Lateckiare finished. Additionally all aggregate results are saved to /tmp/results/nvmf_results.conf 4142f0fdf0eSPawel PiatekResults directory path can be changed by -r script parameter. 415