[SPDK] Re: For Dummies guide to setting up ramdisk NVMe/TCP target
Rui Chang <Rui.Chang at arm.com>
| Newsgroups | dev.linux.lists.spdk |
|---|---|
| Message-ID | < <VI1PR08MB3821015E6876721A35D43BFCE8050@VI1PR08MB3821.eurprd08.prod.outlook.com>> |
Hi Eric
Refer to this page for HOWTO:
https://spdk.io/doc/nvmf.html
You said you want to run on one machine, suppose your machine’s IP is 8.8.8.6
1. Build your SPDK
git clone https://github.com/spdk/spdk spdk
cd spdk
git submodule update --init
./configure
make
1. Run:
Start target:
./build/bin/nvmf_tgt -m 0xf (-m gives the CPU mask. Normally you can make it on the same CPU socket as network card to get better performance)
On another console, run rpc comamnds to do configuration:
./scripts/rpc.py nvmf_create_transport -t TCP (there are lots of additional options you can use if you wish)
./scripts/rpc.py bdev_malloc_create -b Malloc0 200 512
./scripts/rpc.py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -d SPDK_Controller1
./scripts/rpc.py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0
./scripts/rpc.py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t TCP -a 8.8.8.6 -s 4420 (suppose 8.8.8.6 is the IP you want the target to listen on)
Run io:
./build/examples/perf -r 'trtype:TCP adrfam:IPv4 traddr:8.8.8.6 trsvcid:4420 subnqn:nqn.2016-06.io.spdk:cnode1' -q 128 -o 4096 -w write -t 100 -c 0xf0 (-c give the cpu mask for perf tool, you’d better make it different with nvmf_tgt to get better performance)
Regards,
Rui
-----Original Message-----
From: eric.curtin(a)dell.com<mailto:eric.curtin(a)dell.com> <eric.curtin(a)dell.com<mailto:eric.curtin(a)dell.com>>
Sent: Thursday, October 1, 2020 3:23 PM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: [SPDK] For Dummies guide to setting up ramdisk NVMe/TCP target
Hi Guys,
I'm just getting started with SPDK and wanted to create a fake ramdisk NVMe/TCP target block device, just so I could simulate NVMe/TCP traffic on a single Linux instance for development purposes.
Anybody know how to set up a machine like this for NVMe/TCP development?
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
To unsubscribe send an email to spdk-leave(a)lists.01.org<mailto:spdk-leave(a)lists.01.org>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.