Reason behind the 256MB vram limit

Here you can provide suggestions on how to improve the product, website, etc.

Reason behind the 256MB vram limit

Postby thebunnyrules » 10. Jan 2017, 21:44

Hi guys,

I was trying to understand why there is a 256mb to the VRAM slider in this day and age of 4-12GB GPUs. I know there are threads about this topic already but they are quite ancient (2007-2011). Cards back then had VRAM of around 500-1500mb and 256mb made sense in that context and in the context of the software being run virtually. It absolutely does not make sense today.

Is there some technical limitation that's stopping you from giving us more or is it a decision that was made by vBox devs because you felt 256mb is enough.

I was thinking of taking the source code and recompiling it with a higher VRAM slider. Nothing crazy, just like 512mb. Would it be as simple as modifying some variables?
thebunnyrules
 
Posts: 4
Joined: 24. Apr 2015, 06:15

Re: Reason behind the 256MB vram limit

Postby Martin » 10. Jan 2017, 22:35

The virtual graphics card has nothing to do with the VRAM of a physical GPU.
You could probably change the limit in the code but you would need to check if/how the implemenation of the virtual graphics card can handle this.
Martin
Volunteer
 
Posts: 2076
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Linux, OS/2

Re: Reason behind the 256MB vram limit

Postby Perryg » 10. Jan 2017, 22:48

Doable? Sure but you have to consider the hit. Nothing is free you know and the actual code is not just in one place. Several rings and the like. Not all that easy.
Perryg
Site Moderator
 
Posts: 34372
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Reason behind the 256MB vram limit

Postby socratis » 10. Jan 2017, 22:56

  • The amount of RAM in your GPU is meaningless, since VirtualBox (nor any other virtualization software that I know of) uses the GPU memory, or the GPU (at all) directly.
  • The existing threads might be old, but nothing has changed in the basic logic behind that decision.
  • 256MB for a 10-year-old-or-more-featurewise, basic, low level, virtual GPU seems more than enough. If your latest game complains about not enough memory, even if you change that to a gazillion GB, it will next complain about the next advanced feature that is missing, being DirectX#.# or OpenGL#.#. The devs try to prevent you from shooting yourself in the foot.
  • If you're still inclined to shoot yourself in the foot, the "gun" is there. Close VirtualBox and shut down all its VMs of course, look for the VBox file of the VM that you're interested, edit it with a text editor, find the setting:

      <Display VRAMSize="256" accelerate3D="true" accelerate2DVideo="true"/>
    and modify it at will. Just do not change the settings in the GUI. Any settings...

EDIT: Scratch that. That strike-through advice fails to launch the VM with a run-time error:
VRamSize is too large, 0x20000000, max 0x10000000 (VERR_INVALID_PARAMETER).
So, max is 256MB. They really want to prevent you from shooting yourself in the foot after all...
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 19292
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Reason behind the 256MB vram limit

Postby Perryg » 10. Jan 2017, 23:27

Like I said you would have to dance through the source. I looked at it several years ago and decided it was not worth the effort since it really would not change anything important other than just the reporting size. Not to mention the cost to the rest of the code. Other things started to suffer greatly.
Perryg
Site Moderator
 
Posts: 34372
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Reason behind the 256MB vram limit

Postby socratis » 10. Jan 2017, 23:43

I know Perry. It's not worth it. And I haven't even looked at the source... ;)

Funny thing? Win7 and Win10 report the vRAM as 384 MB even if the vRAM allocated is 256 MB! I was using these two right now, that's why I checked really quickly. I do remember that no matter what, the reported vRAM on an OSX guest is 5 MB. Software works in mysterious, unknown ways...

Actually you'd have to check the source to find out... ;)
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 19292
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Reason behind the 256MB vram limit

Postby thebunnyrules » 11. Jan 2017, 02:39

Fair enough guys, seems like a lot more trouble than it's worth.

I'm a little confused as to Martin's statement "the virtual graphics card has nothing to do with the VRAM of a physical GPU"? Doesn't the virtual machine set aside an amount of resources from your physical system? Like RAM or CPU threads etc. Am I misunderstanding the way it works?

Socratis, I'm not really after running games on a virtual machine, half my games run on Linux and I have a copy of 7 and 10 for those that don't. What does that whole bit about not shooting myself in the foot mean?
thebunnyrules
 
Posts: 4
Joined: 24. Apr 2015, 06:15

Re: Reason behind the 256MB vram limit

Postby socratis » 11. Jan 2017, 03:17

