[SPDK] Max Transfer Length

Harris, James R james.r.harris at intel.com
Tue May 2 11:17:31 PDT 2017


> On May 2, 2017, at 1:52 AM, Kumaraparameshwaran Rathnavel <krath at cloudsimple.com> wrote:
> 
> Hi All,
> 
> Is it possible to change the Transfer size of the iSCSI initiator and target to a configurable value. Right now MAXRECVDATASEGMENTLENGTH is 65536. If I change this to 4096, I still see the initiator requesting more than 4k. Is there any other parameters that i should change at the target level to get read and write requests exactly of the Block size and the Block size that I use is 4096.

Hi Param,

MaxRecvSegmentLength only limits the maximum size of iSCSI PDUs - it does not limit the size of SCSI I/O commands.  So limiting MaxRecvSegmentLength to 4KB just means that the data for a 1MB SCSI I/O will basically have to be sent as a sequence of 256 4KB Data PDUs.

Note also that this value is negotiated twice - once for the maximum length that the target can send to the initiator, and another for the maximum length then initiator can send to the target.

If you want to artificially limit the maximum size of I/O sent by a Linux iSCSI initiator for testing purposes, you can modify /sys/block/sdX/queue/max_sectors_kb.

-Jim



More information about the SPDK mailing list