Re: bad performance maybe blocksize of LUN related

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 10 Aug 2011 15:43:11 +0200
"Marcus Schwarz" <m.schwarz@xxxxxx> wrote:

> I can see all iscsi targets in Windows and connect to each of it without
> any problem. When I do a file transfer to one of those targets I get a
> write performance of about 10-12 MB/s .
> 
> I'm using NO Jumbo-Frames
> 
> 
> That's how my targets.conf file looks like :
> 
> 
> ### begin of targets.conf file ###
> 
> default-driver iscsi
> 
> <target iqn.2011-08.com.somedomain.internal:storage.steam>
>     backing-store /storage/iscsi/iscsi-steam
>         lun 1 
> </target>
> 
> InitialR2T Yes
> ImmediateData Yes
> 
> ### end of targets.conf file ###
> 
> 
> 
> That's how this target look like :
> 
> 
> ### begin of target ###
> 
> Target 5: iqn.2011-08.com.somedomain.internal:storage.steam
>     System information:
>         Driver: iscsi
>         State: ready
>     I_T nexus information:
>         I_T nexus: 5
>             Initiator: iqn.1991-05.com.microsoft:blackbird
>             Connection: 1
>                 IP Address: 192.168.216.2
>     LUN information:
>         LUN: 0
>             Type: controller
>             SCSI ID: IET     00050000
>             SCSI SN: beaf50
>             Size: 0 MB, Block size: 1
>             Online: Yes
>             Removable media: No
>             Readonly: No
>             Backing store type: null
>             Backing store path: None
>             Backing store flags: 
>         LUN: 1
>             Type: disk
>             SCSI ID: IET     00050001
>             SCSI SN: beaf51
>             Size: 209716 MB, Block size: 512
>             Online: Yes
>             Removable media: No
>             Readonly: No
>             Backing store type: rdwr
>             Backing store path: /storage/iscsi/iscsi-steam
>             Backing store flags: 
>     Account information:
>     ACL information:
>         ALL
> 
> ### end of target ###
> 
> 
> What seems wrong to me is the blocksize oft he LUN. It states "512" but
> the drives I use (WD20EARS) are using 4k Block sizes natively.

You create a file on the file system and use it as an iSCSI logical
unit. In such case, tgt can't use the native block size
unconditionally.

> So I tried to change the blocksize and according to the mailing list it
> should be possible but I can't find how.

tgt is supposed to specify the block size per lun but seems the
feature is not working correctly. I'll fix it shortly but meanwhile
you can the following patch to use the 4096 byte block size
unconditionally to see if you can get the performance boost.


diff --git a/usr/sbc.c b/usr/sbc.c
index cb07be6..0cf40be 100644
--- a/usr/sbc.c
+++ b/usr/sbc.c
@@ -41,7 +41,7 @@
 #include "spc.h"
 #include "tgtadm_error.h"
 
-#define DEFAULT_BLK_SHIFT 9
+#define DEFAULT_BLK_SHIFT 12
 
 static unsigned int blk_shift = DEFAULT_BLK_SHIFT;
 
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux