When measuring i/o performance of a VM, it is necceary to understand the i/o happening at the vdi layer. This article will help in relating the devices in iostat output to corresponding VHD
To find the tdX device corresponging to an VDI related to a VM, complete the following procedure (for example, VDI with name-label="citrix-license disk")
1) Run the following command to find the VDI UUID given that you know the VM name label
[root@test /]# xe vdi-list name-label=citrix-license disk uuid ( RO) : 7cd40609-4a53-48e3-83f1-98dc6ad262a5 name-label ( RW): citrix-license disk name-description ( RW): Created by template provisioner sr-uuid ( RO): 46059437-ba85-5699-cd30-57175caeaa26 virtual-size ( RO): 8589934592 sharable ( RO): false read-only ( RO): false
Here VDI uuid is 7cd40609-4a53-48e3-83f1-98dc6ad262a5
2) Now to find the minor number associated with the corresponding VDI uuid , run #tap-ctl list
[root@test]# tap-ctl list You receive the following output: 10636 1 0 vhd /dev/VG_XenStorage-46059437-ba85-5699-cd30-57175caeaa26/VHD-d84531eb-93c9-4a42-9b21-ffe5591170f4 11274 2 0 vhd /dev/VG_XenStorage-631b10d8-cd21-7694-7801-c5839e02be8f/VHD-f455e552-2c0a-44e1-8686-bddea55eda40 11454 3 0 vhd /dev/VG_XenStorage-631b10d8-cd21-7694-7801-c5839e02be8f/VHD-4959f268-f0ba-4b8b-bd33-68780da799e9 12469 4 0 vhd /dev/VG_XenStorage-46059437-ba85-5699-cd30-57175caeaa26/VHD-7cd40609-4a53-48e3-83f1-98dc6ad262a5 9583 0 0 vhd /dev/VG_XenStorage-631b10d8-cd21-7694-7801-c5839e02be8f/VHD-18714d84-9fc4-44ef-b1bf-853e8cfb57b7
In this output, the second column is minor number of a device
3. Now with the minor number we can identify the tdx device by searching in /sys/block
# grep MINOR-NUMBER /sys/block/td*/dev
[root@test /]# grep -wl 4 /sys/block/td*/dev /sys/block/tde/dev
Run the following command to find out the I/O of Tap Disk:
[root@test /]# iostat -xn Linux 2.6.32.43-0.4.1.xs1.8.0.847.170785xen (test) 08/13/2014 avg-cpu: %user %nice %system %iowait %steal %idle 0.62 0.00 0.05 0.12 0.04 99.18 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util sda 0.02 1.87 0.55 2.97 49.13 90.42 39.66 0.01 2.66 1.39 0.49 sda1 0.01 1.84 0.05 0.97 1.73 22.42 23.70 0.00 3.43 2.87 0.29 sda2 0.00 0.00 0.00 0.00 0.00 0.00 7.68 0.00 2.61 2.57 0.00 sda3 0.00 0.04 0.50 2.00 47.40 68.00 46.16 0.01 2.35 0.82 0.20 dm-0 0.00 0.00 0.00 0.00 0.00 0.00 21.93 0.00 3.93 2.86 0.00 dm-1 0.00 0.00 0.23 0.64 34.21 43.52 89.36 0.00 5.41 1.35 0.12 tda 3.77 4.57 0.55 0.86 34.52 43.45 55.45 0.01 9.90 0.89 0.12 sdb 0.01 0.00 1.11 1.35 69.63 50.80 49.07 0.01 5.00 1.66 0.41 dm-2 0.00 0.00 0.00 0.00 0.03 0.00 24.73 0.00 2.47 2.38 0.00 dm-5 0.00 0.00 0.94 0.05 48.53 12.80 62.38 0.00 3.74 2.33 0.23 tdb 0.07 0.00 0.99 0.13 47.37 4.25 46.03 0.00 4.24 2.04 0.23 dm-6 0.00 0.00 0.26 1.06 12.98 19.10 24.28 0.00 1.00 0.71 0.09 tdc 0.02 0.00 0.32 1.07 13.04 19.06 23.03 0.00 1.53 0.70 0.10 dm-7 0.00 0.00 0.00 0.34 0.14 5.37 15.97 0.00 1.05 0.39 0.01 tdd 0.00 0.33 0.01 0.33 0.16 5.36 16.17 0.00 1.35 0.46 0.02 dm-8 0.00 0.00 0.04 0.02 1.17 0.23 23.04 0.00 9.31 4.88 0.03 tde 0.00 0.27 0.04 1.21 0.93 19.66 16.47 0.01 5.44 0.75 0.09 dm-3 0.00 0.00 0.00 0.00 0.01 0.02 48.49 0.00 6.10 1.69 0.00 dm-4 0.00 0.00 0.01 1.15 0.03 19.45 16.82 0.01 4.45 0.48 0.06 dm-9 0.00 0.00 0.06 0.10 2.25 3.20 35.67 0.00 3.95 1.19 0.02