[OpenIndiana-discuss] comstar iscsi target writeback cache flushed interval
Geoff Nordli
geoffn at gnaa.net
Wed Mar 7 01:20:57 UTC 2012
On Tue, Mar 6, 2012 at 2:31 PM, Richard Elling
<richard.elling at richardelling.com> wrote:
> On Mar 6, 2012, at 1:44 PM, Geoff Nordli wrote:
>
>> Hi.
>>
>> Can someone tell me how often data is flushed from a comstar iscsi
>> target when the writeback cache is enabled?
>
> Periodic flushing is done by the backing store. For ZFS, that defaults to 5 or
> 30 seconds for most implementations (txg commit interval).
>
> Flushes are also respected when the initiator issues the SYNCHRONIZE CACHE
> command.
thanks Richard.
I have been playing around using dd to write to an iscsi target hosted
on a physical machine running OI151a2. The guest is running
Virtualbox and I have disabled the vbox guest caching. There is no
compression or dedup on the zvols.
I have a pool of four 1TB SAS 7200 disks, configured as two mirrored
vdevs with no dedicated zil device.
With the dsync flag set, the iscsi connection gets 8.7MB/s, without it
gets 385MB/s, which seems good to me, I expect there to a major
difference between the two. BTW in my test below, the "data" file is
a file I created from /dev/random.
gnordli at test4:~$ dd if=data obs=8K of=test oflag=dsync
204800+0 records in
12800+0 records out
104857600 bytes (105 MB) copied, 12.0687 s, 8.7 MB/s
gnordli at test4:~$ dd if=data obs=8K of=test
204800+0 records in
12800+0 records out
104857600 bytes (105 MB) copied, 0.272178 s, 385 MB/s
But, if I go right on the zfs filesystem and do a dd with the dsync
flag set the performance is only 1.2MB for the dsync and 151MB for the
async writes. Really, if I have to write a block and wait for a
response, then 1.2MB is probably about right with 7200RPM disks and no
slog.
root at ml-oi1:/tank/testfs1# dd if=data obs=8K of=test oflag=dsync
204800+0 records in
12800+0 records out
104857600 bytes (105 MB) copied, 85.6416 s, 1.2 MB/s
root at ml-oi1:/tank/testfs1# dd if=data obs=8K of=test
204800+0 records in
12800+0 records out
104857600 bytes (105 MB) copied, 0.692548 s, 151 MB/s
Any clues on the differences, because to me it seems there must be
some caching or coalescing of writes in the comstar iscsi target for
me to get 8.7MBs. It seems the target must be getting and acting on
any disk flush commands otherwise there wouldn't be a disparity
between the sync and async writes.
have a great day!
Geoff
More information about the OpenIndiana-discuss
mailing list