jin yu intel - ci.spdk.io€¦ · jin yu intel. environment setup hardware: nvme ssd / remote...
TRANSCRIPT
![Page 1: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/1.jpg)
Jin Yu intel
![Page 2: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/2.jpg)
Environment setup
Hardware:
NVMe SSD / remote NVMF_TGT.
Software
CURRENT_DIR = $(SPDK_ROOT_DIR)
scripts:
./scripts/setup.sh
![Page 3: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/3.jpg)
3
Environment setup
./scripts/setup.sh :
Driver_override
Hugepage
Status
Example:
HUGEMEM=4096 \
./scripts/setup.sh
![Page 4: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/4.jpg)
4
Perf analysis
Example Path:
examples/nvme/perf/
Usage:
./perf -q 1 -o 4096 -w randrw -M 70 \
-t 600 -c 0xf –r “trtype:PCIe
traddr: 0000:04:00.0”
![Page 5: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/5.jpg)
5
Perf analysis
Initialize environment
spdk_env_opts_init(&opts);
spdk_env_init(&opts)
Register driver:
spdk_nvme_probe(trid, cb_ctx, probe_cb, attach_cb, remove_cb)
![Page 6: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/6.jpg)
6
How the NVMe works
NVMe:
Namespace
Queue pair
![Page 7: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/7.jpg)
7
Queue pair
Functions:
spdk_nvme_ctrlr_alloc_io_qpair()
spdk_nvme_ctrlr_free_io_qpair()
spdk_nvme_qpair_process_completions()
Lib:
Nvme_ctrlr.c
Nvme_qpair.c
![Page 8: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/8.jpg)
8
Namespace
Functions:
spdk_nvme_ns_cmd_read_with_md
spdk_nvme_ns_cmd_write_with_md
Lib:
nvme_ns.c
nvme_ctrlr_cmd.c
![Page 9: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/9.jpg)
9
Perf analysis
Core and NVMe SSDs:
Parallel
No lock
Polling
ns_en
try 1
ns_en
try 2
ns_en
try 3
ns_en
try 4
![Page 10: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/10.jpg)
10
Perf work flow
![Page 11: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/11.jpg)
![Page 12: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/12.jpg)
SPDK Mini Meetup, Shanghai 12
Backup
![Page 13: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/13.jpg)
SPDK Mini Meetup, Shanghai 13
How to identify NVMe disks in userspace
Identify app path:
examples/nvme/identify
Usage:
./identify
![Page 14: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/14.jpg)
SPDK Mini Meetup, Shanghai 14
How to manage NVMe disks in userspace
NVMe_manage app path:
./examples/nvme/nvme_manage
Usage and options:
./nvme_manage
NOTICE: Should confirm hardware
support these features
![Page 15: Jin Yu intel - ci.spdk.io€¦ · Jin Yu intel. Environment setup Hardware: NVMe SSD / remote NVMF_TGT. Software CURRENT_DIR = $(SPDK_ROOT_DIR) scripts:./scripts/setup.sh. 3 Environment](https://reader030.vdocuments.mx/reader030/viewer/2022040613/5f06905e7e708231d4189d02/html5/thumbnails/15.jpg)