What is holding VirtualBox from providing more video memory?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
fred1
Posts: 21
Joined: 26. Oct 2021, 12:47

What is holding VirtualBox from providing more video memory?

Post by fred1 »

Over the years several bug tickets have been opened as enhancements to request from the developers to increase the VirtualBox video memory which all have been closed. At the moment the maximum is 256 MB, which is incredibly low and is something you come to expect from Windows 98 / XP era and you are limited to 3D applications from the 90s or early 00s.

Why is it so difficult to provide more video memory? And a more recent 3D driver with more recent DirectX support? Trying to run modern 3D applications will result in an error due to the video memory or lacking API support, and I am not talking just talking about games. Just 3D applications in general.

DirectX 11 application error
DirectX 11 application error
virtualbox-directx11-error.png (2.01 KiB) Viewed 5095 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: What is holding VirtualBox from providing more video memory?

Post by scottgus1 »

The actual limit is programmed in by the devs, probably at the limit imposed by the devs' bosses. (the actual limit for Linux OS's is 128MB; only Windows is allowed to go to 256MB.

The reasoning I've seen spoken of on the forum is:
A 1920 x 1080 x 32-bit-color frame takes ~7.9MB to prepare. So there should be 16 frames available for processing in the 128MB memory range, and 32 in the 256MB.

Since Virtualbox is not a gaming platform, these frame depths have been sufficient for non-gaming needs.
fred1
Posts: 21
Joined: 26. Oct 2021, 12:47

Re: What is holding VirtualBox from providing more video memory?

Post by fred1 »

scottgus1 wrote: 10. Jul 2023, 18:07 The actual limit is programmed in by the devs, probably at the limit imposed by the devs' bosses. (the actual limit for Linux OS's is 128MB; only Windows is allowed to go to 256MB.

The reasoning I've seen spoken of on the forum is:
A 1920 x 1080 x 32-bit-color frame takes ~7.9MB to prepare. So there should be 16 frames available for processing in the 128MB memory range, and 32 in the 256MB.

Since Virtualbox is not a gaming platform, these frame depths have been sufficient for non-gaming needs.
Thank you for the explanation. I really do hope you reconsider this limitation as it is really holding back a lot of legitimate test cases inside VirtualBox virtualisation.

I do not think VirtualBox is advertised as a gaming platform anywhere. People resort to platforms such as Wine (with companies like Valve backing it) for cross-platform application support. Even if the 3D side of VirtualBox would permit for such things you are several limited due to input delay with virtualisation translation.

Competing virtualisation software do not advertise themselves as gaming virtualisation software and they simply allow you to utilise the entirety of your available video memory at will, which I think is the best option. Allow the user to decide, do not intentionally limit them because you feel like they should not be doing something.

Also keep in mind that 4k 60hz / 144hz is a decently priced monitor specification available on the market for quite some years now and higher resolutions / refresh rates are on the horizon. 1080p hardware came to market in the early 2000s.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: What is holding VirtualBox from providing more video memory?

Post by scottgus1 »

fred1 wrote: 10. Jul 2023, 20:00 I really do hope you reconsider this limitation
I don't have any decision making capabilities on Virtualbox. You can make an enhancement request on the Bugtracker. I'm sure it's been asked for before, many times, over years of time.
fred1 wrote: 10. Jul 2023, 20:00 it is really holding back a lot of legitimate test cases inside VirtualBox virtualisation.
No one who has asked for more video RAM has been able to demonstrate a legitimate test case for greater RAM actually being needed, aside from "My Xplicit Mass Killer Shoot-em-up game requires 1GB video RAM and all I can give it 256MB! What the heck?!" which is hardly a legitimate test case since:
scottgus1 wrote: 10. Jul 2023, 18:07 Virtualbox is not a gaming platform
If you can put in your Bugtracker ticket enough legitimate test cases to make the devs fall in love with the idea, then more than 256MB might be programmed in.

3D apps that require more video RAM also run better on the metal instead of a VM.
fred1
Posts: 21
Joined: 26. Oct 2021, 12:47

Re: What is holding VirtualBox from providing more video memory?

Post by fred1 »

I opened a ticket:
https://www.virtualbox.org/ticket/21759

I accidentally opened it as a defect instead of an enhancement however.
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: What is holding VirtualBox from providing more video memory?

Post by fth0 »

I don't know enough to tackle every aspect of the topic, but I'll first give some bits of information, and sum up the open question from my POV in the end.

