Hi list,<br><br>I'm trying to figure out a way to attribute the VM CPU% into individual physical CPU or at least find out whether it is possible. Based on the FAQ of virt-top ( <a href="http://people.redhat.com/~rjones/virt-top/faq.html#pcpu">http://people.redhat.com/~rjones/virt-top/faq.html#pcpu</a> ) , it seems currently libvirt don't support it. <br>
<br>For KVM, attributing VM load into individual physical CPU equals to account the task cpu times spent at each CPU.  Linux kernel export some scheduling statistics  in /proc/<pid>/schedstat and /proc/schedstat, but I can not find a way to derive or calculate the per CPU task time from there. Do you guys know how to calculate or *approximate* per CPU task time, ( possiblly from existing kernel statistics ), can you give me some directions? Or the task itself e.g. KVM has to maintain such statistics. <br>
<br>Per the FAQ of virt-top,  there are only 2 workaround: <br><ol><li> Pin all your virtual CPUs to physical CPUs.  Then there is
  no ambiguity. </li><li> Assume that CPU affinity works and assume the domain
  is running on the '#'-marked CPU(s). </li></ol><p>Workaround #2 seems promising but I'm not sure how accurate it is. <br></p>-- <br>Please consider the environment before you print this mail<br>Zhen Zhang<br>
Zhejiang University<br>Yuquan Campus<br><a href="mailto:MSN%3AFury_robert@hotmail.com">MSN:Fury_robert@hotmail.com</a><br>