Why does it seem like Snow Leopard has such poor memory managemenet?

Discussion in 'macOS' started by rellik75, Oct 19, 2010.

  1. rellik75 macrumors newbie

    Joined:
    Nov 2, 2007
    #1
    Hi everyone…

    I'm running a new 2.8 Quad Mac Pro with 16GB RAM. I recently swapped out one of the new 27" I7 IMacs (also with 16GB RAM) for this machine as I wanted to be able to easily add my own SSD boot drive. I do a lot of virtual machine work and java programming and notice that regardless of the machine/processor, Mac OS just simply does an amazing job of eating memory, but not a very good job of releasing it. For the one day that I had to run the system with the stock 3GB of RAM, it seemed like the OS was much better at "sipping" the memory that it needed. With 16GB, it behaves like me at a pizza buffet (unhinge jaw and swallow whole)! I've watched my memory go all the way down to 11MB available while I had 13GB inactive and it was paging like crazy. Why does the OS do this? I thought the Mac OS was supposed to be great at memory management, but it actually seems worse than windows??? If I've got 13GB of RAM sitting in inactive state, shouldn't it be getting used instead of the system writing to a page file?

    Is there anything I can do to force Mac OS to manage memory better?

    Thanks!
     
  2. sweet160 macrumors regular

    sweet160

    Joined:
    Oct 2, 2006
    Location:
    Ecuador
  3. xi mezmerize ix macrumors 6502a

    xi mezmerize ix

    Joined:
    May 24, 2010
    Location:
    Maryland, USA
  4. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #4
    Don't worry about your page out count. Page ins, on the other hand, SHOULD concern you. A general rule of thumb for Mac OS X is: If your page ins are 1/4 or more of your page outs, then you need more RAM.
     
  5. rellik75 thread starter macrumors newbie

    Joined:
    Nov 2, 2007
    #5
    So looking at my memory right now, I've got 5.66GB used, 10.34GB Free, 2.04GB Inactive, and 97,301 Page Ins. Why would I have so many Page Ins if I've still got over 10GB free????
     
  6. soLoredd macrumors 6502a

    Joined:
    Mar 12, 2007
    Location:
    California
    #6
    I'm sorry but I think you're mistaken. Page Outs indicate the need for more RAM. If your Page Outs are 0 then it's something else - which I'm confident it is.

    Apologies to the OP, I do not have any help for you other than to make sure you are running in 64-bit mode. Hopefully someone smarter than I can get your answer.
     
  7. lewis82 macrumors 68000

    lewis82

    Joined:
    Aug 26, 2009
    Location:
    Totalitarian Republic of Northlandia
    #7
    You're right, it's the page outs that are an indicator of a lack of ram.

    For example, I have 2.54 GB available, 93 305 page ins and 0 page outs.

    You can also see if you need more by looking at the size of the swap file (in my case, 0 KB).
     
  8. brijazz macrumors 6502

    brijazz

    Joined:
    Jul 31, 2008
    #8
    Does it matter when you should check in on your memory usage? I'm at 2 days, 12:52 of uptime right now, and Activity Monitor is telling me the following:

    Free: 76.2MB
    Wired: 786.0MB
    Active: 2.13GB
    Inactive: 931.4MB
    Used: 3.80GB
    VM size: 226.6GB
    Page ins: 1.64GB
    Page outs: 238.3MB
    Swap used: 492.8MB

    The previous poster (lewis82) indicates that he has zero page outs and a 0KB swap. Should I be looking into upgrading more RAM?
     
  9. lewis82 macrumors 68000

    lewis82

    Joined:
    Aug 26, 2009
    Location:
    Totalitarian Republic of Northlandia
    #9
    Depends on what you do with it. I had Photoshop open (small image, ~ 3000 * 3000), iTunes and Firefox. Nothing huge here. And I turn off my MBP when I don't use it, so the RAM is cleared each time I use it.
     
  10. brijazz macrumors 6502

    brijazz

    Joined:
    Jul 31, 2008
    #10
    Typical usage: iTunes, Safari, Movist, Handbrake (to encode x264), Transmission, MS Office

    I've got 4GB of RAM on a current i5 MacBook Pro; should I be seeing page outs/large swap file at all? Would more RAM give me a noticeable jump in performance?
     
  11. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #11
    Its possible that it takes OSX more work to manage larger amounts of memory, i.e., once you go beyond the "golden amount" you reach a point of diminishing returns. That is you get more overhead, but little to no benefit from the increased ram.

    I have 6gb of ram on my hackintosh, and I find that to be a good amount, my Mac Mini has 2gb and to be honest that's a little low even for what i use it for, Children's software, surfing office apps.
     
  12. chrono1081 macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #12
    There is no problem here. Its behaving as it should. Inactive ram is essentially free ram. Of course the system is going to keep stuff in inactive ram to give you a faster user experience. It can launch what it needs from ram memory, only removing it if you end up needing more ram for something.
     
  13. lewis82 macrumors 68000

    lewis82

    Joined:
    Aug 26, 2009
    Location:
    Totalitarian Republic of Northlandia
    #13
    Well Handbrake is pretty CPU/RAM intensive. You can check how much RAM it uses in the Activity Monitor, or in Terminal with the top command (just type "top" without quotes).

    Having more RAM would probably be faster in your case, since the computer wouldn't be bottlenecked by the hard drive.
     
  14. czeluff macrumors 6502

    Joined:
    Oct 23, 2006
    #14
    Here's a quick answer to how it all works, when comparing Mac OSX to Windows XP (maybe the newer versions) in terms of memory management.

    Windows understands two different states of memory: used, and free.

    OSX has multiple, but we'll focus on the big 3: Free, Active, Inactive.

    Let's say you open open Firefox on Windows. 25mb (or whatever number) of free ram is now 'used' ram. if you close Firefox, the 25mb of 'used' converts to 'free'. Open Firefox again, and it has to bring back the entire 25mb into memory.

    On OSX, it is MUCH smarter: Open Firefox on Mac, 25mb of 'free' is now 'active'. Close Firefox, and the 25mb are now 'inactive' (assuming you have plenty of memory to spare). This is quite smart, because when you open up Firefox AGAIN, the program is still residing in memory!

    This helps to explain why Macs are slow when they first boot up, and get faster the more you use them. The algorithms are figuring out which applications you use the most. The first time you open Photoshop, it takes AWHILE. Close it down and open it again; it's much faster. It will continue to be faster if you use it frequently.

    Basically the way it works is, unless the operating system has some NEED to move Inactive memory to Free (if it needs to reallocate the memory for other tasks), then it'll remove the programs you haven't ran for awhile.
     
  15. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #15
    It's also possible it doesn't. How much do you understand of the internal workings of the operating system?
     
  16. Dr McKay macrumors 68040

    Dr McKay

    Joined:
    Aug 11, 2010
    Location:
    Kirkland
    #16
    Contrary to popular belief that everything about Windows is vastly inferior to OS X, memory management in Windows, especially newer versions is rather good.
     

Share This Page