Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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
Question marked as Best reply

Posted on Sep 26, 2012 6:53 PM

Your screenshot shows nothing abnormal. Having a lot of inactive memory simply means that it's been used and released. If you're curious as to what was using it, you'll have to look at All Processes, not My Processes.

120 replies

Apr 29, 2013 1:55 AM in response to imclerran

I have had a similar problem with my MBP with 8GB RAM. At a point, I was monitoring 10MBs of free memory, and my computer was becoming almost dead. Once, I quit all applications except Activity Monitor, which was still showing 10Mbs of free RAM, then started quitting background apps like Dropbox, ClipMenu etc. And when I quit Chrono Sync, which is a backup utility, all the inactive memory was free again. 10Mbs, became 5.81 GBs.


Hopefully this wasn't a coincidence, and thanks to all the posts mentioning background running backup utilities.

May 15, 2013 5:15 AM in response to imclerran

I am based in the UK and have found that there appears to be a contention issue between Safari and the BBC iPlayer.


Once I have closed all applications, the amount of free memory does not recover and the only solution is to reboot.


I have a suspicion that Safari is the culprit here, though I am open to being corrected, so I have stopped using it.


I'm not certain how Activity Monitor will show which application is the culprit since in the BBC iPlayer I would expect data to be written to memory and then to disc, which it does, and for Safari to page files as well. The problem is that an application is not freeing memory once it has been used.


Any suggestions?

Jul 1, 2013 2:14 AM in response to imclerran

Lions consume RAM memory very badly.

Lions consume a lot more than Leopard. I tried Lion several times and every time the RAM consumption was extremely more larger than Leopard did. I have A1278 MacBook Pro (2.4 Inter Core 2 Duo, 4GB DDR3). With Lions I must continuously monitor how different apps consumes my memory. When all my memory is consumed the Mac slaw down badly. And it is very irritating especially when you know that you don't need to do it in Leopard.

The Leopard is brilliant with RAM consumption.

Eventually I deleted the Lions and installed the Leopard. I'm very disappointed with Lions.

Aug 11, 2013 9:51 AM in response to Zadude

