15
Jin Yu intel

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

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

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

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

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

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

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

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

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

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

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

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

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
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

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

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

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