Page 1 of 2

Massive memory leak VB 5.10/5.12 MAC OS X 10.11.2

Posted: 2. Jan 2016, 22:10
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

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

Posted: 2. Jan 2016, 22:43
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.

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

Posted: 4. Jan 2016, 21:17
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 6662 times

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

Posted: 7. Jan 2016, 08:43
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 6626 times

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

Posted: 7. Jan 2016, 09:03
by loukingjr
Personally, I think all you are seeing is a demonstration of how OS X memory management works.

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

Posted: 7. Jan 2016, 10:07
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.

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

Posted: 7. Jan 2016, 16:28
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.

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

Posted: 8. Jan 2016, 23:46
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 6597 times

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

Posted: 9. Jan 2016, 00:01
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.

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

Posted: 9. Jan 2016, 01:01
by loukingjr
cores.png
cores.png (35.4 KiB) Viewed 6591 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

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

Posted: 10. Jan 2016, 13:16
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?

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

Posted: 10. Jan 2016, 13:20
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.

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

Posted: 10. Jan 2016, 13:20
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.

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

Posted: 10. Jan 2016, 13:24
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

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

Posted: 10. Jan 2016, 17:59
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.