It's nice to know that someone also suspects that Flash is the culprit. I'm absolutely sure that before upgrading to Lion I had no major issues with Flash. Then, after upgrading (unfortunately, my iMac is not on the "supported" list of hardware for Mountain Lion, so I'm stuck with Lion for now), I noticed that the super-fast Chrome now became a memory and CPU hog. Why? Because once in a while I do, indeed, run some Flash applications — aye, Facebook and YouTube (how can you avoid them these days?), but also others, even my usual short Flash game before going to sleep.


On one old MacBook I tend to use Safari instead of Chrome. But, to be honest, both are as bad in terms of performance. Once in a while, I use Firefox instead. There is no noticeable difference. The real difference between these three browsers is that Chrome spawns one process per tab, while Safari/Firefox spawn threads instead, but, as soon as anything with Flash is loaded, the slowdown is massive on any of those browsers.


Well, I was expecting that it was a Flash problem, and not a Mac OS X problem, so, eventually, after a few updates someone at Adobe would fix that. Apparently, the answer is "no". Since Adobe and Apple are not so good friends any more, it looks like Adobe delights in making Apple users suffer. And probably Apple is powerless to help them. Even Google, which provides its own Flash environment with Chrome, seems to be powerless as well. Whatever is wrong with Flash and Mac OS X persists, even after five minor upgrades (from 10.7.0 to 10.7.5), and who knows how many Flash upgrades.

Aug 15, 2013 1:01 PM in response to ArtVandeleh

I've been through a series of posts regarding the memory leaks in Moutain Lion and haven't found a solution to resolve the problem. I have to reboot my comupter (New iMac with 8GB of RAM) daily with a hard boot because Restart doesn't work. The Activity Monitor shows my free memory going down to 29MB or lower no matter what apps I use. It just keeps losing memory as apps are launched. I keep the Activity Monitor and Memory Clean in the Dock because I often don't have enough memory to open folders in the Finder. I routinely Clean Memory (about 20 times a day) but the next day, I still need to reboot my system —EVERY day!



ted


<Edited by Host>

Aug 21, 2013 2:38 PM in response to Tedfromhi

I had a problem with memory leaks for ages, and like many people I thought Mac OS X was the culprit. My free memory would gradually go down to near zero without me starting any programs at which point my Mac would become unresponsive until I either used the purge command or restarted.


However, I was reassured by a Q&A in MacUser magazine that the OS is not at fault, so I sat down today determined to find out what process was causing it. First, I'll say that it was Disk Drill and removing it cleared everything up, but I guess it could in theory be any other program that has been installed on your computer.


First I started in Safe mode (restart and hold down Shift as soon as you hear the startup chime). I switched on Activity Monitor and waited, and the free RAM stayed at about 1GB (of 6). So I could be reasonably sure it was something I had installed that was causing the problem. I took screenshots of the names of all the processes in Activity Monitor (first choose All Processes from the Show pop-up menu, then sort by name, then take as many screenshots as required (Cmd-Shift-4 for crosshairs and drag to create the screenshot).


Next I restarted with normal startup (no modifier keys held down) and opened Activity Monitor. NOTE: it may be better to skip this and go straight to the next paragraph because that could solve the problem quicker). I quit all other open applications including menu-bar apps by using Cmd-Q or left/right-clicking them in the menu bar and choosing Quit/Exit. I opened the screenshots I had taken in Preview. In Activity Monitor I went alphabetically down the list of All Processes, and when I found one that wasn't in my screenshots AND it was owned by me (whatever your username is will show as the user in the column next to the process name), I clicked it and choose Quit Process, and if that didn't work, I clicked it again and chose Force Quit process.


I then opened Console which is in Applications->Utilities. In the left-hand panel I chose 'All Messages' under 'System Log Queries'. I immediately noticed a huge number of errors repeating every few seconds. The errors were something to do with the cfbackd process, which was obviously crashing. I googled the process and discovered it was related to Disk Drill (I had the free version). I found out how to uninstall Disk Drill (you can't just delete the app because it needs to make changes to low-level parts of the OS, but it's very easy). You just open Disk Drill, go to Preferences, General, and Remove Disk Drill. You have to confirm, which was a little unresponsive but worked eventually. Since then, and without needing to restart, my Mac has been as good as new. I thought Disk Drill seemed like an excellent program, but I can live without it for now, and I'm sure the developers will fix the problem (although I haven't personally informed them).


I hope this helps some other people with this problem and reassures them that it is likely not to be Mac OS X that is at fault.

Aug 22, 2013 4:54 AM in response to Oxygeneralist

I have investigated what is running when the memory leak starts to get a hold and charted its progress in an effort to find the problem. I do not run Time Machine which potentially causes memory leak problems so that avenue is closed down.


This morning I opened the MacBook Pro, running OS X 10.7.5 with 2.4 GHz i5 and 8 GB of RAM, ran Safari, logged onto the WiFi network, opened Mail and the iTunes. After picking up my mail I refreshed my podcasts which completed successfully. I then noted that performance decreased rapidly and so checked what processes were running and then the Console to check for any errors.


State of the machine from Activity Monitor, the top two processes:

SystemUIServer Memory 5.3 GB CPU 20%-50%

Kernel_task Memory 0.5 GB CPU 20%


Memory usage as follows:

Free: 7.0 MB

Wired: 1.2 GB

Active: 4.5 GB

Inactive: 2.3 GB

Used: 7.99 GB


Vitual memeory used: 184 GB

Swap used: 23 GB

Page ins: 0.6 GB

Page outs: 17 GB


Disc read and write is continuous and 30 GB of disc space has been used in 15 minutes for the VM


Now from the Console I tracked the following:

22/08/2013 11:40:10.420 [0x0-0x45045].com.apple.iTunes: 2013-08-22 11:40:10.419 The plugin 'Quartz Composer Visualizer' failed to load because it has the wrong CPU architecture for this version of iTunes. (3585)


And from that point macx_swapcm and ps_select_segment are active, Emergency paging is switched on, failure to recover emergency paging and the machine is unusable.


The problem seems to lie with iTunes, as I have long expected, though no perhaps Flash player has a part in it when it is running.


I would not expect an OS to allow an Application to run, use all available RAM and then start swapping out to use the hard disc whilst failing to free Inactive memory.


Does Apple have any comments?

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 ID.