sjøgren

Q: 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

Close

Q: Mavericks and memory (Ram)

  • All replies
  • Helpful answers

first Previous Page 29 of 31 last Next
  • by GPap1981,

    GPap1981 GPap1981 May 9, 2014 11:27 AM in response to sjøgren
    Level 1 (4 points)
    Desktops
    May 9, 2014 11:27 AM in response to sjøgren

    Τhis my memory screenshot. Pressure is not high but memory usage is 15,99 GB from 16 GB !!! I have to worry about it ?

     

    Μνήμη.png

  • by Grant Lenahan,

    Grant Lenahan Grant Lenahan May 9, 2014 11:36 AM in response to GPap1981
    Level 4 (1,468 points)
    Mac OS X
    May 9, 2014 11:36 AM in response to GPap1981

    Totally normal. It will (almost) always use 100% of whatever you put in.

    Here's how memory works in 10.9-->

     

    About memory management in OSX 10.9 Mavericks

     

    Memory is managed differently, and more efficiently in 10.9.  It is (mostly) unique in the industry, but may become trend.

     

    Let’s start with the basics.  Mechanical disk drives are very slow, with access speeds in the 10s of milliseconds and transfer rates in the 200-400 Mbps range real world.  SSDs are much faster, on the order of a couple of ms access and typically 1200-3000 mbps transfer rates.  RAM is much faster than either, in the nanosecond access and transfer speeds of ~8 Gbps effective (1 GHz x 8 bits/byte).

     

    These are rough numbers for comparison purposes only.

     

    So the goal is to keep as much in RAM as possible. But if you run out of RAM what do you do?

    Traditionally you take the least used RAM and write it to a special part of the disk, in a way that you can access it most efficiently - minimizing the disk delays.  This is called a swap file because you swap RAM in and out of it.

     

    10.9 has a new trick:  it compresses RAM using the main processors.  Rather than swapping stuff to disk (disks are slow), it actually uses the processor to compress memory and make, for example, 1 GB of physical RAM hold as much as 1.5GB.  Similar approaches are used to make MP3 files 10x smaller than the real thing - there is redundancy in data and you can take advantage of that.  Apple is making the following calculation: the processors can compress way faster than the disk can swap.  And its also predicting that the processors are often partly idle - waiting for swap files or disk access.  So rather than swap files around, its compresses the files ***in RAM***.

     

    Compression works,.  Tests show that on average it is faster, and that 4GB (i have 4 GB RAM) acts like 5 1/2 - 6GB.  Wow.

     

    So, 10.9 will load up most of your RAM, knowing that it can compress some when it needs to.  So don’t worry too much that it may look like all your RAM is taken - yea, it is, but its OK.

     

    The measures to look at are:

     

    1. amount compressed. Compression means it has run out of RAM and needs more. As long as compression is low this is fine. In fact this is how 10.9 uses RAM more efficiently than 10.6,7 or 8.  Contrary to common wisdom, it requires LESS RAM than 10.8. The colored indicator tells you who this is going - green (good), yellow( iffy) and red (bad).

     

    2. amount swapped.  Once it cannot compress any further, or can’t do so efficiently, jot begins old-fashioned swapping.  This is a major slow-down and means you would benefit from more RAM. Tiny amounts are OK.

    here's an article by Apple - but on th pre-10.9 memory management techniques....mostly still true, but read on.

     

    http://support.apple.com/kb/HT1342?viewlocale=en_US

     

    Bottom line - compression makes 10.9 use RAM more efficiently than previous OSX versions.  It also makes the “ram used” indicator less meaningful, and mans you should monitor “compression” .

     

    That said, RAM has always been one of the most cost effective upgrades possible.  People spend too much on new machines and too little on more RAM.

     

    Hope this helps,

     

    Grant

  • by GPap1981,

    GPap1981 GPap1981 May 9, 2014 11:56 AM in response to Grant Lenahan
    Level 1 (4 points)
    Desktops
    May 9, 2014 11:56 AM in response to Grant Lenahan

    Thank you so much Grant, it's clear for me now !

  • by Drew Reece,

    Drew Reece Drew Reece May 9, 2014 2:54 PM in response to Grant Lenahan
    Level 5 (7,808 points)
    Notebooks
    May 9, 2014 2:54 PM in response to Grant Lenahan

    Grant Lenahan wrote:

    The colored indicator tells you who this is going - green (good), yellow( iffy) and red (bad).

     

    Nice explanation Grant, I feel compelled to explain the memory pressure graph colors…

     

    Green      = OK

    Yellow     = Compressing RAM in CPU

    Red         = Swapping RAM to disk

  • by MadMacs0,

    MadMacs0 MadMacs0 May 9, 2014 6:35 PM in response to Drew Reece
    Level 5 (4,801 points)
    May 9, 2014 6:35 PM in response to Drew Reece

    Drew Reece wrote:


    I feel compelled to explain the memory pressure graph colors…

     

    Green      = OK

    Yellow     = Compressing RAM in CPU

    Red         = Swapping RAM to disk

    I'm not doubting your explanation, just wondering why I haven't seen it before. Is there a reference?

  • by Csound1,

    Csound1 Csound1 May 10, 2014 4:50 AM in response to MadMacs0
    Level 9 (51,442 points)
    Desktops
    May 10, 2014 4:50 AM in response to MadMacs0
  • by MadMacs0,

    MadMacs0 MadMacs0 May 10, 2014 4:36 PM in response to Csound1
    Level 5 (4,801 points)
    May 10, 2014 4:36 PM in response to Csound1

    Tks. I've been looking in all the wrong places.

  • by Drew Reece,

    Drew Reece Drew Reece May 10, 2014 6:35 PM in response to MadMacs0
    Level 5 (7,808 points)
    Notebooks
    May 10, 2014 6:35 PM in response to MadMacs0

    MadMacs0 wrote:

     

    Drew Reece wrote:


    I feel compelled to explain the memory pressure graph colors…

     

    Green      = OK

    Yellow     = Compressing RAM in CPU

    Red         = Swapping RAM to disk

    I'm not doubting your explanation, just wondering why I haven't seen it before. Is there a reference?

    I think I gleaned this from running the memory_pressure command.

     

    Thanks Csound1, I had missed that too.

  • by BarbPhila,

    BarbPhila BarbPhila May 14, 2014 6:43 AM in response to MichelPM
    Level 1 (0 points)
    May 14, 2014 6:43 AM in response to MichelPM

    Maybe you can help me: I've never had problems gaming on Team Fortress 2 re lag/freezes until I installed Mavericks and now it happens all the time, every 10-15 secs. I have a late 2009 iMac with 8gbs of RAM and never had memory issues before. I only keep the TF2 app open when playing.  I've read about the Activity Monitor and now understand that what looked like the problem might be that the RAM was entirely being used, that is not the issue.  So what is?  I have reinstalled TF2 twice.  I try to read the console info but am an idiot and don't understand what the terms related to sandbox, steam causing excessive wakeups,  kernels, etc. do or mean. The code is written in code only computer masters can understand.  The ONLY thing different or new on my computer is MAVERICKS.

  • by MadMacs0,

    MadMacs0 MadMacs0 May 14, 2014 9:17 AM in response to BarbPhila
    Level 5 (4,801 points)
    May 14, 2014 9:17 AM in response to BarbPhila

    Please start a new discussion topic with a more appropriate title, describing your problem there and you'll draw much more appropriate attention to it. That's just the way this forum works best.

  • by Momomoesh,

    Momomoesh Momomoesh May 26, 2014 4:50 AM in response to Grant Lenahan
    Level 1 (8 points)
    Mac OS X
    May 26, 2014 4:50 AM in response to Grant Lenahan

    Thank you -- but that said, how come even when there is 0 bytes compression, 0 swap, memory pressure is green all the way across the square.  Just restarted.  Opened activity monitor and it showed 2.6G memory used.  After opening safari, looking for APple support and finding this thread, it now says 4.28 G memory used.  I have 8 g of memory.  Usually, after a day of typical use of applications - nothing fancy, just Safari, Word, mail, ical, itunes, maybe iphoto  - I can't open safari or other applications run VERY slowly.  I have no accurate data right now as I had to restart so that Safari could open.  I NEVER had this problem before and if my photos hadn't all been changed I would go back to the old OS.

    ANy suggestions would be welcome!

    THANKS

  • by jbg7474,

    jbg7474 jbg7474 May 26, 2014 6:06 AM in response to Momomoesh
    Level 1 (0 points)
    May 26, 2014 6:06 AM in response to Momomoesh

    Something to try, if your mac is older and running very slowly after the memory is filled, is turning off compression.  On my mid 2009 MBP, this has been the difference between unusable and perfect just like it used to be.  It can be undone, so there's no harm in trying.

     

    Instructions for turning off memory compression: http://superuser.com/questions/668114/disable-compressed-memory-in-mac-os-10-9-m avericks

     

    My theory is that the fast memory compression which makes it faster than disk swap relies on some kind of hardware speed up that does not work on some processors (or works very slowly).  Mavericks by default prefers to compress memory rather than release file cache.  So with memory compression on, if your memory compression is not fast, your memory will fill up pretty quickly and then you'll start to see significant beach balling when switching between running programs or opening new programs.  File cache will be large.  This behavior changes when you turn off compression: it will then prefer to release file cache rather than swap, so if your compression is slow, this will make a big difference once your memory is pretty close to being filled up.

  • by Csound1,

    Csound1 Csound1 May 26, 2014 6:31 AM in response to jbg7474
    Level 9 (51,442 points)
    Desktops
    May 26, 2014 6:31 AM in response to jbg7474

    jbg7474 wrote:

     

    Something to try, if your mac is older and running very slowly after the memory is filled, is turning off compression.  On my mid 2009 MBP, this has been the difference between unusable and perfect just like it used to be.

    And on my 2009 MBP Mavericks is very fast with compression off, and even faster with it on.

     

    My theory is that the fast memory compression which makes it faster than disk swap relies on some kind of hardware speed

    Other than an Intel 64 bit chip (which they all have) no.

  • by Momomoesh,

    Momomoesh Momomoesh May 26, 2014 6:40 AM in response to jbg7474
    Level 1 (8 points)
    Mac OS X
    May 26, 2014 6:40 AM in response to jbg7474

    2013 27 inch imac with 8 G Ram.  so it's not old....

    lots of photos but am getting ready to transfer iphoto library to an external HD.

  • by Grant Lenahan,

    Grant Lenahan Grant Lenahan May 26, 2014 7:14 AM in response to Csound1
    Level 4 (1,468 points)
    Mac OS X
    May 26, 2014 7:14 AM in response to Csound1

    Same here on 2009 MBP.

    Two machines.

     

     

    Grant

first Previous Page 29 of 31 last Next