create ramdrive on target
mount -t tmpfs -o size=7G tmpfs /mnt/ramd
Create file in ramdrive
dd if=/dev/zero of=/mnt/ramd/test1 bs=1024 count=6000000
6000000+0 records in
6000000+0 records out
6144000000 bytes (6.1 GB) copied, 8.75343 s, 702 MB/s
Map file to datastore in targetcli
Connect to target
iscsiadm -m node --targetname "iqn.2003-01.org.linux-iscsi.sc-azl-001.x8664:sn.1a7b82ef561a" --portal "192.168.42.135:3260" --login
Logging in to [iface: default, target: iqn.2003-01.org.linux-iscsi.sc-azl-001.x8664:sn.1a7b82ef561a, portal: 192.168.42.135,3260]
Login to [iface: default, target: iqn.2003-01.org.linux-iscsi.sc-azl-001.x8664:sn.1a7b82ef561a, portal: 192.168.42.135,3260] successful.
dmesg | tail
[3658097.364033] sd 11:0:0:0: [sdc] Write Protect is off
[3658097.364033] sd 11:0:0:0: [sdc] Mode Sense: 43 00 00 08
[3658097.364559] sd 11:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[3658097.365159] sd 11:0:0:0: [sdc] 12000000 512-byte hardware sectors (6144 MB)
[3658097.365463] sd 11:0:0:0: [sdc] Write Protect is off
[3658097.365463] sd 11:0:0:0: [sdc] Mode Sense: 43 00 00 08
[3658097.365945] sd 11:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Create partition
fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xf5daec87.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1018, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1018, default 1018):
Using default value 1018
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
Create filesystem and mount
mkfs.ext3 /dev/sdc1
mount /dev/sdc1 /mnt/istest
Write test on initiator
dd if=/dev/zero of=/mnt/istest/test1 bs=1024 count=5600000
5600000+0 records in
5600000+0 records out
5734400000 bytes (5.7 GB) copied, 46.0264 s, 125 MB/s
iSCSI reach network interface limit - 1Gbit
CPU usage on iSCSI target
top - 19:07:58 up 50 min, 1 user, load average: 0.00, 0.01, 0.05
Tasks: 107 total, 2 running, 105 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.0 us, 7.5 sy, 0.0 ni, 92.4 id, 0.0 wa, 0.0 hi, 0.2 si, 0.0 st
KiB Mem: 10268436 total, 6240584 used, 4027852 free, 9448 buffers
KiB Swap: 561148 total, 0 used, 561148 free, 6138880 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3037 root 20 0 0 0 0 R 17.3 0.0 0:03.89 iscsi_trx
3036 root 20 0 0 0 0 S 1.3 0.0 0:00.28 iscsi_ttx
Tested in virtual machine with 10GB RAM, 2 core (phisycal cpu xeon E5520)
After configuring multipath on client - initiator
sc-srv-006:~# dd if=/dev/zero of=/mnt/istest/test1 bs=1024 count=5600000
5600000+0 records in
5600000+0 records out
5734400000 bytes (5.7 GB) copied, 29.79 s, 192 MB/s
Network statistics from target iSCSI
root@sc-azl-001:~# ethstats
total: 0.01 Mb/s In 0.00 Mb/s Out - 15.0 p/s In 0.0 p/s Out
eth0: 0.01 Mb/s In 0.00 Mb/s Out - 8.0 p/s In 0.0 p/s Out
eth1: 0.01 Mb/s In 0.00 Mb/s Out - 7.0 p/s In 0.0 p/s Out
total: 2.04 Mb/s In 0.07 Mb/s Out - 244.9 p/s In 97.8 p/s Out
eth0: 0.98 Mb/s In 0.04 Mb/s Out - 121.0 p/s In 47.3 p/s Out
eth1: 1.06 Mb/s In 0.04 Mb/s Out - 123.9 p/s In 50.5 p/s Out
total: 288.21 Mb/s In 1.37 Mb/s Out - 24193.5 p/s In 2389.0 p/s Out
eth0: 152.06 Mb/s In 0.67 Mb/s Out - 12790.5 p/s In 1154.3 p/s Out
eth1: 136.15 Mb/s In 0.70 Mb/s Out - 11403.0 p/s In 1234.7 p/s Out
total: 1307.89 Mb/s In 6.22 Mb/s Out - 110060.5 p/s In 10903.6 p/s Out
eth0: 666.02 Mb/s In 2.97 Mb/s Out - 56061.4 p/s In 5172.4 p/s Out
eth1: 641.87 Mb/s In 3.25 Mb/s Out - 53999.1 p/s In 5731.2 p/s Out
total: 1286.38 Mb/s In 6.15 Mb/s Out - 108248.9 p/s In 10771.6 p/s Out
eth0: 642.20 Mb/s In 2.88 Mb/s Out - 54058.7 p/s In 5011.2 p/s Out
eth1: 644.18 Mb/s In 3.27 Mb/s Out - 54190.2 p/s In 5760.4 p/s Out
total: 1294.30 Mb/s In 6.19 Mb/s Out - 108921.4 p/s In 10854.0 p/s Out
eth0: 648.03 Mb/s In 2.92 Mb/s Out - 54556.0 p/s In 5089.5 p/s Out
eth1: 646.27 Mb/s In 3.27 Mb/s Out - 54365.4 p/s In 5764.5 p/s Out
total: 631.95 Mb/s In 3.05 Mb/s Out - 53211.1 p/s In 5316.6 p/s Out
eth0: 296.08 Mb/s In 1.34 Mb/s Out - 24938.3 p/s In 2310.2 p/s Out
eth1: 335.87 Mb/s In 1.71 Mb/s Out - 28272.8 p/s In 3006.4 p/s Out
No comments:
Post a Comment