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

grandM

macrumors 68000
Original poster
Oct 14, 2013
1,508
298
I really do not understand why macOS needs so many ram memory. On booting it required 3 GB or so. That's cool.

I ran Xcode and iOS Simulator. Both programs are shut down (force stop). And now macOS is using over 7 GB of ram. Why?

I took a screenshot as proof. I've also let activity monitor create a pdf.
 

Attachments

  • Activiteitenweergave2 (Alle processen).pdf
    1.8 MB · Views: 798
  • ram gebruik.jpg
    ram gebruik.jpg
    951.3 KB · Views: 253
Last edited:

jpeezy

macrumors regular
Feb 24, 2010
101
8
It's inactive or cache. Open terminal, type "sudo purge" without the quotes. FYI, unused memory is wasted memory.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,171
15,691
California
I really do not understand why macOS needs so many ram memory.

Mavericks pretty aggressively tries to use available memory to cache data and files for faster access. You are fine and this is normal. As long as that colored "memory pressure" line at the bottom is green, you have plenty of memory.

Give this article a look.
 

grandM

macrumors 68000
Original poster
Oct 14, 2013
1,508
298
Mavericks pretty aggressively tries to use available memory to cache data and files for faster access. You are fine and this is normal. As long as that colored "memory pressure" line at the bottom is green, you have plenty of memory.

Give this article a look.
Well I was just surfing the internet and I read a lot of people complaining. It's a bit strange to see 8 GB of ram chewed up while having nothing running. I do appreciate the purge idea but one can't sudo purge every hour. I had already noticed once that mavericks was using up 15,6 GB of the available 16 GB and it did concern me. Is there a way to force Mavericks not to use for example 2 GB for caching files? I have a hunge that this full ram running might splash into my face. On the other hand if macOS did it right it would indeed be no reason to worry at all. Swap is zero. Lol but seeing memory builds really concerns everyone learning to program...
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,171
15,691
California
Well I was just surfing the internet and I read a lot of people complaining. It's a bit strange to see 8 GB of ram chewed up while having nothing running. I do appreciate the purge idea but one can't sudo purge every hour. I had already noticed once that mavericks was using up 15,6 GB of the available 16 GB and it did concern me. Is there a way to force Mavericks not to use for example 2 GB for caching files? I have a hunge that this full ram running might splash into my face. On the other hand if macOS did it right it would indeed be no reason to worry at all. Swap is zero. Lol but seeing memory builds really concerns everyone learning to program...

I don't know of any way to restrict Mavericks fem doing this. It really is nothing to worry about. If that RAM is needed for another app, Mavs will free it up and reallocate.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,766
8,466
A sea of green
Well I was just surfing the internet and I read a lot of people complaining. It's a bit strange to see 8 GB of ram chewed up while having nothing running. I do appreciate the purge idea but one can't sudo purge every hour. I had already noticed once that mavericks was using up 15,6 GB of the available 16 GB and it did concern me. Is there a way to force Mavericks not to use for example 2 GB for caching files? I have a hunge that this full ram running might splash into my face. On the other hand if macOS did it right it would indeed be no reason to worry at all. Swap is zero. Lol but seeing memory builds really concerns everyone learning to program...

In your posted case, Xcode and iOS Simulator are still in RAM. The OS is keeping them cached. The cost for this is zero: the programs are already resident in RAM because they were being used. There are no requests that need the RAM they occupy, since there's still another 9 GB of unused RAM (you have 16 GB). Hence, there is no logical reason for the OS to simply abandon the cached data.

You also have 0 bytes of swap being used, and 0 bytes compressed (gecomprimeerd). So no paging has occurred, and there has been no demand to move any page out of RAM (the first demands will compress, further demands will swap). Swapping is the most detrimental to performance, but its effects are cumulative (small swap is not a big detriment).

The purpose of caching is to keep something available quickly, so it doesn't need to be retrieved from a slower source. If the OS abandons cached data simply to have free RAM, then there is no caching, and performance suffers. Here, there's still at least 9 GB of free RAM available for other processes before the OS has to uncache anything.

If you're a programmer, you should review the hierarchy of how virtual memory, caching, and swapping works. If you don't know what those are, look them up on Wikipedia.

In any case, read here for what Activity Monitor's "memory pressure" means:
http://support.apple.com/kb/HT5890
 

hiddenmarkov

macrumors 6502a
Mar 12, 2014
685
492
Japan
Is there a way to force Mavericks not to use for example 2 GB for caching files? I have a hunge that this full ram running might splash into my face. On the other hand if macOS did it right it would indeed be no reason to worry at all. Swap is zero. Lol but seeing memory builds really concerns everyone learning to program...


As mentioned caching and memory loading is by design. A common statement in IT (to include programming) is you can either pay the piper now, or pay the piper later. With caching and memory loading you get the payment out of the way upfront. Apple can't really win here so chose the lesser "evil". If no caching its reload every app start up. Which for most users is a greater evil. As most tend to fire up the same apps.


What you are looking if it exists may not be what you actually want. If you tweak you system to do this you won't be emulating what your client(s) will have. All later macs will have cache/memory pressure. they aren't running xcode granted. they are running office apps, chat/im, games, etc cached. Different paths, same destination really.



For your needs you would actually want to have test systems. Virtual or physical if you can. I do virtual's myself. Not saying you have to do this but as someone learning code myself I find vm's (I can't afford physicals myself) to be of great help. A fresh start mac os vm is nice baseline. Or linux ones I run as I do perl/python and look for portability. In terms of what you are looking for you get a much cleaner resource usage monitoring ability.
 

FreakinEurekan

macrumors 603
Sep 8, 2011
5,636
2,692
Well I was just surfing the internet and I read a lot of people complaining. It's a bit strange to see 8 GB of ram chewed up while having nothing running.

People like to complain. Weaselboy is exactly right, it's normal and nothing to be concerned with.

Keep-calm-and-carry-on-scan.jpg
 

bobr1952

macrumors 68020
Jan 21, 2008
2,040
39
Melbourne, FL
Well I was just surfing the internet and I read a lot of people complaining.

Mostly people who don't understand Maverick's memory management. Apple added memory pressure and color coded it so that users could easily see how stressed their memory usage is. And in your case, memory usage is very low.
 

maflynn

macrumors Haswell
May 3, 2009
73,566
43,547
Mostly people who don't understand Maverick's memory management. Apple added memory pressure and color coded it so that users could easily see how stressed their memory usage is. And in your case, memory usage is very low.

Agreed, free memory is wasted memory and Weasleboy is spot on as usual. OP, as long as the memory pressure in the activity monitor is not in the read you're ok.

If you're overly concerned reboot and that will reset everything.
 

grandM

macrumors 68000
Original poster
Oct 14, 2013
1,508
298
No it's alright
I understand what apple's up to
TX
 

maflynn

macrumors Haswell
May 3, 2009
73,566
43,547
No it's alright
I understand what apple's up to
TX

It is the complete opposite to how windows handles memory, so when you see free ram on windows take a dive you know you need to do something, but for OSX, free ram is wasted ram :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.