On Thu, May 03, 2007 at 02:15:45PM -0700, Bakul Shah wrote:
> [originally reported for ZFS on FreeBSD but Pawel Jakub Dawid
>  says this problem also exists on Solaris hence this email.]

Thanks!

> Summary: on ZFS, overhead for reading a hole seems far worse
> than actual reading from a disk.  Small buffers are used to
> make this overhead more visible.
> 
> I ran the following script on both ZFS and UF2 filesystems.
> 
> [Note that on FreeBSD cat uses a 4k buffer and md5 uses a 1k
>  buffer. On Solaris you can replace them with dd with
>  respective buffer sizes for this test and you should see
>  similar results.]
> 
> $ dd </dev/zero bs=1m count=10240 >SPACY# 10G zero bytes allocated
> $ truncate -s 10G HOLEY                       # no space allocated
> 
> $ time dd <SPACY >/dev/null bs=1m     # A1
> $ time dd <HOLEY >/dev/null bs=1m     # A2
> $ time cat SPACY >/dev/null           # B1
> $ time cat HOLEY >/dev/null           # B2
> $ time md5 SPACY                      # C1
> $ time md5 HOLEY                      # C2
> 
> I have summarized the results below.
> 
>                     ZFS            UFS2
>               Elapsed System  Elapsed System         Test
> dd SPACY bs=1m  110.26   22.52        340.38   19.11          A1
> dd HOLEY bs=1m   22.44   22.41         24.24   24.13          A2
> 
> cat SPACY     119.64   33.04  342.77   17.30          B1
> cat HOLEY     222.85  222.08   22.91   22.41          B2
> 
> md5 SPACY     210.01   77.46  337.51   25.54          C1      
> md5 HOLEY     856.39  801.21   82.11   28.31          C2

This is what I see on Solaris (hole is 4GB):

        # /usr/bin/time dd if=/ufs/hole of=/dev/null bs=128k
        real       23.7
        # /usr/bin/time dd if=/zfs/hole of=/dev/null bs=128k
        real       21.2

        # /usr/bin/time dd if=/ufs/hole of=/dev/null bs=4k
        real       31.4
        # /usr/bin/time dd if=/zfs/hole of=/dev/null bs=4k
        real     7:32.2

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
[EMAIL PROTECTED]                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

Attachment: pgpHFXMS6aW7i.pgp
Description: PGP signature

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to