I have installed Ubuntu in VirtualBox under OS X on a MacBook Pro.
The laptop has 16 GB RAM, and I assigned about 11 GB to Ubuntu, because I thought that most work would be done in Ubuntu anyway.
But some said that I have to give OS X sufficient RAM, to maintain Host regular operations.
Is 5 GB too little for OS X?
I noticed that when the guest Ubuntu is running, waking up of OS X from sleep can take 30 secs or so. If OS X can have more RAM, will it wake up sooner?
Thanks.
How much RAM is recommended to be assigned to a virtual machine in VirtualBox?
-
michaln
- Oracle Corporation
- Posts: 2973
- Joined: 19. Dec 2007, 15:45
- Primary OS: MS Windows 7
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Any and all
- Contact:
Re: How much RAM is recommended to be assigned to a virtual machine in VirtualBox?
This is not a question that can be answered in a generic way. On 16 GB host, giving the VM more than 8 GB is probably not a good idea. Probably. It all depends on what you need to do on the host and what you need to do in the guest. And obviously it also depends on how many VMs you'll be running at the same time.
You won't get any specific recommendation beyond "try various settings and see what works best for you".
You won't get any specific recommendation beyond "try various settings and see what works best for you".
-
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: How much RAM is recommended to be assigned to a virtual machine in VirtualBox?
Giving the supermajority of host ram to a guest (or guests) is not necessarily a problem. I have run guests taking 28GB ram from my 32GB host with no problems. The "use only half" idea is probably to help newer users to not get into trouble quickly.
If your host is only going to be hosting guests and not doing much itself, you can probably use a memory tool to see how much memory the host takes just sitting there after bootup. Add a GB or two for a comfortable margin, and use the rest for guests, or one really big guest. If your host is going to do a lot, then load it up before starting a guest and see what it takes out of ram, then add the margin and use the rest for the guests. (Of course, a guest that doesn't do much isn't going to need tons of ram. XP can easily get by with a half-GB when just used for browsing and email, whereas a domain controller Server & Exchange email server guest may need a dozen GB or more.)
to quote MichalN:
If your host is only going to be hosting guests and not doing much itself, you can probably use a memory tool to see how much memory the host takes just sitting there after bootup. Add a GB or two for a comfortable margin, and use the rest for guests, or one really big guest. If your host is going to do a lot, then load it up before starting a guest and see what it takes out of ram, then add the margin and use the rest for the guests. (Of course, a guest that doesn't do much isn't going to need tons of ram. XP can easily get by with a half-GB when just used for browsing and email, whereas a domain controller Server & Exchange email server guest may need a dozen GB or more.)
to quote MichalN:
And fortunately it takes just tweaking the memory if you find that something gets sluggish.It all depends on what you need to do on the host and what you need to do in the guest.
-
socratis
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: How much RAM is recommended to be assigned to a virtual machine in VirtualBox?
+1
The "use half of your (available) RAM" I believe is an anachronistic term from the times that 2GB was the norm for the host. Yes, it could make sense at some point in time. Your thought on not putting the host on stress is the rule that I follow as well. Whatever that means depending on the occasion.
The "use half of your (available) RAM" I believe is an anachronistic term from the times that 2GB was the norm for the host. Yes, it could make sense at some point in time. Your thought on not putting the host on stress is the rule that I follow as well. Whatever that means depending on the occasion.
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.
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.
-
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: How much RAM is recommended to be assigned to a virtual machine in VirtualBox?
This is because there's an 11GB guest running and all that active memory must be stored to or pulled from disk to preserve the guest through the host sleep.tim12 wrote:I noticed that when the guest Ubuntu is running, waking up of OS X from sleep can take 30 secs or so.
-
Smackey's dad
- Posts: 128
- Joined: 2. Apr 2014, 04:11
- Primary OS: Ubuntu 12.04
- VBox Version: OSE Debian
- Guest OSses: Ubuntu Trusty
- Location: Austin, TX
- Contact:
Re: How much RAM is recommended to be assigned to a virtual machine in VirtualBox?
This is a fairly easy question. Allocate as much memory required by the Guest Operating System. I have multiple Ubuntu OS running under 512 MB of RAM for over a year. Ubuntu requires a minimum of 512 MB, but I run under that requirement and sometimes as low as 128 MB because it works. I had to disable automatic apt-updates (http://tech.snathan.org/tech/linux/apt_ ... e_overload) as they were a memory hog when those cron jobs ran. This question has nothing to do with Host/Guest/VirtualBox and everything to do with the Guest memory requirements without regard to the fact this is a VM.
-
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: How much RAM is recommended to be assigned to a virtual machine in VirtualBox?
Squeeze the host too much and it will have to start thrashing to the hard drive's page file, slowing host processes. At least the throughput of the hard drive will suffer, which may impede the guest if its virtual drive is on the same physical drive as the host OS.Smackey's Dad wrote:Allocate as much memory required by the Guest Operating System
It's all a balance, and involves testing, especially for production hosts.