Massive Mountain Lion memory leak

I will start describing the problem where I first discovered it.


My early 2011 MBP had been asleep, and upon opening and waking it, it was incredibly slow. I opened activity monitor and couldn't believe my eyes.


I have 8 GB of RAM, and all but 8 mb was in use. Around 6 GB was "inactive". I had no applications running besides Activity Monitor.


I opened terminal and ran the purge command After a short wait, total memory usage was back to around 2 GB. Then right before my eyes, over approximately 30 seconds, the "inactive" memory grew until once again, I had about 8 mb of RAM free. This fluctuated a few mb, but nothing significant.


After rebooting, I opened Activity monitor again, to watch ram usage. Usage increased to a little more than 2 GB. I then launched the App Store. Before putting my laptop to sleep earlier, I had been downloading a 10 GB update to Borderlands, but had paused the download, and quit the application before closing the laptop. I hit resume download, and went back to Activity Monitor. Memory usage seemed normal for several seconds, but shortly started increasing rapidly again. I imediately hit "pause download" in the App Store. But ram usage continued rising, so I quit the application. It kept rising, until my full 8 GB was in use.


At this point I took a screenshot:

User uploaded file


The only thing I have left to tell you is that before upgrading to ML, I had previously attempted to download the same update, but hadn't had time to download the full 10 GB, so had cancelled the update. That was in Lion 10.7.4, with 4 GB of RAM, and I had no issues.

MacBook Pro, OS X Mountain Lion (10.8.2)

Posted on Sep 26, 2012 6:17 PM

Reply
120 replies

Aug 22, 2013 12:34 PM in response to David Pr

You could try uninstalling iTunes by following these instructions: https://discussions.apple.com/thread/4569207?answerId=20625974022#20625974022


Then see if the unresponsiveness problem still occurs. Indeed, as has been pointed out elsewhere (and possibly here), a low amount of free RAM isn't a problem in Mac OS X as long as the machine is responsive, due to the system's use of inactive RAM when required. If the unresponsiveness still occurs, then it's not iTunes causing the problem. If it doesn't occur, you can try download a fresh install of iTunes from here: http://www.apple.com/uk/itunes/download/


Did you also try running iTunes while in Safe Mode? What happens?


If it still doesn't work after reinstalling I'm not sure I can help.


By the way, re your comment about Apple, this thread might help point you in the right direction.


https://discussions.apple.com/thread/3551533?start=0&tstart=0

Aug 23, 2013 2:42 AM in response to Oxygeneralist

From the data that I supplied that it can be seen that the OS keeps grabbing available RAM and then it does not use inactive RAM but rather uses the hard disc for virtual memory. This suggests an OS problem since an efficient operating system would swap out 'inactive' memory to the disc and replace this with the memory required by the current working resource.


The common factor in all of my memory leaks has been that iTunes has been started, podcasts downloaded and then iTunes closed. It would appear that as part of the iTunes closedown that a degree of iTunes database maintenance is completed and this could be the potential problem. But to confirm that an iTunes developer would need to comment.


In the past I have found that the OS has managed to grab nearly all of the disc space, the problem only surfacing when you try to swap to another application and response times are infinite. The only option then is a 'hard' rather than 'soft' reboot since closedown would prabably take a week or so. This also often leads to loss of data within open applications.

Sep 12, 2013 11:25 AM in response to imclerran

I don't know why many people keep saying that "inactive memory" is just normal. I also notice terrible slowdown after running some routine applications, such as chrome, keynote, etc, especially after some "sleep". I am sure that it's not a hardware problem, as after a reboot, everything runs so smoothly. Mountain lion should be carefully examined to identify some careless memory management design.

Sep 13, 2013 3:17 AM in response to dalibocai

I quite agree with your comments. There is a lack of understanding as to how memory is used within a computer and its operating system. As for virtual memory, well it is not enderstood at all. From my viewpoint the alarming speed with which the OS uses disc space for memory is very worrying indeed for applcation and battery performance.


Hibernation does seem to be a major problem deepnding on the applications being exected when hibernation starts.


This is a design problem within the OS that will, I hope, be addressed within the latest release of Mavericks. As an aside, from the pre-releae hype for Mavericks, Apple are addressing a number of known (well to them) memory problems.


So for me it is teach myself Cocoa, XCode, remember some UNIX and start to delve into the OS. Perhaps I should enlist the help of the Devil's Advocate?

Sep 13, 2013 6:55 AM in response to Csound1

All right. Inactive memory is not important. How do you explain the fact that so many people observe an obvious correlation between the increase of inactive memory and dramatically degraded performance? It's a design defect. Apple engineerers, please admit it and do something. We love MAC and we sincerely hope such serious problems can be solved timely.

Sep 13, 2013 6:57 AM in response to dalibocai

dalibocai wrote:


All right. Inactive memory is not important. How do you explain the fact that so many people observe an obvious correlation between the increase of inactive memory and dramatically degraded performance?


How do you explain the millions who do not?


It's a problem on your system, not OSX generally, when you accept that and start looking for the cause rather than assuming that it is a general problem that millions haven't noticed yet you may get somewhere!

Sep 13, 2013 7:03 AM in response to Csound1

Your way to address technical problems is fundamentally wrong. Say you developped a software, and millions of people use it. A tiny portion of users, say 5%, reported the software freezes their computer from time to time. Do you look into your software to check whether its design has problems or you blame the 5% by saying that the other 95% didn't complain at all? By the way, I have several friends, who encountered the same problem. But they don't want to waste their time by posting it on Apple forum or somewhere else. So the seemingly 5% can be actually 20% or more.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Massive Mountain Lion memory leak

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.