Finding out instance/guest disk utilisation on Node Controllers

Follow

Eucalyptus Versions:  3.0 - Current

Introduction

As an administrator of a Eucalyptus cloud its important to be able to monitor activities of a guest. Rogue guests, or guests which are causing problems with resource utilisation of a Node Controller should be identified and dealt with when and where appropriate. 

This article details how to find a measure of disk activity for an instance on a particular Node Controller.

Solution

The first step to finding out the I/O activity of a guest is to locate the device mapper entries for the backing storage.  You can do this by either running ps -ef and grepping for the instance id:

# ps -ef | grep i-f82a0a39
root 5748 6623 0 05:35 pts/0 00:00:00 grep i-f82a0a39
qemu 32589 1 0 Apr28 ? 00:03:51 /usr/libexec/qemu-kvm -name i-f82a0a39 -S -M rhel6.5.0 -enable-kvm -m 256 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 6d536bf7-bc71-12b2-5cd2-f66211e2fc08 -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/i-f82a0a39.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/eucalyptus/instances/work/AIDX09EXAFPDFHFSH8L8Y/i-f82a0a39/link-to-sda,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/var/lib/eucalyptus/instances/work/AIDX09EXAFPDFHFSH8L8Y/i-f82a0a39/link-to-sdb,if=none,id=drive-virtio-disk1,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 -netdev tap,fd=25,id=hostnet0,vhost=on,vhostfd=37 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=d0:0d:f8:2a:0a:39,bus=pci.0,addr=0x3 -chardev file,id=charserial0,path=/var/lib/eucalyptus/instances/work/AIDX09EXAFPDFHFSH8L8Y/i-f82a0a39/console.log -device isa-serial,chardev=charserial0,id=serial0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6

or by using virsh dumpxml on the Node Controller to view the disk device paths:

# virsh dumpxml <instance-id>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source dev='/var/lib/eucalyptus/instances/work/AIDX09EXAFPDFHFSH8L8Y/i-f82a0a39/link-to-sda'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>

Then, run iostat against the path:

iostat /var/lib/eucalyptus/instances/work/AIDX09EXAFPDFHFSH8L8Y/i-f82a0a39/link-to-sdb
avg-cpu: %user %nice %system %iowait %steal %idle
0.54 0.00 0.44 0.35 0.00 98.68
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
dm-75 0.00 0.00 0.00 3593 0

tags: node, NC, instance, disk, io, i/o, libvirt, resource

Have more questions? Submit a request

Comments

Powered by Zendesk