First of all, we must differentiate between (1) video memory used for the frames to be displayed on the virtual monitors, and (2) video memory used for everything else (e.g. 3D objects).

(1) VirtualBox provides up to 256 MB of the host's RAM (not from the host's video memory) for the frames created by the virtual graphics card in the VM. A single 4k frame needs ~32 MB and VirtualBox on Windows hosts needs 3 frames per virtual monitor when 3D acceleration is enabled, so the 256 MB are sufficient for 2 4k displays plus 2 full HD displays. I'll have to admit that it falls short a bit for 3 4k displays, since it would need 288 MB then. ;) On the other hand, you might not be happy with VirtualBox's performance on 3 4k displays anyway.

(2) VirtualBox uses the host's video memory directly for everything else (e.g. the 3D objects).

Regarding 3D support, VirtualBox 6.1 supports Direct3D 9, whereas VirtualBox 7.0 supports DirectX 11. The DX11 support is new and probably unfinished in some areas, so missing functionality is probably expected. On Linux hosts, DX11 uses DXVK (DirectX Vulkan).

Now to the open question: When software is asking for the amount of video memory, does it ask the right question and VirtualBox is answering wrongly, or does it ask the wrong question, VirtualBox is answering rightly and the software misinterprets the answer?
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: What is holding VirtualBox from providing more video memory?

Post by fth0 »

To answer your question in the title of this thread:

If VirtualBox would provide more physical RAM as virtual video memory, neither the host nor the guest would be able to use it in the majority of setups, so it would just be a waste of host memory. You could argue that this would be your decision then, of course. ;)
fred1
Posts: 21
Joined: 26. Oct 2021, 12:47

Re: What is holding VirtualBox from providing more video memory?

Post by fred1 »

fth0 wrote: 10. Jul 2023, 22:10 To answer your question in the title of this thread:

If VirtualBox would provide more physical RAM as virtual video memory, neither the host nor the guest would be able to use it in the majority of setups, so it would just be a waste of host memory. You could argue that this would be your decision then, of course. ;)
You are forgetting that applications inside need video memory as well. People do not just run virtual machines to run operating systems, but also applications inside.

I run a GNU/Linux operating system and I run a Windows virtual machine to run Windows only applications that do not perform well with Wine. I have great difficulty running applications that require a bit more video memory such as recently a 3D printer application that was only available on a Windows platform. I could not run it because it would error out when loading up models due to insufficient video memory available.

It saddens me to see that VirtualBox developers intentionally limit video memory to this small amount because they believe people only want this for games (which would be impossible anyway at an optimal enjoyable level due to virtualisation translation latency) and thus cause a lot of headaches and frustration for other use cases, while other virtualisation technologies allow up to as much as 8 GB, here we are stuck with 256 MB in 2023 with VirtualBox.

I really would just like for this intentional limit to be removed. It is unnecessary in my opinion for a software developer to make such a decision for its end users. How does it hurt the developer if the end users decides to increase the video memory?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: What is holding VirtualBox from providing more video memory?

Post by scottgus1 »

fred1 wrote: 24. Jul 2023, 15:33 You are forgetting that applications inside need video memory as well.
Fred, you're forgetting that fth0 pointed out there's two methods for assigning video memory, and a possible interpretation problem:
fth0 wrote: 10. Jul 2023, 21:18 (1) VirtualBox provides up to 256 MB of the host's RAM (not from the host's video memory) for the frames ....

(2) VirtualBox uses the host's video memory directly for everything else (e.g. the 3D objects).
fth0 wrote: 10. Jul 2023, 21:18 Now to the open question: When software is asking for the amount of video memory, does it ask the right question and VirtualBox is answering wrongly, or does it ask the wrong question, VirtualBox is answering rightly and the software misinterprets the answer?
We aren't the devs, we cannot make any decisions, and we're giving our best determined answers from the outside of the dev stack. Fth0, as immensely knowledgeable as he is, cannot increase Virtualbox's video RAM.

You have put in your ticket, let it be at that.

You'll have to face this question: "If Virtualbox cannot do what I need it to do, will I need to move on?" I personally could hope to run SolidWorks on a netbook, but it may not work well, and I may need to buy a workstation. You may want to run 3D printing software in Virtualbox, but if it won't run, you'll simply have to run it elsewhere. QED.

FWIW computers can be dual-booted, and any computer running Linux is capable of running Windows. So you have a built-in setup that can get your video-RAM-hungry Windows apps running on your PC, just not in the way you envisioned for now.
Post Reply