Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am playing a high quality (1080p) video using VLC inside a qemu-kvm virtual machine. The OS on my virtual machine is gentoo and the host OS is Ubuntu.

The video experience is very jerky : the video stops a lot, the verbose mode log has a lot of "PTS is out of range, dropping buffer" and "last picture skipped" messages.

The CPU utilization of the qemu process is nowhere close to 100%. Nor is the disk utilization. ( using Visual inspection of top and iotop).

What else could cause this problem ? What options could I try in vlc to figure out the problem ?

share|improve this question
Don't look at the CPU utilization on the host, run top and iotop in your Gentoo guest and let us know what that says. – Dustin G. May 7 '12 at 4:13
@DustinG looks like the CPU usage in guest is more than 90% most of the time video is playing. Why should the guest CPU utilization be so much more than the host ? – AnkurVj May 7 '12 at 4:48
Because when you are virtualizing, the guest is getting a portion of what the Host has as far as hardware goes. So if you have a quad-core processor and you give the guest 1 core - then the guest is going to show a higher CPU utilization than the host because of relative resources available. Think of it this way, if 100% utilization on a single core is 25% utilization when looking at a quad core. – Dustin G. May 7 '12 at 4:55
but when I do top, doesnt it show only the CPU utilization of the CPU on which the process is running ? I am running these tests on a machine with 12 cores – AnkurVj May 7 '12 at 5:03
How many cores did you assign to the virtual? – Dustin G. May 7 '12 at 5:04
up vote 1 down vote accepted

If possible, I would allocate more resources to the Virtual machine. Specifically, allocating more Cores and seeing if you can up the Video RAM. Virtual machines are not given access to 100% of the resources in your computer, just up to the maximum amount the Hypervisor (qemu-kvm in your case) allows. Keep in mind that your system is also using a virtualized graphics card as well so it is not as powerful as the graphics card as your host has access to - even if a Hypervisor allows advanced video features, there is till a performance penalty for the virtual devices emulation.

share|improve this answer
I think I need to investigate into more depth as to why the virtualized CPU usage is so high. Thanks for the tip – AnkurVj May 7 '12 at 5:44
High-quality video will tax a single-cpu configuration, especially when it's not taking advantage of full video acceleration. – Dustin G. May 8 '12 at 2:32

Doesn't qemu-kvm use vnc for its display? I guess that the video is decoded in software, and then the bitmaps are sent to vnc-viewer process, and then to X server, and then to the video card.

Also, CPU utilization. I think that linux doesn't separate %idle (waiting for the user) and %wio (waiting for io). If a process waits for the grapics card, that is recorded as idle.

If you really want to view video from a virtual machine you probably need to look for something that can write directly to your graphics card. That is the vlc running in your vm needs to use something like DRI to map your graphics card into vlc's own virtual memory space.

share|improve this answer
I think qemu-kvm uses SDL by default, and vnc is optional. even if the video is decoded in software and it is not fast enough then shouldn't I see 100% CPU utilization? \ – AnkurVj May 7 '12 at 4:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.