Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bernuli

macrumors 6502a
Original poster
Oct 10, 2011
713
404
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

Then,

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.
 

Rodan52

macrumors 6502
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.
 

Attachments

  • Screen Shot 2015-12-01 at 10.18.09.png
    Screen Shot 2015-12-01 at 10.18.09.png
    187.8 KB · Views: 254

bernuli

macrumors 6502a
Original poster
Oct 10, 2011
713
404
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.
 

Attachments

  • before safe.png
    before safe.png
    151.9 KB · Views: 248
  • after safe.png
    after safe.png
    161.6 KB · Views: 212

leman

macrumors Core
Oct 14, 2008
19,521
19,674
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.
 

BrianBaughn

macrumors G3
Feb 13, 2011
9,838
2,505
Baltimore, Maryland
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.

This is what I'm thinking. Safe Mode loads only "required" kernel extensions and some of those extensions might be related to memory management?
 

leman

macrumors Core
Oct 14, 2008
19,521
19,674
This is what I'm thinking. Safe Mode loads only "required" kernel extensions and some of those extensions might be related to memory management?

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.
 

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
Seems like memory is being wasted.

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.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,481
16,195
California
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.
 

bernuli

macrumors 6502a
Original poster
Oct 10, 2011
713
404
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.
 

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
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.
 

bernuli

macrumors 6502a
Original poster
Oct 10, 2011
713
404
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.
 
  • Like
Reactions: biziclop

pat500000

Suspended
Jun 3, 2015
8,523
7,515
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

Then,

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.
Is there a reason why you would run under safe mode?
 

bernuli

macrumors 6502a
Original poster
Oct 10, 2011
713
404
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.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.