[Openstack] KVM shows several processes for a single VM on the host

Narayanan, Krishnaprasad narayana at uni-mainz.de
Tue Sep 9 20:56:13 UTC 2014


Hi,

I used the command ps -AL | grep qemu and I was able to see the process ID 6850 having 6 thread IDs. In case, if I am interested to measure the hardware performance counters / event provided by the CPU registers such as CPU_CLK_UNHALTED, BRANCH_MISSES and etc..., can I know which process ID should I be using to get this information?

Regards,
Krishnaprasad

From: lchen [mailto:cl55hhdu at gmail.com]
Sent: Dienstag, 9. September 2014 20:16
To: openstack at lists.openstack.org
Subject: Re: [Openstack] KVM shows several processes for a single VM on the host


On 09/09/2014 11:08 AM, Narayanan, Krishnaprasad wrote:

Hi Chris,



They appear to be processes when I see it in htop. I have attached the screenshot of a VM named "instance-000001bf" that has 4 virtual cores. In total, I can see 6 processes for the above referred VM.



[cid:image001.png at 01CFCC80.47374B40]



Can I know is there a way to differentiate between  processes and threads?



They ought to be processes according to the htop man page.  But I suspect those are actually the thread IDs - one thread per each vcpu and another thread executing the main loop dispatching events. The last one seems to be a temporal work thread kicked off by the main loop.
The four threads spent similar amount of time running guest code - the guest work load is spread evenly across all vcpus.

You may also run 'ps -AL | grep qemu' to have a look at the thead Ids and the associated process ID (thread group ID).


Liang



Best regards,

Krishnaprasad



-----Original Message-----
From: Chris Friesen [mailto:chris.friesen at windriver.com]
Sent: Dienstag, 9. September 2014 16:31
To: openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>
Subject: Re: [Openstack] KVM shows several processes for a single VM on the host



On 09/09/2014 07:58 AM, Narayanan, Krishnaprasad wrote:

> Hallo all,

>

> I have an OpenStack setup based on Havana with several compute nodes.

> When I instantiate a virtual machine with 1 or more virtual cores, in

> the process list of the compute node, I am able to see more than 1

> process associated to the same VM. The process list that I refer is

> the process which can be seen by running either top or htop.

>

> Can I know the significance of other processes which are associated to

> the same VM? Are these child processes?



Are they separate processes or separate threads?  Separate threads would be expected, but separate processes would not be.



Chris





_______________________________________________

Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Post to     : openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>

Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack




_______________________________________________

Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Post to     : openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>

Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140909/2e6be3b2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 38818 bytes
Desc: image001.png
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140909/2e6be3b2/attachment.png>


More information about the Openstack mailing list