0

When I create an iscsi target containing two luns (bdev), these two luns are mapped to two disks. When I use fio to read and write two disks, iscsi target uses a thread (or core) to perform the operation.

Operators:

./scripts/rpc.py bdev_malloc_create -b Malloc0 64 512
./scripts/rpc.py bdev_malloc_create -b Malloc1 64 512

./scripts/rpc.py --verbose DEBUG iscsi_create_portal_group 1 172.20.20.156:3261
./scripts/rpc.py --verbose DEBUG iscsi_create_initiator_group 2 ANY 172.20.20.156/24

./scripts/rpc.py --verbose DEBUG iscsi_create_target_node disk1 "Data Disk1" "Malloc0:0 Malloc1:1" 1:2 64 -d

iscsiadm -m discovery -t sendtargets -p 172.20.20.156:3261

iscsiadm -m node --targetname iqn.2016-06.io.spdk:disk1 --portal 172.20.20.156:3261 --login

fio -ioengine=libaio -bs=512B -direct=1 -thread -numjobs=2 -size=64M -rw=write -filename=/dev/sdd -name="BS 512B read test" -iodepth=2
fio -ioengine=libaio -bs=512B -direct=1 -thread -numjobs=2 -size=64M -rw=write -filename=/dev/sde -name="BS 512B read test" -iodepth=2

enter image description here The log circled in red above was added by myself. When I read and write to two disks at the same time, the thread does not change.

Can't the read and write operations of these two disks be performed on two different threads?

the read and write operations of these two disks can be performed on two different threads

Luuk
  • 12,245
  • 5
  • 22
  • 33
happyzyz
  • 1
  • 1
  • the last two sentences in your question needs clarification ... (it's currently unclear) – Luuk Jan 29 '23 at 09:59
  • Can you read: [Understanding ISCSI – Benefits And Disadvantages](https://www.lightbitslabs.com/blog/understanding-iscsi/), and specially find the word `thread` in that document ? (sorry for this external link, but the document has: "With iSCSI, therefore, a connection between the initiator and target consists of a single TCP/IP socket opened by a **single thread.**", and some explanation about that ) – Luuk Jan 29 '23 at 10:06
  • To be clear: you have the Linux iSCSI initiator, but the SPDK iSCSI target. You're asking how to make the SPDK target multi-threaded? You can always just run more than one of them, each with its own target with a single LUN. – Mike Andrews Feb 24 '23 at 22:54

0 Answers0