1

I have an old MacBook Pro 2012/2013 and it has the El Capitan

Through the Utilities -> Activity Monitor tool I can get the following stats according the following behavior:

For example if the Mac is just started the Kernel Task has 500MB and Memory Ram has 2.0 GB, if I just open Firefox the two components increase (how is expected) lets say to 750MB and 2.5GB respectively. If I close Firefox (Cmd + Q), I would expect that the values return to 500MB and 2.0GB respectively. Well it does not happen how is expected, for example: the Kernel Task returns to 650MB (and not to 500MB) and the Memory Ram returns to 2.2GB (and not 2.0GB).

I have this behavior with other programs apart of Firefox.

Is there a command where I can free in general all the kernel task and memory ram? At least to the best acceptable minimum values according to the OS itself after to execute the command.

The goal is after to execute some "heavy" software development tools and servers (therefore when they have just been closed), release the best amount of resources of these two components.

  • 2
    RAM use is not like water in a bottle. MacOS is designed to use AS MUCH Ram as possible, not as little. Application data may be cached after quitting. However, if you need more memory for "heavy" tools, then cached RAM will be released, if possible. – benwiggy Nov 5 '19 at 17:51
  • I understand your point and I am agree about MacOS consumes a lot of ram, so all is about cached RAM? and exists the mentioned command? – Manuel Jordan Nov 5 '19 at 17:53
  • I think you need to explain what problem you have. Are the heavy apps performing poorly? – benwiggy Nov 5 '19 at 19:50
  • No, after to close the heavy programs (let's says, IDE, Databases, Message Queuing etc) ... the machine should be return to be fast how as when was just turned on – Manuel Jordan Nov 5 '19 at 22:11
  • 2
    @ManuelJordan It automatically returns to that state. There's nothing you need to do. – jksoegaard Nov 5 '19 at 23:06
4

There's no ordinary system command for that purpose - simply because it is not what you would normally want.

The memory used here will help the performance of your system by caching data that might be needed later. If it is not needed later, because you need to load something different in RAM, the caches will be released automatically.

However, you can simulate such a command by simply making a small program that allocates progressively larger amounts of memory until you have cleared up all caches. There's no real point in doing so however as it won't help your system run faster, or be able to run more programs or anything like that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .