total disk data include virtual lvm device data (so doubling the calculated values) #26

Closed
valgog opened this Issue Aug 2, 2012 · 10 comments

Projects

None yet

3 participants

@valgog
valgog commented Aug 2, 2012

When displaying total disk R/W data, the data for virtual lvm devices (dm-\d+) is included into the sum.

This leads to the display of doubled R/W performance.

Here is the output of the iostat 1:

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
cciss/c0d0        5.00         0.00         0.02          0          0
cciss/c0d1      712.00         0.00       132.64          0        132
cciss/c0d2      810.00         0.00       142.34          0        142
cciss/c0d3        0.00         0.00         0.00          0          0
dm-1              0.00         0.00         0.00          0          0
dm-0          34221.00         0.00       267.35          0        267

and the outpu of dstat -d --disk-util:

-dsk/total- c0d0-c0d1-c0d2-c0d3
 read  writ|util:util:util:util
   0   567M|2.40: 100: 100:   0
   0   566M|2.80: 100: 100:   0
   0   552M|2.40: 100: 100:   0
Owner

What version of dstat are you using ?

valgog commented Aug 3, 2012
$ dstat --version
Dstat 0.7.2
Written by Dag Wieers <dag@wieers.com>
Homepage at http://dag.wieers.com/home-made/dstat/

Platform posix/linux2
Kernel 2.6.32-5-amd64
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) 
[GCC 4.4.5]

Terminal type: xterm (color support)
Terminal size: 77 lines, 167 columns

Processors: 16
Pagesize: 4096
Clock ticks per secs: 100

internal:
        aio, cpu, cpu24, disk, disk24, disk24old, epoch, fs, int, int24, io, ipc, load, lock, mem, net, page, page24, proc, raw, socket, swap, swapold, sys, tcp, 
        time, udp, unix, vm
/usr/share/dstat:
        battery, battery-remain, cpufreq, dbus, disk-tps, disk-util, dstat, dstat-cpu, dstat-ctxt, dstat-mem, fan, freespace, gpfs, gpfs-ops, helloworld, 
        innodb-buffer, innodb-io, innodb-ops, lustre, memcache-hits, mysql-io, mysql-keys, mysql5-cmds, mysql5-io, mysql5-keys, net-packets, nfs3, nfs3-ops, nfsd3, 
        nfsd3-ops, ntp, postfix, power, proc-count, qmail, rpc, rpcd, sendmail, snooze, squid, test, thermal, top-bio, top-bio-adv, top-childwait, top-cpu, 
        top-cpu-adv, top-cputime, top-cputime-avg, top-int, top-io, top-io-adv, top-latency, top-latency-avg, top-mem, top-oom, utmp, vm-memctl, vmk-hba, vmk-int, 
        vmk-nic, vz-cpu, vz-io, vz-ubc, wifi
Owner

You are correct, this wasn't the case in older kernels because /sys/block did not include certain types of block devices. Unfortunately this is no longer the case :-/

Hi Dag

(Dstat 0.7.0 on RH6)

The same issue is with virtual Veritas (VxVM) devices:

Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util
sdh 0,00 1,00 1,00 1800,00 0,01 108,95 123,90 2,04 1,14 0,11 19,40
VxVM32993 0,00 4,00 1340,00 1804,00 73,63 108,96 118,94 2,84 0,90 0,22 70,50

dstat doubles the disk throughput:

----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
3 8 84 3 0 2| 84M 218M| 123M 61M| 0 0 | 101k 84k
3 8 84 2 0 2| 92M 220M| 126M 67M| 0 0 | 110k 96k

/FrankL

Owner

Can someone verify if this problem still affects master ? Since I cannot reproduce it, someone may already have fixed it.

I'd like to release 0.7.3 sooner rather than later...

Hi Dag

I will test this, give me a day or two.

/FrankL

Hi Dag

Tested with "Dstat 0.7.2svn" and the problem is still present.

With regards
Frank Limstrand

Owner

@franklimstrand I cannot reproduce it on a RHEL6.5 system:

[dag@moria ~]$ dstat -d -D total,sda,dm-0,dm-1,dm-2,dm-3
-dsk/total----dsk/sda-----dsk/dm-0----dsk/dm-1----dsk/dm-2----dsk/dm-3-
 read  writ: read  writ: read  writ: read  writ: read  writ: read  writ
  41k  134k:  28k  134k:  17B    0 :9890B 5030B:  11k   85k:7423B   44k
   0    44k:   0    44k:   0     0 :   0     0 :   0    44k:   0     0 
   0   728k:   0   728k:   0     0 :   0     0 :   0   728k:   0     0 
   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 
   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 
   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 
   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 
   0   488k:   0   488k:   0     0 :   0     0 :   0   488k:   0     0 
   0   448k:   0   448k:   0     0 :   0     0 :   0   448k:   0     0 
   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 
   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 
   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 
   0    12k:   0    12k:   0     0 :   0     0 :   0     0 :   0    12k
   0   472k:   0   472k:   0     0 :   0     0 :   0   472k:   0     0 
   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 
   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 
   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 

As you can tell, the total value does not include the logical volumes (dm) devices.

@dagwieers dagwieers was assigned Nov 28, 2013

Hi Dag

Let me show you:

[root@myhost fs18]# dd if=/dev/zero of=myfile.bin bs=1M count=20000
^C8480+0 records in
8480+0 records out
8891924480 bytes (8.9 GB) copied, 19.9872 s, 445 MB/s

iostat -dmx 1 sdct sdan VxVM32977
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util
sdan 0.00 0.00 0.00 842.00 0.00 210.44 511.85 1.25 1.48 0.99 83.70
sdct 0.00 0.00 0.00 845.00 0.00 211.06 511.55 1.26 1.49 1.00 84.40
VxVM32977 0.00 0.00 0.00 845.00 0.00 422.00 1022.79 1.73 2.04 1.03 87.40

./dstat -d --disk-util
-dsk/total->
read writ>
2650k 6396k>
2208k 851M>
1216k 843M>
1344k 852M>
3888k 837M>
824k 841M>

Dstat is including the VxVM (meta) device which it should not? The VxVM device is the sum of sdan and sdct.
HTH.

/FrankL

@dagwieers dagwieers closed this in 5f5481b Nov 29, 2013
Owner

@franklimstrand Oh I am sorry. I thought this was still related to LVM devices (from the topic) and misread your comments. VxVM devices are new to me, but I included it now to the diskfilter so these devices are excluded from the total value. (See commit 5f5481b)

Please test and reopen if it doesn't do what is expected. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment