[Invalid] Vitualbox very limited memory consumption (#17642)

This is for discussing general topics about how to use VirtualBox.
Mahdi.G
Posts: 7
Joined: 27. Mar 2018, 14:25

[Invalid] Vitualbox very limited memory consumption (#17642)

Post by Mahdi.G »


[ModEdit; related ticket: #17642: Guest OS very limited memory]
It appears that it happens only to east distributed laptops.
my case: ubuntu guest on windows host despite allocating and available 1GB free memory. Virtualbox uses only 74mb which has caused a slow emulation and lots of hdd activity.
Last edited by socratis on 11. May 2018, 00:26, edited 3 times in total.
Reason: Marked as [Invalid].
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Guest OS very limited memory

Post by mpack »

That makes no sense I'm afraid. Windows PCs everywhere in the world work the same way, and VirtualBox will allocate whatever RAM or disk space you tell it to allocate, provided of course that the appropriate amount of unused RAM and disk space is available on your host PC - VirtualBox will typically error out if that isn't the case.

VMs cannot run from simulated RAM, they need actual physical host RAM dedicated for the VM to use. The whole idea of a VM is to make use of excess hardware capacity, not to over-allocate limited capacity.

A typical example might be a Windows 7 64bit host PC with 4GB RAM and 2 cores: the host OS probably uses half the RAM, leaving 2GB for everything else. You dont want to starve everything else, so you would only allocate around 1GB to a VM, and 1 core.

If you look at the VM log then very near the top there will be a line like this-

Code: Select all

00:00:03.305526 Host RAM: 32688MB (31.9GB) total, 29495MB (28.8GB) available
Notice the "available RAM" figure on the right. This is from a very recent desktop PC, I assume on an older laptop the reported figure will be much lower. But in any case, don't allocate more than 50%-75% of available RAM to a VM, less if you keep lots of other memory hungry apps running.
Mahdi.G
Posts: 7
Joined: 27. Mar 2018, 14:25

Re: Guest OS very limited memory

Post by Mahdi.G »

I mean 1 Gb free physical memory
This problem also has reported by other user. Certainly your knowledge is more than me but I can tell you that your answer there was wrong:
topic: Very low memory consumption on Host
mpack wrote:
The actual memory for the VM selected in system settings will be allocated by VBoxSVC.exe I would think,
Attachments
VBox.log
(121.48 KiB) Downloaded 25 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Guest OS very limited memory

Post by mpack »

I'm not sure I see the relevance of that quote. Here's a more relevant one.
VBox.log wrote: 00:00:06.725991 Host RAM: 8075MB (7.8GB) total, 1128MB available
...
00:00:07.535501 RamSize <integer> = 0x0000000040000000 (1 073 741 824, 1 024 MB)
00:00:07.535777 VRamSize <integer> = 0x0000000001000000 (16 777 216, 16 MB)
As I suspected, you are overcommitting RAM. I said that ideally you should not allocate more than 50%-75% of available RAM, in reality you are allocating 92% of available RAM and that just for the first two items on the list. You should either reduce the RAM allocated to the VM (to something like 512MB), and/or close some applications on the host.

Btw, 16MB is not enough graphics RAM, so you'll probably need to increase that to around 48MB.

Other tips :-
  1. I see that you've only allocated 10GB capacity to the virtual hard drive, and about half of that is eventually going to be used by Ubuntu as a swap partition, so that leaves only ~5GB for the OS and all apps. Quite probably the drive will be congested. The drive needs to be around 32GB, and avoid everything other than dynamically allocated VDI.
  2. You haven't actually installed Ubuntu, you seem to be running from the CD, I guess in live CD mode. CD drives are not fast, even virtual ones.
  3. The Guest Additions you have installed are not genuine, they come from the Ubuntu fork of VirtualBox - note that we do not support forks here. There is no guarantee that the fork GAs will work with any version of genuine VirtualBox.
  4. You have not yet installed the extension pack on the host. That mainly means that guests cannot use USB2 or USB3, host webcam or PXE boot.
Mahdi.G
Posts: 7
Joined: 27. Mar 2018, 14:25

Re: Vitualbox very limited memory consumption

Post by Mahdi.G »

I ran it from hdd but still same problem and closed other programs (4gb free) still same. (also replaced preinstalled windows with generic one although installation media was created on preinstalled OS, but I agree with you, I do not think oem os is the one to blame)
Mahdi63
Posts: 14
Joined: 14. May 2017, 10:06

Re: Vitualbox very limited memory consumption

Post by Mahdi63 »

Did you removed post about rewarding the answer. Why?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Vitualbox very limited memory consumption

Post by mpack »

Happened too long ago, so I don't remember. I don't even recall if it was myself who deleted it. Basically, if a message violates the forum rules then it may be deleted. Conducting business using these forums would be against the rules.
Mahdi63
Posts: 14
Joined: 14. May 2017, 10:06

Re: Vitualbox very limited memory consumption

Post by Mahdi63 »

It appears that VM allocated memory is reduced from host memory but I cannot found any process on host that using it
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Vitualbox very limited memory consumption

Post by socratis »

The memory is most certainly allocated. What you see is the result of what's called "lazy memory allocation". If a specific memory page is *not* accessed by the guest, then the memory isn't necessarily allocated in the host.

If you want to see all the memory allocated at the launch of the VM, then enter the following command:
  • VBoxManage setextradata "<YourVMname>" VBoxInternal/RamPreAlloc 1
Then look at your Task Manager under the Performance tab, Memory.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Mahdi.G
Posts: 7
Joined: 27. Mar 2018, 14:25

Re: Vitualbox very limited memory consumption (#17642)

Post by Mahdi.G »

I ran that command, and rerun VM, you can see what is going on in screenshot
Attachments
Capture.jpg
Capture.jpg (95.59 KiB) Viewed 5536 times
Last edited by Mahdi.G on 22. Apr 2018, 19:48, edited 1 time in total.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Vitualbox very limited memory consumption (#17642)

Post by socratis »

Mahdi.G wrote:you can see what is going on in screenshot
No, I can't, because that's not where I told you to be looking at:
socratis wrote:Then look at your Task Manager under the Performance tab, Memory.
You're looking at the Processes tab, not the Performance tab. Select that tab and click on the Memory graph to get a better view. Then launch your VM. See what the graph looks like...

BTW, please edit your message and attach the image locally in your response (see the "Upload attachment" tab below the reply form). Not a lot of people will go to 3rd party sites.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Mahdi.G
Posts: 7
Joined: 27. Mar 2018, 14:25

Re: Vitualbox very limited memory consumption (#17642)

Post by Mahdi.G »

Before.PNG
Before.PNG (15.58 KiB) Viewed 5536 times
After.PNG
After.PNG (8.95 KiB) Viewed 5536 times
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Vitualbox very limited memory consumption (#17642)

Post by socratis »

[quote]              Used      Avail.
Before:       5.3 GB    2.5 GB
After:        6.8 GB    1.1 GB
Difference:   1.5 GB    1.4 GB[/quote]
So, I see that there was a little more than 1.4-1.5 GB allocated after you started the VM. Which sounds about right, given the amount of RAM and VRAM that you allocated to your guest, and the overhead that VirtualBox itself needs. So everything looks as it should.

Do you see the memory being allocated now?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Mahdi63
Posts: 14
Joined: 14. May 2017, 10:06

Re: Vitualbox very limited memory consumption (#17642)

Post by Mahdi63 »

The problem is that I cannot found any process on host that using it (including virtualbox.exe)
and about lazy allocation this amount is reduced and not usable by any process for example I can see that firefox or chrome on host ram usage would became limited
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Vitualbox very limited memory consumption (#17642)

Post by socratis »

Mahdi63 wrote:The problem is that I cannot found any process on host that using it
Then I'm afraid it's a problem between you and your OS. The whole thread started because you didn't believe that VirtualBox was allocating the memory and that VirtualBox was lying to you. We've proved, and you've seen it with your own eyes in your own system, that the memory is indeed allocated. So, I'd consider this a "Case closed".

If you want to dig in deeper in your system, I would suggest to try "Process Explorer" from SysInternals (now Microsoft). I would actually suggest that you download the whole SysInternals suite, each and every program in that suite is a must-have tool (that's why Microsoft bought them).
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply