Hi,

How are the statistics in 'zpool iostat -v' computed? Is this an 
x-minute-average? I noticed that if there's no I/O for a while, the numbers 
keep decreasing and the zpool manpage doesn't say anything about this.

By the way, the manpage links in 
http://www.opensolaris.org/os/community/zfs/docs/ are not correct, they are 
linked to wrong documents.

Anyway, I noticed that the 'zpool scrub' command always keeps increasing the 
used disk space (specifically, the deferred free blocks) and it doesn't seem 
to be getting freed.

Here's how I tested:

# dd if=/dev/zero of=/tmp/test1 bs=1M count=100
# dd if=/dev/zero of=/tmp/test2 bs=1M count=100
# dd if=/dev/zero of=/tmp/test3 bs=1M count=100

# zpool create test raidz /tmp/test1 /tmp/test2 /tmp/test3

# zpool list
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
test                    286M     89K    286M     0%  ONLINE     -

# zpool scrub test
# zpool scrub test
# zpool scrub test
# zpool scrub test
# zpool scrub test
# zpool scrub test
.
.
.
# zpool scrub test

# zpool list
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
test                    286M   6.45M    280M     2%  ONLINE     -


Notice the used disk space... it gets even bigger if I continue doing zpool 
scrub.


# zdb -bb test

Traversing all blocks to verify nothing leaked ...

        No leaks (block sum matches space maps exactly)

        bp count:             530
        bp logical:       4005376        avg:   7557
        bp physical:      2105344        avg:   3972    compression:   1.90
        bp allocated:     6764544        avg:  12763    compression:   0.59
        SPA allocated:    6764544       used:  2.26%

Blocks  LSIZE   PSIZE   ASIZE     avg    comp   %Total  Type
   498  3.57M   1.92M   6.16M   12.7K    1.86    95.47  deferred free
     1    512     512      2K      2K    1.00     0.03  object directory
     1    512     512      2K      2K    1.00     0.03  object array
     1    16K   1.50K   6.00K   6.00K   10.67     0.09  packed nvlist
     -      -       -       -       -       -        -  packed nvlist size
     5  80.0K   65.0K    198K   39.6K    1.23     3.00  bplist
     -      -       -       -       -       -        -  bplist header
     -      -       -       -       -       -        -  SPA space map header
     6  24.0K   5.00K   20.0K   3.33K    4.80     0.30  SPA space map
     -      -       -       -       -       -        -  ZIL intent log
     8   128K   9.00K   49.0K   6.12K   14.22     0.74  DMU dnode
     2     2K      1K   6.00K   3.00K    2.00     0.09  DMU objset
     -      -       -       -       -       -        -  DSL directory
     2     1K      1K      4K      2K    1.00     0.06  DSL directory child 
map
     1    512     512      2K      2K    1.00     0.03  DSL dataset snap map
     2     1K      1K      4K      2K    1.00     0.06  DSL props
     -      -       -       -       -       -        -  DSL dataset
     -      -       -       -       -       -        -  ZFS znode
     -      -       -       -       -       -        -  ZFS ACL
     -      -       -       -       -       -        -  ZFS plain file
     1    512     512      2K      2K    1.00     0.03  ZFS directory
     1    512     512      2K      2K    1.00     0.03  ZFS master node
     1    512     512      2K      2K    1.00     0.03  ZFS delete queue
     -      -       -       -       -       -        -  zvol object
     -      -       -       -       -       -        -  zvol prop
     -      -       -       -       -       -        -  other uint8[]
     -      -       -       -       -       -        -  other uint64[]
     -      -       -       -       -       -        -  other ZAP
     -      -       -       -       -       -        -  persistent error log
   530  3.82M   2.01M   6.45M   12.5K    1.90   100.00  Total

I have tested this with NexentaOS (build 40) and with zfs-fuse (build 45).

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

Reply via email to