El Capitan memory usage increases AFTER safe mode

Discussion in 'OS X El Capitan (10.11)' started by bernuli, Nov 30, 2015.

  1. bernuli macrumors 6502a

    Oct 10, 2011
    Can't quite figure this one out.

    In OS X 10.11.1: after booting into safe mode, then rebooting normal, App Memory goes up permanently.

    Before safe mode:
    App Memory: 521.2 MB
    Wired Memory: 470.3 MB


    Boot into safe mode, all subsequent reboots yield:
    App Memory: 2.67 GB
    Wired Memory: 525.1 MB

    Also, in Activity Viewer, seems like all process jumped up 10 MBs, which could explain the App Memory going up, but I still can't figure out why.

    Doing a Command R and "reinstall of OS X" puts the memory usage back to what it was before booting into safe mode. That takes a while however and it seems like there should be an easier way to put the memory usage back to normal.

    With prior OS X versions, I used to boot into safe mode occasionally to clear out caches. This did fix the occasional problem. But now, I am scared of safe mode.
  2. Rodan52 macrumors regular


    Sep 21, 2013
    Melbourne, Australia and Bali, Indonesia
    I'm not sure what you are worried about as far as Memory goes. As you can see from my screen shot these levels are normal. Around 3Gb total useage is nothing to worry about. I don't understand why you would go to the trouble of reinstalling your OS unless you are experiencing major problems and so far you have not mentioned an actual problem.

    Attached Files:

  3. bernuli thread starter macrumors 6502a

    Oct 10, 2011
    I am concerned because the OS memory used more than triples after booting in safe mode. Goes from 1 gig used to around 3.36 used. That is without loading any applications. Seems like memory is being wasted.

    Attached Files:

  4. leman macrumors G3

    Oct 14, 2008
    The only problem I can see here are your misplaced expectations :) Memory management is a complex thing and I don't know how safe boot is affecting it. But your memory usage is very low and the memory pressure is a non-factor, so there is no reason to be even remotely concerned.
  5. BrianBaughn macrumors 603


    Feb 13, 2011
    Baltimore, Maryland
    This is what I'm thinking. Safe Mode loads only "required" kernel extensions and some of those extensions might be related to memory management?
  6. leman macrumors G3

    Oct 14, 2008
    I think that is quite unlikely. Memory management is done by the kernel itself, I am not aware of any mechanism by which extensions could plug into it. This would also result in a very low-performance kernel, as the increased level of abstraction brings a significant performance overhead.
  7. h9826790 macrumors G5


    Apr 3, 2014
    Hong Kong
    It should be the other way around. Idle RAM is wasting RAM, but not the working RAM. You pay for them to work, but not idle.

    It should be "before safe mode, 10.11.1 allow 7G of RAM sitting at there and doing nothing, but after safe mode, only 5G of RAM is wasting"

    Ideally, the system will always use all your RAM, even at idle. The OS can use the RAM to accelerate, and release them to the application on demand.

    Anyway, for a 8G RAM system, it's completely normal for 10.11.1 to use about 4G right after booting. As the other said, memory management is very complicated. If your Mac only has 2G of RAM, then maybe it will only use around 1G after boot. In my case, I have 32G RAM, the system will use up 8G straight away right after boot. That's also completely normal.

    As long as the memory pressure is green (under stress), then it's nothing to worry about.
  8. Weaselboy Moderator


    Staff Member

    Jan 23, 2005
    The only thing I can think of is a safe mode boot deletes all the system cache, so the first time you reboot into regular mode after that the OS has to do a little work to rebuild all those cache files and that might chew up some memory.

    But I'm with the others here... you don't have a problem. If memory pressure is in the green like h9826790 said, just ignore this.
  9. bernuli thread starter macrumors 6502a

    Oct 10, 2011
    I had a feeling all I would get is the Jedi Mind Trick. 2 GB of ram went missing after safe boot. Internet Recovery put it back (reinstall from USB stick did not).

    I understand unused memory is wasted, but with a gigantic email spool, a bunch of big PDFs open and a VM with Win 7, I would like the RAM to be used appropriately.

    I'll go look for some other droids.
  10. h9826790 macrumors G5


    Apr 3, 2014
    Hong Kong
    I am pretty sure that the system will release the RAM for your apps / VMs when they need it. It's the way how modern OS manage memory.
  11. bernuli thread starter macrumors 6502a

    Oct 10, 2011
    Incase anyone is wondering, I was able to restore 10.11.1 clean boot memory usage using:

    sudo update_dyld_shared_cache -force

    I am not an expert here, and I DO NOt recommend you do this yourself. If you have a machine with more RAM than you need, this might not actually help at all, especially if your boot drive is NOT on an SSD.

    Safest way to fix the problem, if you even think it is a problem, is reinstall from Internet Recovery.
  12. pat500000 Suspended


    Jun 3, 2015
    Is there a reason why you would run under safe mode?
  13. bernuli, Dec 3, 2015
    Last edited: Dec 3, 2015

    bernuli thread starter macrumors 6502a

    Oct 10, 2011
    Actually, with my specific problem, I could run the dyld command without -force. In my case, after safe mode, dyld_shared_cache_x86_64 was not being recreated. Only the .map version of the file was present.

    So all you need to do is:

    sudo update_dyld_shared_cache

    That that rebuilds /private/var/db/dyld/dyld_shared_cache_x86_64

    This will absolutely free up memory. I tried it on a system with only 2GB of RAM installed. That machine ran out of ram and started paging/compressing pretty quick if dyld_shared_cache_x86_64 is missing.

    If your machine has lots of RAM installed, it might be faster to run without rebuilding dyld_shared_cache_x86_64 as that info will I think be cached in RAM instead of disk. But who needs it? The only performance difference I have seen is running out of RAM early.
  14. biziclop macrumors newbie

    Jan 16, 2012
    Dear bernuli, a really f***ing huge thanks to you! (And shame on  :mad:!)

Share This Page

13 November 30, 2015