0

This question is admittedly overlapping with iSCSI Packet Header but I hope for a more specific answer than provided for that one for my more specific question.

Question: How much overhead is introduced by iSCSI and SCSI in the transfer of the data to read or write?

I understand that this is done in the Data-In and Data-Out transport packets and I understand there is overhead from TCP/IP and Ethernet, but what additional overhead is needed by iSCSI/SCSI? I recognize that SCSI Protocol Data Units (PDU) are packed into TCP datagrams by some algorithm, but I'm unsure of that algorithm.

I realize there is a full conversation that needs to happen between the initiator and target and I will ignore that part. So, I only want to know about the data packets sent following a read or write command.

Community
  • 1
  • 1
Kevin Buchs
  • 2,520
  • 4
  • 36
  • 55
  • For ISCSI you need 48 byte for BHS And for SCSI, its CDB contained in BHS, and its data is in data seg. The length of data seg is not ensure, it is negotiated by ini and tgt when the session is bulided. – wangli_64604 Jul 13 '15 at 09:38

2 Answers2

3

Here is what I have assembled from looking through the iSCSI RFC 3720.

The Protocol Data Unit (PDU - iSCSI "packet") has these elements:

  1. Basic Header Segment - 48 bytes
  2. Additional Header Segments - optional - 0 bytes (assume these are not needed)
  3. Header Digest - 4 bytes (optional, but want this)
  4. Data Segment - 8192 bytes (the max received data length is negotiated between the initiator and target, 8192 is the default, so will use that)
  5. Data Digest - 4 bytes (optional, but want this)

So, I see an overhead of 56 bytes to transmit 8192 bytes of actual data.

Kevin Buchs
  • 2,520
  • 4
  • 36
  • 55
  • Note that it's not always 8192 bytes - it depends on the negotiated MaxRecvDataSegmentSize; if both sides negotiate that to be 128kB, then it's gonna be 48 bytes of overhead per 128kB transaction, assuming the initiator is actually doing large reads or writes. – Edward Tomasz Napierala May 20 '14 at 22:28
0

For a read the below is correct. But for a write (if immediate data is not enabled) there are extra bytes required for the target to send another PDU called R2T which is 48 bytes. The digest is rarely used because most iSCSI connections are local and TCP/IP has a CRC.

eddyq
  • 879
  • 1
  • 13
  • 25