[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] detecting paging inside of VMs


  • To: "Tim Wood" <twwood@xxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
  • From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
  • Date: Fri, 19 May 2006 22:04:44 +0200
  • Delivery-date: Fri, 19 May 2006 13:05:12 -0700
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Thread-index: AcZ7eoOp+uoraj8xR2C3OnRxjEOp9AAA7CKQ
  • Thread-topic: [Xen-users] detecting paging inside of VMs

The obvious way to do this would be to detect from inside each domain that "I'm swapping a lot", and send a message (via networking most obviously) to some monitor software within Dom0 that can take some suitable action, rather than push this task into the less natural place of the hypervisor. Since this is not something that needs millisecond resolution (or you'd end up thrashing a lot), I think this is a workable solution. The hard part of course is to determine what is "a lot" when it comes to swapping.
 
It should be possible to get this info without modifying the kernel, just adding the suitable service software - which would be no different from adding some other software to the guest to perform whatever task it is supposed to perform.
 
For HVM it would be possible for the hypervisor to track page-fault - I'm not sure if all page-faults are sent to Hypervisor for Para-virtual guests (I don't know enough about para-virtual to answer that), but the problem is that page-faults can happen for many different reasons, not just swapping - pagefaults are for example used to indicate that a page has been written to and need to be copied when using a "Copy on Write" variety of the fork() system call - and if some system is doing a lot of fork calls, doesn't mean that it needs more memory... So unless the hypervisor also understands the REASON for a page-fault, it can't give any good indication of whether the guest needs more memory...
 
--
Mats


From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Tim Wood
Sent: 19 May 2006 20:25
To: Xen Users; twwood@xxxxxxxxx
Subject: [Xen-users] detecting paging inside of VMs

This may be more of a developer question, but I'll ask here first.

I'd like to be able to detect when a VM is pressed for memory and as a result is paging lots of pages out to disk.  Can anyone famliar with the xen internals tell me if it is feasible to detect from inside the xen hypervisor when a VM is doing this? 

I'm willing to do some hacking, but I'm not even sure if that kind of information can be obtained in the hypervisor.  I'd rather not modify the user level xen kernels if possible.

Thanks for any info!
-Tim
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.