You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mavericks and memory (Ram)

Hi


Anyone else noticed how Mavericks uses memory ?

I have a new Macbook Air 2013 with 4GB of memory and after a short wile.

The system have used 3.99GB of the total 4GB 😟 Isn't that a big problem. Thats can't be right.

I would think that the computer would suffer greatly after a short time of use and the computer

needs to be restarted. If thats true. The new Mavericks ***** big time on Computers with less

memory. Or is there something i don't know.


Thanks

Posted on Oct 23, 2013 8:07 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 23, 2013 8:11 AM

Mavericks uses memory smarter than previous OS's, not necessarily less memory. Look at the swap memory if that is high then you have a problem. Also, if the mac is still running fast then there isn't a problem.

460 replies

Nov 12, 2013 4:55 PM in response to Drew Reece

I won't pretend to know a lot about OS X or Windows or Linux and I use all three but either my Linux install nor my Windows install use more then 2gb RAM. I don't run CS or RAM intensive programs but I do use K3b to burn ISO's and I use a DVD program to make AVI into playable DVD's and neither program uses more then 3gb RAM. I made a DVD with Mavericks. Closed my browsers and other programs and ended up using over 20mg of SWAP.


Members have said that unused RAM is wasted RAM. I've never heard that before. On idle my Linux box is around 400mg RAM. My Macbook is over 2gb RAM. Windows 8 on a 4gb machine sits idle at around 1gb RAM. I've never dug into my SWAP on any Linux box, ever and that includes using KDE which is a known memory hog.

Nov 12, 2013 5:11 PM in response to ConfusedbyLinux

You are right about Swap, it is the slowest part of memory management.


The other OS's are effectivley not using all the available resources. RAM is the fastest way to get data to the CPU. In 10.9 the OS tries to predict what you will use & keep those items in RAM.


Heres a simple test…

Launch a large app like MS Word or iMovie, time the duration until it is 'usable'.

Quit it

Relaunch it whilst timing it

Quit it again

Relaunch it again whilst timing it

Repeat some more


The 2nd & 3rd times should all be less, but the virtual memory VM should have increased.

The same is true of files, it will cache the data in RAM if possible, if you don't use that data & it needs more RAM, it will remove it or compress it (compression is faster than Swap).


The OS is speeding up tasks by keeping the data on the fastest part of the system.


Here is a good article on 10.9's RAM compression.

http://arstechnica.com/apple/2013/10/os-x-10-9/17/#compressed-memory


Would you like to see your RAM under heavy load? I can explain a simple test with a built in command if you are interested.

Nov 12, 2013 5:41 PM in response to ConfusedbyLinux

Try this it's safe & shows what Activity Monitor looks like when the RAM is full…



Reboot to see the system in it's default state.

Open TextEdit for the sake of it 🙂


Open Activity Monitor & Terminal from /Applications/Utilities.

Select the Memory tab


In Terminal enter the following command

memory_pressure -l critical

# note that is a lowercase L


RAM usage will climb, compression will begin, the Virtual Memory will become way more than the system has installed.


Eventually the system will start swapping (look for RED) - Watch the 'memory pressure' & 'Swap used' as this happens.

Try switching to TextEdit - the system is still coping!

Switch back to Terminal & hit ctrl+c to stop the process.


Watch the VM & memory pressure return to normal levels.

Nov 12, 2013 9:00 PM in response to Barney-15E

@Barney 15-E


I don't think so, Barney. I cross checked the output of vm_stat and calculated memory using both Performance Probe and the new version of Activity Monitor. The fact that the memory now has compression is an added feature, but memory is still memory. In the "old" Activity Monitor as well as Performance Probe, "usable" memory, being that which is not active, wired, or inactive is considered "available."


For reference, here's the output of vm_stat for Lion:


Mach Virtual Memory Statistics: (page size of 4096 bytes)

Pages free: 405042

Pages active: 169964

Pages inactive: 54487

Pages speculative: 229512

Pages wired down: 123799

"Translation faults": 1022938

Pages copy-on-write: 91965

Pages zero filled: 488033

Pages reactivated: 40

Pageins: 65868.

Pageouts: 0.

Object cache: 16 hits of 93754 lookups (0% hit rate)


Now here's the vm_stat output for Mavericks:


Mach Virtual Memory Statistics: (page size of 4096 bytes)

Pages free: 233038.

Pages active: 445461.

Pages inactive: 73503.

Pages speculative: 99858.

Pages throttled: 0.

Pages wired down: 130687.

Pages purgeable: 14950.

"Translation faults": 17798429.

Pages copy-on-write: 608105.

Pages zero filled: 12321795.