Martin said it (the virtual graphics card has nothing to do with the VRAM of a physical GPU), I said it (VirtualBox uses the GPU memory) and in that sentence I also said "nor any other virtualization software that I know of", but I'll stick to VirtualBox.

VirtualBox doesn't use the GPU. Not directly. It has no access to the GPU's memory. What you see as graphics RAM in your VM is actually plain, normal RAM from the host, not from your GPU.

As for the "game", that was an example. Any graphics intensive application will have the same requirements as a game, be it CAD or heavy duty graphics applications. Why else would you want more than 256 MB of vRAM?

Shooting yourself in the foot means doing something bad to yourself, like allocating GB or vRAM that can't be used, just because you have a heavy duty GPU.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 19292
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Reason behind the 256MB vram limit

Postby mpack » 11. Jan 2017, 11:54

thebunnyrules wrote:I was trying to understand why there is a 256mb to the VRAM slider in this day and age of 4-12GB GPUs.

Because the machine is virtual, and has 0 GPUs. You understand that hardware inside a virtual machine is simulated, right? How would you go about simulating a GPU? And to what end?

VirtualBox can't simulate a GPU, but it can act like a remote terminal and pass all 3D stuff to the host GPU. But in that case it's the host GPU which needs the video RAM, not the guest.

In any case: even on its own merits the point makes little sense. GPU RAM is independant of the PC, so it can't be allocated by any PC application.
mpack
Site Moderator
 
Posts: 27714
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Asign more video memory to guest OS

Postby luxian » 28. Jan 2017, 17:18

Hi peoples,

I permit myself to reopen this case because the subject begin really to be more and more important in my eyes. In 2009, it was not so important for the evolution of VBox
Do you know how to ask to the VirtualBox coders to change the VRAMSize limit from 256 to 1024 or 2048 Mo please ?
sincerely, our videocard begin to grow up in memory and our machines are heavier and heavier.
Personnaly, I've got a 4K screen resolution and a 4 Go ram video card, and my Vbox guest need to employe a screen in 4K too now. But I bet that I'm not the one in this situation. My Linux guest is slowing down only because of this : when I reduce the size of the screen, it go faster and is more responsive ... when I take a screen size larger than 1280x1024 ... around FullHD 1920x1080, that's become terrible and I must forget to use the whole of the 3840x2160 screen resolution.

Code: Select all   Expand viewCollapse view
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyvm "admlho01" --vram 512
VBoxManage.exe: error: Invalid VRAM size: 512 MB (must be in range [0, 256] MB)
VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "COMSETTER(VRAMSize)(ValueUnion.u32)" at line 611 of file VBoxManageModifyVM.cpp

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyvm "mymachine" --vram 256

C:\Program Files\Oracle\VirtualBox>


Our machines have more and more memories (my laptop has actually 64 (6 4 ) Go RAM and 4 Go Videoram .... and it's just a laptop). VBox will gail a lot to manage better the big amount of capacities.


I bet (hope) it's (only) a fixed value in the code to change and someone can take this for a minor update, that will be a little copy/past for him but the cool guy who will do this will help a lot the whole humanity ...
luxian
 
Posts: 1
Joined: 28. Jan 2017, 17:09

Re: Reason behind the 256MB vram limit

Postby mpack » 28. Jan 2017, 17:38

No, I don't see any point in reopening this case, because I know from experience (this is not the first such topic), that nobody ever reads the past responses, all they do is make new questions or assertions based on a misunderstandings of VMs. I'm locking this.
mpack
Site Moderator
 
Posts: 27714
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Reason behind the 256MB vram limit

Postby socratis » 28. Jan 2017, 17:39

  1. I moved your post from an 8-year old thread to something more recent, instead of locking the thread right out. You should consider changing your search criteria to include results that are more recent than the South Africa World Cup of 2010.

  2. Please use your Calculator:
    3840 W × 2160 H × 32 bits/pixel (or 4 bytes/pixel) = 33177600 bytes = 31.640625 MB
    So your 256 MB limit is more than enough to fill 8 4K screens, or 4 4K screens if you use double buffering or 2 4K screens if you use quadruple buffering. AKA, memory is not the issue.

  3. VirtualBox couldn't care less whether you have 2GB of VRAM in your GPU or 8 bytes of VRAM. Because it uses none. Not a single bit in fact. It's all RAM, not VRAM.

  4. The coders have been asked, the coders have answered, the people that understand the basics understood.

  5. Please read the thread from the beginning for more conclusions.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 19292
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 11 guests