Robert Milkowski wrote:
Hello Matthew,

Tuesday, May 8, 2007, 1:04:56 AM, you wrote:

MA> Pawel Jakub Dawidek wrote:
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

MA> This is probably because the time to execute this on ZFS is dominated by
MA> per-systemcall costs, rather than per-byte costs.  You are doing 32x more
MA> system calls with the 4k blocksize, and it is taking 20x longer.

MA> That said, I could be wrong, and yowtch, that's much slower than I'd like!


But 4k for UFS took him 31s while 4k for ZFS took him 14x more time!
In both cases the same number of syscalls were executed.

So, I'm hearing two claims here: ZFS is much slower than UFS when reading a sparse file, and ZFS is much slower at reading a sparse file than a filled-in file. However, I am not able to reproduce these results.

On a 2-CPU, 2.2GHz Opteron, with most recent Nevada bits, nondebug:

on ZFS, 4k recordsize, ptime dd if=file of=/dev/null bs=4k
sparse: 1.3sec real
filled, cached: 0.9sec real

on ZFS, 1k recordsize, ptime dd if=file of=/dev/null bs=1k
sparse: 5.4sec real
filled, cached: 3.5sec real

on UFS, (4k blocksize), ptime dd if=file of=/dev/null bs=4k
sparse, cached: 0.8sec real
filled, cached: 0.8sec real

In summary:

ZFS is ~40% slower than UFS when reading sparse files (with 4k block/recordsize).

ZFS is ~40% slower reading a sparse file than a cached filled-in file (with 4k or 1k recordsize). This is because we don't cache the sparse buffers, so we spend more time instantiating and zeroing them.

So, I'm not sure how you are getting your 20x number. Are you sure that you aren't using debug bits or something?

--matt


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

Reply via email to