Pages reactivated: 214.

Pages purged: 53945.

File-backed pages: 234207.

Anonymous pages: 384615.

Pages stored in compressor: 101.

Pages occupied by compressor: 99.

Decompressions: 2.

Compressions: 103.

Pageins: 184363.

Pageouts: 0.

Swapins: 0.

Swapouts: 0.


You'll notice a lot of stuff added the the "new" vm_stat, with a lot of it doing with memory compression.


Compressed memory is an application that would have, in previous versions of the OS, been swapped out to disk, but now, what the OS does is compress it in memory because it's faster, and then if memory demands rise, then it swaps it to disk. Free pages are still free pages, inactive pages are still inactive pages, wired pages are still wired, etc. etc.


I think the reason people are getting scared by what the new Activity Monitor is reporting is simple. The old formula for "usable" or "free" memory was this:


[Total System Memory] - [[Free Pages + Speculative Pages] * 4096] = [Used Memory]


The "new" formula is:


[Total System Memory] - [[Free Pages] * 4096] = [Used Memory]


4096 is of course the page size, and the calculations above are for bytes. Keep in mind that all versions of Activity Monitor and Performance Probe report in "formal" GB and MB, meaning 1GB is equal to 1,073,741,824 bytes and 1MB is equal to 1,048,576.


The term "Memory Used" in the new version of Activity Monitor is probably misleading. Inactive memory is actually available to applications, as are speculative pages. If they weren't available, the OS essentially wouldn't be able to launch anything other than itself and one or two applications before it started swapping and compressing/decompressing memory. A better term that they should have used would have been soemething like "Referenced Memory". Likewise with Performance Probe, the term "Swap Used" is misleading because that's the size of the swap file allocated when the OS starts, but that doesn't necessarily mean anything is in it.


People using the "new" Activity Monitor should probably not pay attention to the "Memory Used" entry and instead focus on the "App Memory" and "Wired Memory" entries because they more formally tell someone what's being used by the system. They can then use the compression diagram to see if they're overloading the system. With compressed memory being essentially memory associated with an application that's still in memory that's less active and hence "swappable and compressible" it will be identified as used memory, and since Performance Probe calculates free memory based on free and speculative blocks, what it's reporting should be correct as well. The fact is the two applications are reporting on pages that the two share in common, they just report on different things.

Nov 13, 2013 4:19 AM in response to Caio Ferrari BR

Caio Ferrari BR wrote:


The thing is there is a lot of peolpe loving the new system. But others are hating... I just don't know what is happening

I have an inkling it’s two different things that worry unsatisfied Mavericks users:


There’s those experiencing slowdowns of their system. Could very well be there is some old kernel extension or the like that’s causing this, seeing one here could free his system by erasing old system extensions, but could also be there’s a bug in 10.9 on some systems with 4 G of RAM.

On the other side there’s those that are worried because their system seems to eat up the entire memory. This seems to be only a misinterpretation of their memory graph beacuse Apple has introduced a disk cache for better peripheral performance which is dumped instantaneously once an application needs more RAM. One has to re-learn to read the OS’ memory graph in this case, that’s all. Activity Monitor’s memory page gives insight: One has to subtract the file cache from used memory to cacluclate the correct amount of free RAM: While this memory shows up as used (because it *is* used for disk cacing), it is released once it is needed. It’s not a bug; it’s a feature.

Nov 14, 2013 2:49 AM in response to UliB

I'm not really sure that memory calculation is right. I'll look into it, but the way the new Activity Monitor reports memory, IMHO, tends to scare people.


Now, for those interested, if you want to have some fun and you're on a risk free system, try the following trick to unload the mds (Meta Data Server, as in Spotlight...and a host of other apps) process:


  1. Open up Terminal.app under the utiltiies section
  2. Enter the following command:


sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist


(that's one line, not two, FWIW...site formatting may make it look like 2 lines depending on your font size)


What this does is kill and eliminate the mds server process. On my test system this is freeing up hundreds of megabytes of memory. All of a sudden, Mavericks looks like a "tight" OS!


I wouldn't recommend doing this for any extended period of time. mds is used by a lot of Apple apps to find stuff. Aside from Spotlight, Mail is probably the second biggest client, and other apps use it as well. I have no idea what the long term consequences of killing it are, but if you need memory and you can deal without for a short period of time, it might be worth a shot.


To re-enable mds, do the following:


  1. Open up Terminal.app under the utiltiies section
  2. Enter the following command:


sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist


(that's one line, not two, FWIW...site formatting may make it look like 2 lines, depending on your font size etc.)


This will re-enable mds. Unless someone can give some compelling reason to leave mds off, and maybe someone will, I'd tend to favor leaving it on, even though it's obviously a memory wart hog.


I'm doing all my Mavericks work and tests on an old FireWire clunker external drive (one w/400Mb/sec interface) because being an initial OS release I'm not willing to commit to it yet. I have yet to see an initial release of any software package from anyone be bug free. My own opinion about Mavericks is that it's clearly faster than ML. In this configuration it's load times for apps are approaching seem (and I'd like to emphasize the word "seem") to be loading almost as fast as they do when I boot from ML...and that's using a Fusion Drive.


I really don't use Spotlight that much, and in fact I could live completely without out and not really feel I was missing something. Anyone out there running with mds disabled and having a problem free life?

Nov 15, 2013 7:57 AM in response to sjøgren

Apple, was soll das bitte !?!?!? Ich kann nicht mehgr arbeiten ! Ich habe 8 GB Ram und das System swapped wie verrückt. Die Festplatte steht nicht still. Wie lange soll das mit einem Fix noch dauern !!! MAIL kann ich gar nicht mehr öffnen, weil sich dann nichts mehr tut ! Ich muss an meine eMails, das ist wichtig !


Apple what is this ?!?!? I cannot work anymore! my macpro has 8 GB Ram and the system sis swapping all the time ! The hard disk does not stand still. I need a fix for that ! that feeld like Windows behaviour !! I cannot open MAIL at all because nothing happens!!


User uploaded file

Nov 15, 2013 8:20 AM in response to Drew Reece

User uploaded file


Hardware Information:


Mac Pro (Early 2008)


Mac Pro - model: MacPro3,1


1 2.8 GHz Quad-Core Intel Xeon CPU: 4 cores


8 GB RAM




Video Information:


NVIDIA GeForce 8800 GT - VRAM: 512 MB




Audio Plug-ins:


BluetoothAudioPlugIn: Version: 1.0


AirPlay: Version: 1.9


AppleAVBAudio: Version: 2.0.0


iSightAudio: Version: 7.7.3





System Software:


OS X 10.9 (13A603) - Uptime: 11 days 1:0:25




Disk Information:


SAMSUNG HD204UI disk1 : (2 TB)


EFI (disk1s1) <not mounted>: 209,7 MB


Videoschnitt HD (disk1s2) /Volumes/Videoschnitt HD: 1,07 TB (618,3 GB free)


Mountain Lion HD (disk1s3) /: 925,33 GB (242,86 GB free)


Recovery HD (disk1s4) <not mounted>: 650 MB




SAMSUNG HD204UI disk0 : (2 TB)


EFI (disk0s1) <not mounted>: 209,7 MB


Harddisk3 (disk0s2) /Volumes/Harddisk3: 2 TB (790,46 GB free)




SAMSUNG HD103SJ disk3 : (1 TB)


EFI (disk3s1) <not mounted>: 209,7 MB


Backup (disk3s2) /Volumes/Backup: 815 GB (89,53 GB free)


BOOTCAMP (disk3s3) /Volumes/BOOTCAMP: 184,86 GB (24,4 GB free)




SAMSUNG HD753LJ disk2 : (750,16 GB)


EFI (disk2s1) <not mounted>: 209,7 MB


Harddisk2 (disk2s2) /Volumes/Harddisk2: 598,2 GB (366,34 GB free)


FOTOS (disk2s3) /Volumes/FOTOS: 151,48 GB (16,72 GB free)




HL-DT-ST BDDVDRW CH08LS10




USB Information:


Generic Ultra Fast Media Reader




Apple, Inc. Keyboard Hub


MLK Trust Mouse




Apple, Inc Apple Keyboard










Apple Inc. Bluetooth USB Host Controller




FireWire Information:




Thunderbolt Information:




Kernel Extensions:


at.obdev.nke.LittleSnitch (4052)


com.tuxera.filesystems.tufsfs.fusefs_txantfs (2012.4.17)


com.sophos.kext.sav (8.0.14)




Problem System Launch Daemons:


[failed] com.apple.installd.plist


[failed] com.apple.softwareupdated.plist


[failed] com.apple.wdhelper.plist




Problem System Launch Agents:




Launch Daemons:


[loaded] at.obdev.littlesnitchd.plist


[loaded] com.cocoatech.pathfinder.SMFHelper7.plist


[loaded] com.crashplan.engine.plist


[failed] com.google.keystone.daemon.plist


[loaded] com.sophos.autoupdate.plist


[loaded] com.sophos.intercheck.plist


[loaded] com.sophos.notification.plist


[loaded] org.macosforge.xquartz.privileged_startx.plist




Launch Agents:


[loaded] at.obdev.LittleSnitchUIAgent.plist


[loaded] com.gopro.stereomodestatus.plist


[loaded] com.sophos.uiserver.plist


[not loaded] com.teamviewer.teamviewer.plist


[not loaded] com.teamviewer.teamviewer_desktop.plist


[loaded] org.macosforge.xquartz.startx.plist




User Launch Agents:


[loaded] com.crashplan.javacheck.plist


[loaded] com.spotify.webhelper.plist


[loaded] com.valvesoftware.steamclean.plist




User Login Items:


uHD-Agent


iTunesHelper


ChronoSyncBackgrounder


Alfred


Dropbox


HazelHelper


KiesAgent


Android File Transfer Agent


CrashPlan menu bar


fuspredownloader




3rd Party Preference Panes:


Cineform


Flash Player


Hazel


Java


Perian


ProCutX Server


Tuxera NTFS




Internet Plug-ins:


Default Browser.plugin


Flash Player.plugin


FlashPlayer-10.6.plugin


JavaAppletPlugin.plugin


QuickTime Plugin.plugin


Unity Web Player.plugin




User Internet Plug-ins:


Google Earth Web Plug-in.plugin




Bad Fonts:


None




Time Machine:


Time Machine not configured!




Top Processes by CPU:


27% com.apple.MailServiceAgent


13% firefox


5% WindowServer


1% MenuTab Pro for Facebook


1% com.apple.internetaccounts


1% Little Snitch Agent


1% EtreCheck


0% Little Snitch Network Monitor


0% ChronoSyncBackgrounder


0% SophosUIServer




Top Processes by Memory:


562 MB com.apple.internetaccounts


541 MB com.apple.MailServiceAgent


172 MB Preview


147 MB firefox


66 MB MenuTab Pro for Facebook


46 MB Airmail


41 MB WindowServer


33 MB Finder


31 MB com.apple.WebKit.WebContent


25 MB mds_stores




Virtual Memory Statistics:


15 MB Free RAM


985 MB Active RAM


982 MB Inactive RAM


1.22 GB Wired RAM


11.51 GB Page-ins


1.20 GB Page-outs

Nov 15, 2013 8:40 AM in response to berndfrombremen

The memory list doesn't show what is using all that memory. However all the PID's are very high (65000), suggesting processes are respawning after dying. Look in /Applications/Utilities/Console.app for jobs that are "throttling" in the messages.


There is a simple test to see if software from 3rd parties might be the issue. Boot into 'Safe mode' (hold shift after the chime until the spinning 'cog' appears). Ensure the login window says 'safe mode'.

https://support.apple.com/kb/HT1455


It will disable all third party extensions & startup items.

If the Mac is better in safe mode it is time to look at the third party items. Test as much as you can to see if the memory will do the same as a normal boot. Be aware that some features will be disabled like wifi on some models, graphics drivers will be in a reduced mode - this is normal in safe mode. Reboot to go back to normal.



Some immediate thoughts…

Are these up to date?

Kernel Extensions:

at.obdev.nke.LittleSnitch (4052)

com.tuxera.filesystems.tufsfs.fusefs_txantfs (2012.4.17)

com.sophos.kext.sav (8.0.14)


You have 3 failed Apple jobs

Problem System Launch Daemons:

[failed] com.apple.installd.plist

[failed] com.apple.softwareupdated.plist

[failed] com.apple.wdhelper.plist


Something is causing those to fail & that could be where all the memory is going - safe mode will indicate if it is the system or if it is a third party tool etc.


Is Sophos up to date (isn't version 9 the latest)? How about all the other login items & system level jobs that run in the background?

Nov 15, 2013 8:50 AM in response to sjøgren

While I respect the replies from some of the tech experts about RAM use on Mavericks because they know a lot more then I do. The ideal is that OS X isn't supposed to require a lot of extra effort and terminal commands,etc. I never used SAWP with Lion or ML. Now I do. I'm not doing anything different. I mentioned using Linux and Windows 8. Both run faster then Mavericks on systems with similar specs and my Linux box never uses SWAP. Not a real complaint as it was free and doesn't appear to be a wide spread problem but it is a bit vexing.

Nov 15, 2013 9:00 AM in response to ConfusedbyLinux

Yes you are right the OS shouldn't use all that swap shown in berndfrombremen's post.



Use safe mode & etrecheck (as explained above) to see if the RAM swaps when all the third party software & extensions are disabled.


Etrechek will allow us to see what may be running - old kernel extensions & startupitems can load old code into the OS. That can wreak havoc with performance.

Mavericks and memory (Ram)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.