[Stgt-devel] sg_turs on stgt iscsi drive is very slow

Ming Zhang blackmagic02881
Mon Dec 11 17:58:27 CET 2006


Hi, all

Try to compare IET and STGT. 

Pulled out the linux-2.6-target git tree, compiled stgt and iet under
same kernel. Export a 4 disk raid0 device to ini. Ini is open-iscsi
r598.

Want to know how efficient stgt handle context switch. 

run  sg_turs -t -n=10000 /dev/sg0 on IET drive. results is 2521/sec.

vmstat 1 on target side shows this.

 0  0      0 1024792  10560  52112    0    0     0     0 2942 10763  0
65 35  0
 0  0      0 1024792  10560  52112    0    0     0     0 2947 10760  0
63 37  0
 0  0      0 1024792  10560  52112    0    0     0     0 3000 10650  0
71 29  0
 0  0      0 1024792  10568  52104    0    0     0    16 3999  8654  0
69 31  0
 0  0      0 1024792  10568  52112    0    0     0     0 4270  8043  0
44 56  0
 0  0      0 1024792  10568  52112    0    0     0     0 3768  9971  0
60 40  0
 0  0      0 1024792  10568  52112    0    0     0     0 2938 10712  0
68 32  0
 0  0      0 1024792  10568  52112    0    0     0     0 2931 10719  0
66 34  0
 0  0      0 1024792  10576  52104    0    0     0    16 2933 10715  0
65 35  0

run  sg_turs -t -n=10000 /dev/sg0 on stgt drive. results is 250
operations/sec. yes, 250.

vmstat 1 on target side show 

procs -----------memory---------- ---swap-- -----io---- --system--
----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy
id wa
 1  0      0  40340 1032816  25288    0    0     0     0  603   760  0
0 100  0
 0  0      0  38232 1032816  25288    0    0     0     0  632   761  0
0 100  0
 0  0      0  36248 1032816  25288    0    0     0     0  678   759  0
0 100  0
 0  0      0  34264 1032816  25288    0    0     0     0  632   763  0
0 100  0

if i recompile the target kernel with all kernel debug options disabled,
i can get 6000 operations/sec on IET, but still _SAME_ on stgt.

so why stgt can only process a TEST_UNIT_READY command so slowly?

Ming





More information about the stgt mailing list