Re: Running KVM inside a chroot

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

 



On Sun, Oct 16, 2011 at 9:23 AM, Avi Kivity <avi@xxxxxxxxxx> wrote:
> On 10/13/2011 02:51 AM, Jorge Lucangeli Obes wrote:
>> On Wed, Oct 12, 2011 at 3:52 PM, Jorge Lucangeli Obes
>> <jorgelo@xxxxxxxxxxxx> wrote:
>> > On Wed, Oct 12, 2011 at 12:55 PM, Alexander Graf <agraf@xxxxxxx> wrote:
>> >>
>> >> On 12.10.2011, at 20:49, Jorge Lucangeli Obes wrote:
>> >>
>> >>> Hi all,
>> >>>
>> >>> I'm working on Chromium OS development. We have a pretty elaborate
>> >>> chroot inside of which we carry out all development. We use KVM to
>> >>> launch Chromium OS builds inside a VM for testing. Turns out that for
>> >>> some reason, when QEMU is launched from inside the chroot, KVM itself
>> >>> seems not to be used. The VM is extremely slow.
>> >>>
>> >>> Is this known/expected? QEMU is installed inside the chroot, the KVM
>> >>> modules are loaded, the /dev/kvm device is present and accesible. Any
>> >>> ideas on how to debug this?
>> >>
>> >> The first obvious idea I'd have here would be to strace the qemu process and check what happens when it opens /dev/kvm :)
>>
>> Resending since original attachment was too large.
>>
>> > That's what I thought. I did a test run under strace. I'm attaching
>> > the list of syscalls from the call to 'open(/dev/kvm)' to the first
>> > successful 'ioctl(KVM_RUN)'. /dev/kvm seems to be opened correctly, a
>> > VCPU is created, and then that VCPU is used with KVM_RUN. After the
>> > first call to 'ioctl(KVM_RUN)', there are long lists of more KVM_RUN
>> > calls, separated by brief groups of other calls. So, IIUC, KVM seems
>> > to be used, and seems to be "working", but the VM is one order of
>> > magnitude slower anyways.
>> >
>> > Any ideas?
>>
>
> What do top/vmstat/kvm_stat say?

I'm attaching the output of the three commands during a test run
launched form inside the chroot, which was slow as usual. I didn't see
anything too weird on top/vmstat, though I found it odd that once the
VM had booted Chromium OS, QEMU still ate 100% of one core. vmstat
didn't show anything strange, QEMU taking up the memory it's supposed
to. What I don't quite know how to interpret is the output of
kvm_stat, hence the attachment.

The host is a Xeon X5650, 6c12t. Kernel is 2.6.32, QEMU in the chroot is 0.12.5.

Thanks for the help Avi.

Cheers,
Jorge

Attachment: kvm_stat_out
Description: Binary data

Attachment: top_out_snip
Description: Binary data

Attachment: vmstat_out
Description: Binary data


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux