On 08/21/2018 08:52 PM, 3kbo...@gmail.com wrote:
> Hi folks,
>
> I am newbie to open-iscsi.
> My case is I export ceph rbd by open-iscsi.
>
> I found the max_sectors_kb is 64, the value is so small, and 4M sequence
> write is only about 10MB/s.
> I can not increase max_sectors_kb, if I do it will return "bash: echo:
> write error: Invalid argument"(But I can change the value to a small one
> < 64, max_hw_sectors_kb is 32767)
>
In new version of the linux kernel the initiator will use the optimal
value reported by the target and then uses the max reported as the limit
that the user can set. It sounds like you are using rbd/ceph with
tcmu-runner which has a default limits of 64K.
If you are using targetcli/lio directly then you can set hw_max_sectors
through targcli when you create the device or in the saveconfig.json file.
If you are using the ceph-iscsi tools then I am actually working on a
gwcli command to configure this right now.
Hello Mike,
Thank you very much, Mike!
On 09/03/2018 02:31 AM, 3kbo...@gmail.com wrote:
> Hello Mike,
>
> I am very appreciate for your instruction.
> Now I can set hw_max_sectors through targcli when i create the device.
> I set it to 8192 same as raw rbd device.
> The performance improve a little, 4M seq write increase from 24MB/s to
> 40MB/s.(hw_max_sectors 64->8192, it is a /backstore/user:rbd/disk_xxx
> device)
> But it is far away from block device, if I usr /backstore/block 4M seq
> write it will be 500MB/s, performance is still a big problem.(first I
> should map a rbd device , then export it by targetcli)
>
> The performance difference between /backstore/user:rbd/ and
> /backstore/block is so big, is it normal?
backstore/user will be lower than block, but I do not think it would a
difference like you are seeing.
ok, it is a good news for me.
What lio fabric driver are you using? iSCSI? What kernel version and
what version of tcmu-runner?
io fabric driver : iscsi
iscsid version: 2.0-873
OS version: CentOS Linux release 7.5.1804 (Core)
kernel version: 3.10.0-862.el7.x86_64
tcmu-runner version: 1.4.0-rc1
Target Build:
targetcli /iscsi create iqn.2018-09.com.test:target1
targetcli /backstores/user:rbd create name=my_replicated_test size=1000G cfgstring=rbd_pool/replicated_image1 hw_max_sectors=8192
targetcli /iscsi/iqn.2018-09.com.test:target1/tpg1/luns create /backstores/user:rbd/my_replicated_test
targetcli /iscsi/iqn.2018-09.com.test:target1/tpg1/portals create 10.0.1.111
targetcli /iscsi/iqn.2018-09.com.test:target1/tpg1 set auth userid=****** password=******
targetcli /iscsi/iqn.2018-09.com.test:target1/tpg1 set attribute authentication=1 demo_mode_write_protect=0 generate_node_acls=1
Target Setting:
> <mailto:open-iscsi+unsub...@googlegroups.com>.
o- / ......................................................................................................................... [...]
o- backstores .............................................................................................................. [...]
| o- block .................................................................................................. [Storage Objects: 1]
| | o- rbd_iblock1 ..................................................... [/dev/rbd/rbd_pool/image2 (50.0TiB) write-thru activated]
| | o- alua ................................................................................................... [ALUA Groups: 1]
| | o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
| o- fileio ................................................................................................. [Storage Objects: 0]
| o- pscsi .................................................................................................. [Storage Objects: 0]
| o- ramdisk ................................................................................................ [Storage Objects: 0]
| o- user:glfs .............................................................................................. [Storage Objects: 0]
| o- user:rbd ............................................................................................... [Storage Objects: 1]
| | o- my_replicated_test ..................................................... [rbd_pool/replicated_image1 (1000.0GiB) activated]
| | o- alua ................................................................................................... [ALUA Groups: 1]
| | o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
| o- user:zbc ............................................................................................... [Storage Objects: 0]
o- iscsi ............................................................................................................ [Targets: 1]
| o- iqn.2018-09.com.test:target1 ...................................................................................... [TPGs: 1]
| o- tpg1 ..................................................................................... [gen-acls, tpg-auth, 1-way auth]
| o- acls .......................................................................................................... [ACLs: 0]
| o- luns .......................................................................................................... [LUNs: 2]
| | o- lun0 ..................................................................... [user/my_replicated_test (default_tg_pt_gp)]
| | o- lun1 ................................................ [block/rbd_iblock1 (/dev/rbd/rbd_pool/image2) (default_tg_pt_gp)]
| o- portals .................................................................................................... [Portals: 1]
| o- 10.0.1.111:3260 .................................................................................................. [OK]
o- loopback ......................................................................................................... [Targets: 0]
o- vhost ............................................................................................................ [Targets: 0]
o- xen-pvscsi ....................................................................................................... [Targets: 0]
On 09/11/2018 11:30 AM, Mike Christie wrote:
> Hey,
>
> Cc mchr...@redhat.com, or I will not see these messages until I check
> the list maybe once a week.
>
> On 09/05/2018 10:36 PM, 3kbo...@gmail.com wrote:
>> What lio fabric driver are you using? iSCSI? What kernel version
>> and
>> what version of tcmu-runner?
>>
>> io fabric driver : iscsi
>>
>> iscsid version: 2.0-873
>>
>> OS version: CentOS Linux release 7.5.1804 (Core)
>>
>> kernel version: 3.10.0-862.el7.x86_64
>>
>> tcmu-runner version: 1.4.0-rc1
>>
>>
There is also a perf bug in that initiator if the node.session.cmds_max
is greater than the LIO default_cmdsn_depth and your IO test tries to
send cmds > node.session.cmds_max.
So set the node.session.cmds_max and default_cmdsn_depth to the same
value. You can set the default_cmdsn_depth in saveconfig.json, and set
cmds_max in the iscsiadm node db (after you set it make sure you logout
and login the session again).
> <mailto:open-iscsi+unsub...@googlegroups.com>.