S. Ercan Yüzbasioglu
2009-Apr-17 10:09 UTC
[Xen-users] Why does DomU CPU usage increase during live migration?
Hi dear XENers, I did a quick experiment, and I observe that, during live-migration of a paravirtualized DomU from a Host to another (identical) one, DomU''s CPU usage drastically increases: especially the user and sys values. I would expect that Dom0 should be the only domain whose CPU usage is supposed to increase. The migration process is supposed to be transparent to the DomU, right? So I cannot justify this behaviour. Does anybody have an idea about this? I ask this as a general discussion, cut I can provide specific information about my system if necessary. Hint: DomU boots using Dom0''s kernel, I suspect this might be the reason, but why? Doesn''t it has its own copy of kernel? Good day! Ercan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier Guerra
2009-Apr-17 14:26 UTC
Re: [Xen-users] Why does DomU CPU usage increase during live migration?
S. Ercan Yüzbasioglu wrote:> I would expect that Dom0 should be the only domain whose CPU usage is > supposed to increase. The migration process is supposed to be transparent to > the DomU, right? So I cannot justify this behaviour. Does anybody have an > idea about this?two ideas: 1- Xen''s Hypervisor is doing a heavy work, and charges it to the DomU''s credit, therefore the scheduler gives less CPU time to the ''real'' DomU, so it gets less idle time, so higher CPU usage. 2- the migration system uses MMU facilities to mark which pages have changed after copied (so they have to be recopied). that marking makes the whole DomU RAM look a bit like virtual memory (backed by real RAM), temporarily increasing overhead, and making all processes in DomU slightly slower. -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
S. Ercan Yüzbasioglu
2009-Apr-18 10:37 UTC
Re: [Xen-users] Why does DomU CPU usage increase during live migration?
Hi again, Thanks a lot for sharing your opinion. In my opinion, if the first one was true, I was supposed to see an increase of the "steal" CPU time, not user or sys. Because no matter how many cpu cycles the virtual CPU gets, user and sys values are percentages of the CPU cycles that used by a "user" or "system" process, among total CPU cycles. If the VCPU has to wait for a CPU, because Dom0 or some other DomU is currently using it, it would be given in the steal percentage. Do you agree with that? So the second one seems more likely to me. As far as I know, during migration of a DomU, all its page writing requests end up with a page fault, so that Xen knows that this particular page is dirtied. This might be causing an overhead, as you mentioned. But this handling is done by Xen though, so like above, it shouldn''t count as a cpu time used by the process itself. Anyway, this direction looks like the right one for further investigation. Do you happen to know how the page dirtying rate of a DomU can be monitored. Is it possible at all? Would something in /proc provide me this kind of information? Cheers, Ercan On Fri, Apr 17, 2009 at 4:26 PM, Javier Guerra <javier@guerrag.com> wrote:> S. Ercan Yüzbasioglu wrote: > > I would expect that Dom0 should be the only domain whose CPU usage is > > supposed to increase. The migration process is supposed to be transparent > to > > the DomU, right? So I cannot justify this behaviour. Does anybody have an > > idea about this? > > two ideas: > > 1- Xen''s Hypervisor is doing a heavy work, and charges it to the DomU''s > credit, therefore the scheduler gives less CPU time to the ''real'' DomU, so > it gets less idle time, so higher CPU usage. > > 2- the migration system uses MMU facilities to mark which pages have > changed after copied (so they have to be recopied). that marking makes the > whole DomU RAM look a bit like virtual memory (backed by real RAM), > temporarily increasing overhead, and making all processes in DomU slightly > slower. > > > > -- > Javier >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users