# senseless zpool iostat statistics on zfs



## vecihi (Jan 17, 2013)

hello,

i've very big size database directories, i'm compressing directories with "tar -pczf" to .tgz file...
i want to monitor  compressing/IO changes on ZFS partition... but i can't see sensible "zpool iostat" outputs...

why read/write operation count doesn't change?

why read/write bw information doesn't change?

Details
--------



zpool iostat before tar commands:

```
[color="Green"][root@hercules /database/2013/01]# zpool iostat[/color]
               capacity     operations    bandwidth
pool         used  avail   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
tank0       15.1G  13.2G     42    [color="red"]114  [/color]5.04M  [color="red"]9.74M[/color]
tank1       4.71T  1.61T     70     [color="red"]57  [/color]7.94M  [color="red"]5.38M[/color]
----------  -----  -----  -----  -----  -----  -----
```



```
[root@hercules /database/2013/01]# tar -pczf 01.tgz 01/ &
[1] 98323
[root@hercules /database/2013/01]# tar -pczf 02.tgz 02/ &
[2] 98337
[root@hercules /database/2013/01]# tar -pczf 03.tgz 03/ &
[3] 98350
[root@hercules /database/2013/01]# tar -pczf 04.tgz 04/ &
[4] 98358
[root@hercules /database/2013/01]# tar -pczf 05.tgz 05/ &
[5] 98386
[root@hercules /database/2013/01]# tar -pczf 06.tgz 06/ &
[6] 98402
[root@hercules /database/2013/01]# tar -pczf 07.tgz 07/ &
[7] 98430
```


zpool iostat after tar commands, i think operation count should be different:

```
[color="green"][root@hercules /database/2013/01]# zpool iostat[/color]
               capacity     operations    bandwidth
pool         used  avail   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
tank0       15.1G  13.2G     42    [color="Red"]114[/color]  5.04M  [color="red"]9.74M[/color]
tank1       4.71T  1.61T     70     [color="red"]57[/color]  7.94M  [color="red"]5.38M[/color]
----------  -----  -----  -----  -----  -----  -----
```


Directory size information:

```
[color="green"][root@hercules /database/2013/01]# du -sh 01/[/color]
298G    01/
```

System information:

```
FreeBSD 8.2-RELEASE FreeBSD 8.2-RELEASE #3 r218745: Wed Feb 16 15:07:48 PST 2011     root@build8x64.pcbsd.org:/usr/obj/storage/fbsd-sources/8.2/sys/GENERIC  amd6
```


----------



## usdmatt (Jan 17, 2013)

This is an average from system boot so if the system has been up a while they won't change that much.
You can add an interval in seconds to see live information.


```
zpool iostat tank0 1
```


----------



## vecihi (Jan 17, 2013)

```
[color="Green"]# zpool iostat tank1 1[/color]
               capacity     operations    bandwidth
pool         used  avail   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
tank1       4.72T  1.59T     71     57  8.01M  5.39M
tank1       4.72T  1.59T    484      0  58.5M      [color="red"]0[/color]
tank1       4.72T  1.59T    387      0  44.3M      [color="red"]0[/color]
tank1       4.72T  1.59T    217      0  26.5M      0
tank1       4.72T  1.59T    335      0  41.5M      0
tank1       4.72T  1.59T    369      0  45.7M      0
tank1       4.72T  1.59T    449      0  55.8M      0
tank1       4.72T  1.59T    457      0  56.6M      0
tank1       4.72T  1.59T    476      0  57.5M      0
tank1       4.72T  1.59T    320  [color="Red"]2.06K[/color]  39.3M   [color="red"]262M[/color]
tank1       4.72T  1.59T    448      8  55.7M  21.0K
tank1       4.72T  1.59T    520     33  62.6M   253K
tank1       4.72T  1.59T    593     21  72.5M   138K
tank1       4.72T  1.59T    710     16  88.1M   104K
tank1       4.72T  1.59T    629      0  78.1M      0
tank1       4.72T  1.59T    654      0  81.4M      0
tank1       4.72T  1.59T    582      0  72.1M      0
tank1       4.72T  1.59T    399      0  49.5M      0
tank1       4.72T  1.59T    567      0  70.1M      0
tank1       4.72T  1.59T    403      0  49.6M      0
tank1       4.72T  1.59T    388      0  44.0M      0
tank1       4.72T  1.59T    537      0  65.4M      0
```

I see 0 on bw write column... i guess this latecy is about buffer cache , is it normal?

How should i understand 2.06K on operations column & bw column (262M) releationship?


----------



## usdmatt (Jan 17, 2013)

Yes the writes are done in bulk every 5-30 seconds so it's common to see a run of zeros then a group of big writes.

2.06k means just over 2000 write operations during that second totalling 262MB of data.


----------

