I thought that I understood how MacOSX manages memory, but recently I’ve become baffled by its performance. Here is the situation:
Can anyone give me a clue as to why MacOSX does not release the inactive memory for the processes that need it, instead resorting to paging? Also, is there any proper way to influence the memory management by the system?
The only thing that has come to my mind is that the 32-bit kernel might be the limiting factor, although I’m not sure why. I know that you can boot MacOSX with a 64-bit kernel, but then I won’t be able to load a number of 32-bit Apps, so that’s not an option for me.
Inactive RAM. This is the amount that has recently been used but is no longer required. It may have been used by a recently quit process, or by an active one that no longer needs it, and is not required for use.
In the Activity Monitor app on your Mac, click Memory (or use the Touch Bar) to see the following in the bottom of the window: Memory Pressure: Graphically represents how efficiently your memory is serving your processing needs.
Definition of Inactive memory: The total amount of buffer or page cache memory that are free and available. This is memory that has not been recently utilized by any application for some time and can be reclaimed for other purposes by the paging algorithm.
Well, apparently the required workaround is to use the purge
command on MacOSX. This will clear the caches marking most of the inactive memory as free. It seems that the OS keeps as much inactive memory as possible in order to improve the responsiveness of the GUI, which unfortunately impacts the performance of some memory-intensive tools.
There is a thread with some extra information on a sister site.
I wonder whether MacOSX Server might be tuned to release more of the inactive memory for non-GUI processes…
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With