Horrible OpenGL performance?

Discussions related to using VirtualBox on Linux hosts.
Post Reply
laymacy
Posts: 4
Joined: 29. Mar 2009, 20:12
Primary OS: Ubuntu 8.10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Horrible OpenGL performance?

Post by laymacy »

I've tried PUELA/OSE 2.1.4 and 2.2.0 beta 2. nVidia 180.29 driver, 512mb video card.
Windows XP Guest. Ubuntu 8.10.

My OpenGL rendering is significantly slower than Software Rendering on VirtualBox. Yes you read correctly. It doesn't matter what program I try. All so far are like this. Real-time 3D apps can for example run about 0-1 FPS in OpenGL, and about 15-25 Software Rendering.

I know for a fact the XP Guest runs OpenGL because XP's 3D applications respond to host OpenGL settings (nvidia-settings) changes.

I've set 3D acceleration, installed Guest Additions. toggled 64/128mb video memory, toggled 512mb/1GB memory, toggled VT (Core 2 Duo), toggled host 3D window manager, switch CPU affinities (taskset), changed guest display settings (acceleration/color depth, resolution), and changed host OpenGL settings from here to the moon.

Nothing works.

Anybody experience anything like this?
Anybody have any clue why OpenGL performance could be so poor compared to even software rendering, as apparently it's not so common among other users, at least from what I can gather...?

...
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Horrible OpenGL performance?

Post by Sasquatch »

Are you sure those XP apps use OpenGL and not DirectX, which is the default for Windows apps/games?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
laymacy
Posts: 4
Joined: 29. Mar 2009, 20:12
Primary OS: Ubuntu 8.10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Re: Horrible OpenGL performance?

Post by laymacy »

Yes, 99% sure. Again, my OpenGL host settings affect the 3D display window in XP so for example when I toggle anti aliasing override in nvidia-settings on host, the XP app will toggle anti aliasing as well (after VM restart), somethng that a DirectX app wouldn't do because it isn't accelerated by VirtualBox and wouldn't be affected by an OpenGL setting.

The last two apps I just tested were Poser and IMVU. Poser has context menu options selecting either OpenGL or their software renderer, and IMVU has menu option either DirectX, OpenGL, or software renderer. Selecting OpenGL in each app has the same slow behavior described here (much slower than selecting software rendering in each), and applies the host OpenGL settings in each when OpenGL is selected (and not when software renderer - or even DirectX for IMVU - is selected).

....
Leonid
Volunteer
Posts: 101
Joined: 17. Dec 2008, 15:10

Re: Horrible OpenGL performance?

Post by Leonid »

Compiz enabled on host? If so try disabling, some video drivers just don't work good/fast when your host is running under compiz.
Toggle it when vbox is shut down, it can be that it won't affect performance of an already running app.

Also i have no clue what are the "poser" and "imvu" apps...try running something pure opengl, like wglgears.
Some common numbers winxp guest 1200x900 fullscreen wglgears:
vm with 3d on: 1300fps
vm with 3d off: 21fps.
laymacy
Posts: 4
Joined: 29. Mar 2009, 20:12
Primary OS: Ubuntu 8.10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Re: Horrible OpenGL performance?

Post by laymacy »

Nope, I use KDE4's KWin window manager, but it has similar 3D effects which I've tried both toggled off and on, and even tried killing the kwin process before starting the VM once just to make sure. I didn't notice any difference.

I also recently tried disabling one display (multi head display), but no difference either.

One oddity I did recently notice is that normal the video card audibly winds up its fan whenever a 3D program begins to be used then stays circulating until the 3D app finishes (on the host). This happens even for simple programs like glxgears. However, when I run VirtualBox, it will wind up when the VM is first started, then soon after wind down again, then do this again whenever the Guest 3D app I'm testing starts (wind up, then down), as if it seems the GL context is closed immediately after it's opened (normally it takes a moment to wind down again once no more 3D contexts are in use on the host).

By the way, this is what the OpenGL part of the VirtualBox log looks like:

OpenGL Info: Render SPU: GL_VENDOR: NVIDIA Corporation
OpenGL Info: Render SPU: GL_RENDERER: GeForce 7950 GT/PCI/SSE2
OpenGL Info: Render SPU: GL_VERSION: 2.1.2 NVIDIA 180.29
Shared crOpenGL service loaded.

