Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Kvmtop in 2nd Virtualization #38

Open
phamngocsonls opened this issue Sep 21, 2019 · 5 comments
Open

Use Kvmtop in 2nd Virtualization #38

phamngocsonls opened this issue Sep 21, 2019 · 5 comments

Comments

@phamngocsonls
Copy link

I using Kvmtop to monitor cpu steal time. But i'm using an VM have been virtualized and i installed openstack on this VM. When i use kvmtop, cpu core and cpu steal time = 0.

@cha87de
Copy link
Owner

cha87de commented Sep 27, 2019

Hi @phamngocsonls

your setup looks as follows, having two KVM virtualisation layers with pass through mode enabled, and kvmtop is running inside the 1st level virtual machine - is that correct?

   +-------------------------------+
   |                               |
   |   +--------+ +---------+      |
   |   |        | |         |      |
   |   | VM 2nd | | VM 2nd  |      |
   |   | level  | | level   |      |
   |   |        | |         |      |
   |   |        | |         |      |
   |   |        | |         |      |
   |   +--------+ +---------+      |
   |                               |
   |  Virtual Machine     kvmtop   |
   |  with KVM                     |
   |                               |
+--+-------------------------------+--+
|                                     |
|                                     |
|  Physical Host with KVM             |
|                                     |
|                                     |
+-------------------------------------+

Then you're not getting per VM metrics for virtual CPU cores and virtual CPU steal value?
Do you get values for virtual CPU utilisation? (that value should be unavailable as well, I guess)

The problem is probably, that kvmtop cannot get process IDs for the virtual CPU cores from libvirt. To verify, can you please run the following commands and send me the output?

virsh -c qemu:///system qemu-monitor-command --hmp $DOMAINNAME info cpus

You should get something like * CPU #0: thread_id=1315.

@cha87de
Copy link
Owner

cha87de commented Oct 22, 2019

Any chance to get the requested details @phamngocsonls ? Thanks for your support

@phamngocsonls
Copy link
Author

This is my output
CPU #0: pc=0xffffffff8103df56 (halted) thread_id=26076
CPU #0: pc=0xffffffff8103df56 (halted) thread_id=29421
CPU #0: pc=0xffffffff8103df56 (halted) thread_id=28209
CPU #0: pc=0xffffffff8103df56 (halted) thread_id=28893

@cha87de
Copy link
Owner

cha87de commented Oct 24, 2019

Great, thanks. So the thread ids are available. Can you check, if the schedstat files are available in your procfs folder for each of the thread ids? e.g. what is the content of this file: /proc/26076/schedstat (if 26076 is still a valid thread id)?

@phamngocsonls
Copy link
Author

Hi, my result:
root@hlc-cs-lab-sonpn13-vcompute:/home/cloud# cat /proc/4990/schedstat
9843199997 400541737 19462

root@hlc-cs-lab-sonpn13-vcompute:/home/cloud# cat /proc/4997/schedstat
10171044199 334163047 21413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants