Bad TCP Checksums Over Loopback

2009-01-14 Thread avishay

Hello all,
I tried a simple test:
1. Installed an iSCSI target.  I tried this with both IET
(iscsitarget.sourceforge.net) and tgt (apt-get install tgt).
2. Created a 2GB file to use as the target.
3. Connected to the target with iscsiadm.
4. Ran the following command to test read throughput: dd if=/dev/sdc
of=/dev/null bs=128M count=16
5. Ran the following command to test write throughput: dd if=/dev/zero
of=/dev/sdc bs=128M count=16
(where /dev/sdc is the iSCSI device)

For read throughput I get about 98MB/s, and for write throughput about
75MB/s.  I tried to figure out why writes are so much slower, so I
opened up wireshark and looked at the packets.  I captured 256,270
packets.  Here are some statistics from wireshark:
Bad checksum(TCP): 35,963
Bad checksum(UDP): 4
Previous segment lost (TCP): 24,502
ACKed lost segment (TCP): 51,651

I would bet that this has something to do with the low throughput.
(For the read test, everything looks fine in wireshark).  I uploaded
the compressed dump here:
http://www.fsl.cs.sunysb.edu/~avishay/iscsi-loopback-write.dump.tgz

I'm assuming the problem lies in open-iscsi because I tried two
different targets with the same results, and I'm working over loopback
(no network issues).

Some more info:
# uname -a
Linux guri 2.6.24-16-server #1 SMP Thu Apr 10 13:15:38 UTC 2008 x86_64
GNU/Linux

# cat /etc/issue
Ubuntu 8.04.1 \n \l

# iscsiadm -V
iscsiadm version 2.0-865

# dpkg -l | grep open-iscsi
ii  open-iscsi
2.0.865-1ubuntu3 High performance, transport
independent iSCS

# iscsiadm -m discovery -t st -p 127.0.0.1
127.0.0.1:3260,1 iqn.2001-04.com.example:storage.disk2.sys1.xyz

# iscsiadm -m node -T iqn.2001-04.com.example:storage.disk2.sys1.xyz -
p 127.0.0.1 -l
Login session [iface: default, target: iqn.
2001-04.com.example:storage.disk2.sys1.xyz, portal: 127.0.0.1,3260]

# fdisk -l /dev/sdc
Disk /dev/sdc: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
Disk identifier: 0x

Disk /dev/sdc doesn't contain a valid partition table


Any help would be appreciated!
Thanks a lot!
Avishay

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Bad TCP Checksums Over Loopback

2009-01-14 Thread Bart Van Assche

On Mon, Jan 12, 2009 at 11:48 AM,  avis...@gmail.com wrote:
 Here are some statistics from wireshark:
 Bad checksum(TCP): 35,963

Usually this means that Wireshark was unable to capture all packets,
not that there was a problem with the packets themselves.

Bart.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---