Skip to contentSkip to conversation

VMGL support on KVM

DISCUSSION Cam Macdonell 3 participants 7 messages Feb 27, 2008 – Feb 29, 2008 KVM

lore
Share & tools
lore
#0 lore raw

Hi,

I've been playing with VMGL and got it to work on KVM using two of the three suggested setups 1) X forwarding and 2) VNC. However, with SDL it doesn't work yet. This will require patching KVM/Qemu's SDL viewer.

Also, I haven't been able to get virtio networking going which is necessary as the network is the bottleneck to getting better performance.

I've installed 2.6.25-rc2, and have the nic model set as virtio and its using a tap interface. I can load the virto_pci and virtio_net modules.
But I can't bring the interface up. Is there any other configuration
in the guest that is necessary?

Host and guest are both 64-bit Scientific Linux 5.0.

Thanks,
Cam

If anyone has questions about getting VMGL to work feel free to ask.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#1 lore raw
Quoted 15 lines · Cam Macdonell

Hi,

I've been playing with VMGL and got it to work on KVM using two of the three suggested setups 1) X forwarding and 2) VNC. However, with SDL it doesn't work yet. This will require patching KVM/Qemu's SDL viewer.

Also, I haven't been able to get virtio networking going which is necessary as the network is the bottleneck to getting better performance.

I've installed 2.6.25-rc2, and have the nic model set as virtio and its using a tap interface. I can load the virto_pci and virtio_net modules.
But I can't bring the interface up. Is there any other configuration
in the guest that is necessary?

Quoted 6 lines

Host and guest are both 64-bit Scientific Linux 5.0.

Thanks,
Cam

If anyone has questions about getting VMGL to work feel free to ask.

Hi Cam,

I've been playing with VMGL also. I'm at work right now so I'll make it quick: I'm getting ~35 FPS with 'glxgears' in the guest versus ~1100 in the host. That's around the same ratio as what the VMGL author gets with a XEN HVM guest. What are your numbers? I've been able to run with virtio but I did not see any significant increase; that might be because I'm using the usermode network stack. I have been setting up Xen on my test machine to see if I can reproduce the author's results.

Cheers,
Jorge

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#2 lore raw
Quoted 20 lines · Jorge Lucángeli Obes
Quoted 19 lines · Cam Macdonell

Hi,

I've been playing with VMGL and got it to work on KVM using two of the three suggested setups 1) X forwarding and 2) VNC. However, with SDL it doesn't work yet. This will require patching KVM/Qemu's SDL viewer.

Also, I haven't been able to get virtio networking going which is necessary as the network is the bottleneck to getting better performance.

I've installed 2.6.25-rc2, and have the nic model set as virtio and its using a tap interface. I can load the virto_pci and virtio_net modules.
But I can't bring the interface up. Is there any other configuration
in the guest that is necessary?

Host and guest are both 64-bit Scientific Linux 5.0.

Thanks,
Cam

Quoted 8 lines
Quoted 1 line

If anyone has questions about getting VMGL to work feel free to ask.

Hi Cam,

I've been playing with VMGL also. I'm at work right now so I'll make it quick: I'm getting ~35 FPS with 'glxgears' in the guest versus ~1100 in the host. That's around the same ratio as what the VMGL author gets with a XEN HVM guest.

Hi,

To be clear, do you have VMGL running? And you're only getting ~35 FPS?

For me, using VMGL doubles the performance of glxgears on two different machines. As well, I'm using the "Enemy Territory" demos the author used and they are usable with VMGL but still jumpy.

How do you use VMGL? Do you use VNC or do you have SDL working some how?

Thanks,
Cam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#3 lore raw
Quoted 1 line

To be clear, do you have VMGL running? And you're only getting ~35 FPS?

I have VMGL running, sorry if that wasn't clear. I'm getting ~35 FPS running 'glxgears' with VMGL in my 32-bit Ubuntu Hardy alpha guest using X forwarding. Running 'glxgears' in my Ubuntu Gutsy 64-bit host gives me ~1100 FPS. Have you tried running 'glxgears' in your host to compare with the numbers you get in the guest? I will try running 'glxgears' in the guest using just sofware rendering, to compare.

Quoted 3 lines

For me, using VMGL doubles the performance of glxgears on two different machines. As well, I'm using the "Enemy Territory" demos the author used and they are usable with VMGL but still jumpy.

I have tried Quake 3 and it's not really usable in that same guest.

Quoted 1 line

How do you use VMGL? Do you use VNC or do you have SDL working some how?

I haven't tried looking into SDL yet.

Cheers,
Jorge

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#4 lore raw
In reply to Cam Macdonell
Quoted 10 lines · Cam Macdonell

Hi,

To be clear, do you have VMGL running? And you're only getting ~35 FPS?

For me, using VMGL doubles the performance of glxgears on two different machines. As well, I'm using the "Enemy Territory" demos the author used and they are usable with VMGL but still jumpy.

How do you use VMGL? Do you use VNC or do you have SDL working some how?

If someone posts a simple howto with how to setup VMGL in a guest and host, I'll take a look at it this weekend and see if I can't increase the FPS by tweaking the virtio network driver.

virtio should get very good throughput but the latencies aren't very optimized yet so if VMGL is latency sensitive, this may be what you're seeing. I don't know what is normal to expect from VMGL though.

Regards,

Anthony Liguori

Quoted 12 lines

Thanks,
Cam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#5 lore raw
Quoted 4 lines · Anthony Liguori

If someone posts a simple howto with how to setup VMGL in a guest and host, I'll take a look at it this weekend and see if I can't increase the FPS by tweaking the virtio network driver.

Quoted 8 lines

virtio should get very good throughput but the latencies aren't very optimized yet so if VMGL is latency sensitive, this may be what you're seeing. I don't know what is normal to expect from VMGL though.

Regards,

Anthony Liguori

Hi Anthony

Here is one I made as I went along. If it's useful I will move it to the KVM wiki. VirtIO does seem to improve performance of an openGL video game ("enemy territory" used in the paper). However glxgears gets better performance (more FPS) using rtl8139. Perhaps a bandwidth v. latency difference?

http://warburg.cs.ualberta.ca/~cam/dokuwiki/doku.php?id=vmgl

Cam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#6 lore raw
Quoted 16 lines · Cam Macdonell
Quoted 4 lines · Anthony Liguori

If someone posts a simple howto with how to setup VMGL in a guest and host, I'll take a look at it this weekend and see if I can't increase the FPS by tweaking the virtio network driver.

Quoted 8 lines

virtio should get very good throughput but the latencies aren't very optimized yet so if VMGL is latency sensitive, this may be what you're seeing. I don't know what is normal to expect from VMGL though.

Regards,

Anthony Liguori

Hi Anthony

Quoted 8 lines

Here is one I made as I went along. If it's useful I will move it to the KVM wiki. VirtIO does seem to improve performance of an openGL video game ("enemy territory" used in the paper). However glxgears gets better performance (more FPS) using rtl8139. Perhaps a bandwidth v. latency difference?

http://warburg.cs.ualberta.ca/~cam/dokuwiki/doku.php?id=vmgl

I can confirm Cam's findings, though I'm also getting better glxgears performance with virtio. Quake 3 plays great in a 800x600 window on my GMA 950 (Intel integrated graphics) laptop. I'll try and get some numbers to compare.

Cam's HOWTO is important IMHO as VMGL does not compile by default on 64 bits. We should move it to the KVM wiki. The only thing I would add is a big warning that the usermode network stack _kills_ performance. I went from ~30 to ~1000 FPS in glxgears by changing usermode to tap.

Cheers,
Jorge

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/