On 4/13/07, Robert Milkowski <[EMAIL PROTECTED]> wrote:

Only if you turn a compression on in ZFS.
Other than that 0s are stored as any other data.



There is some difference, but its marginal as the files get larger. The
disks in mtank are SATA2 ES 500Gb Seagates in a Intel V5000 system. The
system is a default b61 install and totally untuned.

[EMAIL PROTECTED]:~# zpool status
 pool: mtank
state: ONLINE
scrub: none requested
config:

       NAME        STATE     READ WRITE CKSUM
       mtank       ONLINE       0     0     0
         mirror    ONLINE       0     0     0
           c0t2d0  ONLINE       0     0     0
           c1t2d0  ONLINE       0     0     0
         mirror    ONLINE       0     0     0
           c0t5d0  ONLINE       0     0     0
           c1t5d0  ONLINE       0     0     0

[EMAIL PROTECTED]:~# time mkfile 1g /mtank/file_1g 2048Mb/s

real    0m0.518s
user    0m0.004s
sys     0m0.513s

[EMAIL PROTECTED]:~#   dd if=/dev/urandom of=/tmp/1meg bs=512 count=2048; i=0 ;
time while [ $i -lt 1024 ] ; do cat /tmp/1meg ; i=`expr $i + 1` ; done >
/mtank/1g_ran
2048+0 records in
2048+0 records out

real    0m6.876s
user    0m1.205s
sys     0m5.792s

[EMAIL PROTECTED]:~# time mkfile 2g /mtank/file_2g - 182Mb/s

real    0m11.223s
user    0m0.008s
sys     0m1.178s

[EMAIL PROTECTED]:~# time mkfile 5g /mtank/file_5g - 147Mb/s

real    0m34.721s
user    0m0.019s
sys     0m2.841s


[EMAIL PROTECTED]:~# dd if=/dev/urandom of=/tmp/1meg bs=512 count=2048; i=0 ; 
time
while [ $i -lt 5120 ] ; do cat /tmp/1meg ; i=`expr $i + 1` ; done >
/mtank/5g_ran
2048+0 records in
2048+0 records out

real    0m38.928s
user    0m6.442s
sys     0m32.911s


[EMAIL PROTECTED]:~# time mkfile 10g /mtank/file_10g

real    1m15.185s
user    0m0.037s
sys     0m5.885s
[EMAIL PROTECTED]:~# time mkfile 10g /mtank/file_10g.2 - 134MB/s

real    1m16.490s
user    0m0.038s
sys     0m5.723s
[EMAIL PROTECTED]:~# time mkfile 50g /mtank/file_50g - (132Mb/s)

real    6m27.673s
user    0m0.178s
sys     0m27.549s


Even with 155Gb the snaps are pretty quick:

[EMAIL PROTECTED]:~# ls -l /mtank/
total 162403552
-rw-r--r--   1 root     1073741824 Apr 13 15:50 1g_ran
-rw-r--r--   1 root     5368709120 Apr 13 15:52 5g_ran
-rw-------   1 root     107374182400 Apr  9 15:18 file_100g
-rw------T   1 root     10737418240 Apr  9 15:20 file_10g
-rw------T   1 root     10737418240 Apr  9 15:22 file_10g.2
-rw------T   1 root     1073741824 Apr  9 15:19 file_1g
-rw------T   1 root     2147483648 Apr  9 15:30 file_2g
-rw------T   1 root     53687091200 Apr  9 15:29 file_50g
-rw------T   1 root     5368709120 Apr  9 15:31 file_5g
[EMAIL PROTECTED]:~# zfs list | grep mtank
mtank                             155G   759G   155G  /mtank
[EMAIL PROTECTED]:~# time zfs snapshot [EMAIL PROTECTED]

real    0m0.204s
user    0m0.004s
sys     0m0.006s

[EMAIL PROTECTED]:/mtank# time zfs clone [EMAIL PROTECTED]  mtank/test

real    0m0.299s
user    0m0.004s
sys     0m0.008s


Which is 375GB/s. Much better than:

[EMAIL PROTECTED]:/mtank# time cp file_10g file_10g.b

real    2m15.705s
user    0m0.008s
sys     0m50.084s

Also double because I imagine it has to read and write thru the same disk io
channel.

Between pools is ok as well:

[EMAIL PROTECTED]:/mtank# zpool status ztank
 pool: ztank
state: ONLINE
scrub: none requested
config:

       NAME        STATE     READ WRITE CKSUM
       ztank       ONLINE       0     0     0
         raidz2    ONLINE       0     0     0
           c0t3d0  ONLINE       0     0     0
           c0t4d0  ONLINE       0     0     0
           c1t3d0  ONLINE       0     0     0
           c1t4d0  ONLINE       0     0     0
           c0t1d0  ONLINE       0     0     0


[EMAIL PROTECTED]:/ztank/isos# time cp sol-nv-b61-x86-dvd.iso /mtank/  - 76MB/s
real    0m49.955s
user    0m0.003s
sys     0m19.676s
[EMAIL PROTECTED]:/ztank/isos# du -sh sol-nv-b61-x86-dvd.iso
3.7G   sol-nv-b61-x86-dvd.iso
_______________________________________________
zfs-discuss mailing list
[EMAIL PROTECTED]
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to