Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Discussions related to using VirtualBox on Mac OS X hosts.
nannou9
Posts: 7
Joined: 2. Jan 2016, 22:05

Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by nannou9 »

Hello!

Few days ago i have noticed my mac mini started to be very hot and not much responsible.
When i have connected, i have noticed that 3 virtual machines I am using are taking about 8-9GB of RAM each.
The problem is, that each of them was equally assigned with just 3GB (3022MB to be more precise).
I've restarted everything, uninstalled VB with uninstall script, installed again, started VMs and again after 2 days, they were taking about 4-5GB each.

This looks like a memory leak.
Machines inside were ok.

Please note that I am using snapshots, so they are always running on top of last snapshot.

Where to start debugging?

Thanks for answer
Peter
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: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by socratis »

nannou9 wrote:Where to start debugging?
By showing solid proof of the memory occupied by your VMs. A screenshot or text output (preferred) of "top" or ActivityMonitor would be enough to begin with. Then post the exact details of each and every VM (see Minimum information needed for assistance), along with details of your host including exact model and OSX version. Then we'll see where we get from there.
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.
nannou9
Posts: 7
Joined: 2. Jan 2016, 22:05

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by nannou9 »

This is what I have now: machine configured with 3022MB of RAM takes 3.87GB already after about day and half.
It should get worse and worse now. Tomorrow it should be about 4.5 - 5GB from my observation.
I have 3 machines running at this point of time.
2 of them 3022MB RAM and one 2048 of ram.

Previously after about a week, machines reached about 8-9GB each.
Tomorrow I will repost the progress.

Thanks for helping for now.
Screen Shot 2016-01-04 at 19.08.40.jpg
Screen Shot 2016-01-04 at 19.08.40.jpg (115.44 KiB) Viewed 6661 times
nannou9
Posts: 7
Joined: 2. Jan 2016, 22:05

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by nannou9 »

Because of some reason, it is not that massive as before and growing more slowly, but still happening.
My VM is currently consuming 4.37GB, while it was given with 3022MB only.
Screen Shot 2016-01-07 at 06.39.51.jpg
Screen Shot 2016-01-07 at 06.39.51.jpg (101.13 KiB) Viewed 6625 times
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by loukingjr »

Personally, I think all you are seeing is a demonstration of how OS X memory management works.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
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: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by socratis »

Exactly what Lou said. I did quite a bit of reading on this and what I've found is that although there are quite a few posts for a variety of programs, people always come up with "memory leak" when in fact most (if not all) of the times it is the memory management of the OS that is responsible for the ballooning memory. And it's not just OSX, most of them do it. Most of the times it can be attributed to cache management.
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.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by loukingjr »

Still not enough info here but a few things to note. Apparently nannou9 is trying to run 3 3GB guests simultaneously 24/7 which is more than half the available RAM, plus who knows how many cores are assigned to each guest. It's not much of a surprise his Mac mini gets hot and unresponsive.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
nannou9
Posts: 7
Joined: 2. Jan 2016, 22:05

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by nannou9 »

Each machine provided with 2vcpus out of 16 available.
Running on 16GB RAM with i7 CPU (I7-3720QM).

I have noticed that this is actually happening only if window is minimised, which I doubt indeed would be caused by VirtualBox itself.
I agree it might be related with strange Mac OS X memory management.

Anyway now it shows it uses 6GB:
Screen Shot 2016-01-08 at 21.38.55.jpg
Screen Shot 2016-01-08 at 21.38.55.jpg (67.75 KiB) Viewed 6596 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by Perryg »

Each machine provided with 2vcpus out of 16 available.
Running on 16GB RAM with i7 CPU (I7-3720QM).
http://ark.intel.com/products/64891/Int ... o-3_60-GHz

Even if you were running two processors you would only have 8 cores ( which is what VirtualBox really uses ). You would have to have 4 processors of this type to actually have 16.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by loukingjr »

cores.png
cores.png (35.4 KiB) Viewed 6590 times
I've mentioned this before and I still think it's a problem. When setting the number of vCPUs for a guest on a 4 core/8 thread CPU, the slider indicates you can assign up to 8 vCPUs before you reach the red area and VirtualBox gives you an "Invalid settings detected" message. Which btw once you reach 9 vCPUs, says "More virtual CPUs are assigned to the virtual machine than the number of physical CPUs on the host system". Which actually would have been once you exceeded 4.

Since VirtualBox only cares about actual cores, it would make more sense to have the slider indicate the actual number of cores rather than 4 times the number of cores, or worse case, the number of threads, not 2 times the number of threads.

IMNSHO of course. :D
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
nannou9
Posts: 7
Joined: 2. Jan 2016, 22:05

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by nannou9 »

What i don't get, is why we suddenly started to talk about vCPUs as this thread was rather about memory leak.
Is there a dependency? Did I missed something?
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by loukingjr »

We started talking about vCPUS because there is no memory leak and we were looking for an explanation of your problem.
Still not enough info here but a few things to note. Apparently nannou9 is trying to run 3 3GB guests simultaneously 24/7 which is more than half the available RAM, plus who knows how many cores are assigned to each guest. It's not much of a surprise his Mac mini gets hot and unresponsive.
If you'd rather we didn't that's ok with me.
Last edited by loukingjr on 10. Jan 2016, 13:21, edited 1 time in total.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by mpack »

nannou9 wrote:What i don't get, is why we suddenly started to talk about vCPUs as this thread was rather about memory leak.
You raised the subject in your last post - you claimed that there was 16 vCPUs available, someone corrected that statement.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by loukingjr »

oh sure, now I'm just a "someone" :lol:
speaking of 16 vCPUs,
Filed a Bugtracker ticket https://www.virtualbox.org/ticket/15018
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Post by mpack »

Actually, you were not the "someone" I had in mind, I was thinking of Perry but didn't think the "who" was important.
Post Reply