And thanks, I'll try wglgears later today.
(also for clarity, Poser http://my.smithmicro.com/win/poser/index.html and IMVU http://www.imvu.com)
Last edited by laymacy on 30. Mar 2009, 21:54, edited 1 time in total.
Leonid
Volunteer
Posts: 101
Joined: 17. Dec 2008, 15:10

Re: Horrible OpenGL performance?

Post by Leonid »

Make sure you have latest GA installed and check with wglgears please, as those programs might have some other meaning for the settings you do for them.
Also, try forcing vsync off in your host gpu drivers, might be something with non matching refreshes of guest/host.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Horrible OpenGL performance?

Post by Sasquatch »

For reference to laymacy, I got these results on Linux Host, running with Compiz-Fusion on, in an XP VM fully updated and OpenGL on. Videocard is an nVidia 7800 GTX, as shown in the log here:

Code: Select all

00:00:01.081 OpenGL Info: Render SPU: GL_VENDOR:   NVIDIA Corporation
00:00:01.082 OpenGL Info: Render SPU: GL_RENDERER: GeForce 7800 GTX/PCI/SSE2/3DNOW!
00:00:01.082 OpenGL Info: Render SPU: GL_VERSION:  2.1.2 NVIDIA 180.37
00:00:01.085 Shared crOpenGL service loaded.

Code: Select all

C:\Documents and Settings\Sasquatch\Desktop>wglgears.exe
8203 frames in 5.0 seconds = 1640.600 FPS
8371 frames in 5.0 seconds = 1674.200 FPS
7437 frames in 5.0 seconds = 1487.400 FPS
7948 frames in 5.0 seconds = 1589.600 FPS
8131 frames in 5.0 seconds = 1626.200 FPS
That's pretty nice.

This is with OpenGL off. Note that there are three entries with a higher value. That is because I minimized the gears window. It's normal, because software rendering doesn't work that hard when it doesn't need to show the actual content. The low values are again when the window is visible.

Code: Select all

C:\Documents and Settings\Sasquatch\Desktop>wglgears.exe
1493 frames in 5.0 seconds = 298.600 FPS
1831 frames in 5.0 seconds = 366.200 FPS
21750 frames in 5.0 seconds = 4350.000 FPS # window is minimized
38476 frames in 5.0 seconds = 7695.200 FPS
16374 frames in 5.0 seconds = 3274.800 FPS # window is restored
1911 frames in 5.0 seconds = 382.200 FPS
1805 frames in 5.0 seconds = 361.000 FPS
1777 frames in 5.0 seconds = 355.400 FPS
And here is the output of Compiz off, OpenGL on, with a minimize of the window in the middle of the results, not very noticable.

Code: Select all

C:\Documents and Settings\Sasquatch\Desktop>wglgears.exe
3995 frames in 5.0 seconds = 799.000 FPS
6789 frames in 5.0 seconds = 1357.800 FPS
6872 frames in 5.0 seconds = 1374.400 FPS
7699 frames in 5.0 seconds = 1539.800 FPS
8825 frames in 5.0 seconds = 1765.000 FPS # minimized here
9139 frames in 5.0 seconds = 1827.800 FPS
9060 frames in 5.0 seconds = 1812.000 FPS # restored here
7524 frames in 5.0 seconds = 1504.800 FPS
6562 frames in 5.0 seconds = 1312.400 FPS
7235 frames in 5.0 seconds = 1447.000 FPS
6610 frames in 5.0 seconds = 1322.000 FPS
I do have to note that I run VB 2.2.0 beta 2, with the GA from beta 1. But it appears that the OpenGL library in use is from 2.1.2, if that's what the log says.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
laymacy
Posts: 4
Joined: 29. Mar 2009, 20:12
Primary OS: Ubuntu 8.10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Re: Horrible OpenGL performance?

Post by laymacy »

Well I'm relieved to report getting comparable numbers with wglgears at least (1200x900, maximized gears window, 3D kwin off)(have been testing all along with GA 2.2.0r45227 and all V-Sync options off)

6165 frames in 5.0 seconds = 1233.000 FPS
5780 frames in 5.0 seconds = 1156.000 FPS
6128 frames in 5.0 seconds = 1225.600 FPS
5657 frames in 5.0 seconds = 1131.400 FPS
6674 frames in 5.0 seconds = 1334.800 FPS

With 3D window management on, drops to around 600 FPS. With 3D acceleration off, goes to ~25.

So I suppose then user application mileage may simply vary, as stands is now. I imagine multi processor support will help on that front as well, eventually, along with whatever other improvements.

Thank you all for the time and help.

Sasquatch, I appreciated the reference. Noting the difference to mine vs the hardware, I'm curious if those tests were also 1200x900 maximized/fullscreen window or something else?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Horrible OpenGL performance?

Post by Sasquatch »

I have a 1280x1024 Host display, and have two panels on my Host, each 24 pixels high. Ran VB in windowed mode, wglgears too, didn't maximize it. Resolution is a custom one, so it's kinda hard to say how many pixels there were in height. But that shouldn't really matter for a windowed wglgears.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
rschaffter
Posts: 11
Joined: 1. Dec 2007, 16:29

Re: Horrible OpenGL performance?

Post by rschaffter »

Laymacy,

This is a bit tangential to your problem, but Poser 7 runs perfectly under Wine if the source is patched:

http://bugs.winehq.org/show_bug.cgi?id=13066

The caveat is there have been installation issues under recent versions of Wine, but you can just copy the installed Poser directory from a Windows installation into the Wine c drive folder (I link it to there myself from a folder in my Documents folder)

I'm afraid I have no experience with imvu.

Cheers,

Rod
Post Reply