Why is OS X memory management so terrible?

Discussion in 'MacBook Pro' started by Mac (*.*)- PC, Sep 21, 2011.

  1. Mac (*.*)- PC macrumors member

    Mar 1, 2008
    So I recently upgraded from the stock 4GB in my 2011 MPB to 8GB of RAM, and at this point, it just seems like a waste of money. After leaving my computer on for about 2 days, nearly all my memory has been moved to either active or inactive memory, with very little actually "wired" or "free". In fact, I have over 2 gigs of the wired and nearly 3 gigs of free. Many of you may say this is a good thing. OSX is optimizing my system by putting as much data into inactive memory as possible so it will be available on demand.

    The problem though, is that the OS fails to release that memory for other programs. If I launch a game (world of warcraft for example), it runs agonizingly slowly because the OS doesn't release the needed memory. I have to physically kill off processes such as Firefox, iTunes, Mail to free up this memory, which completely defeats the purpose of having more RAM in the first place.



    You can see the OS clears up about 50MB of RAM for the application. But it's still RAM starved. It need at least another 150MB of RAM to run smoothly, and the OS simply doesn't clear up this memory.

    I've been running a windows machine for the past 2 years with 4GB of RAM, and even running all these programs and games, I would still have at least 1.5GB of free RAM, and the OS was never slow at all. Everything about it was probably just as fast as OSX most of the time, and it did so with 6GB less RAM.

    Whats the issue here???
  2. grahamnp macrumors 6502a

    Jun 4, 2008
    Inactive memory is memory that's allowed to be released, if it isn't it's because memory isn't needed. Your page outs are low and you are barely using your swap space so I don't think you are actually running out of memory.

    Side note: uTorrent is using quite a bit of CPU, not sure what yours is doing but mine uses up to 10% when idle. It's quite annoying and doesn't seem necessary.
  3. roxxette macrumors 68000


    Aug 9, 2011
    Im new to the MAC world but ive done some reading , my first mac was a base mbp 2011 and like you i upgrade to 8gb myself after apperently seeing 4gb wasnt enough (coming from PC always looking at taskMang. :p ) now like i say i did some reading and it seems os x just feed apps with as much ram available if you think about it its there for a resong :eek: to be used and to tell you the truth i never got problems even when ram was maxed out ; i now gave my mbp to my wife couple of weeks ago and bough myself a mba base 11 and with only 2gb of ram with safari open , itunes , adium and parallels in coherence mode the little thing stay strong and never lags yet all ram is used so i wouldnt worry to much about it , like other people have say the RAM is there to be used and i think the OS does a pretty good job at maintance it :apple:

    Ps. Sorry for my english :eek:
  4. bigjobby, Sep 21, 2011
    Last edited: Sep 21, 2011

    bigjobby macrumors 65816

    Apr 7, 2010
    London, UK
    This and killing some of your other apps like iTunes, FF, Chrome, Airfoil. These cumulatively are sucking up ~32% of your CPU. Slap in WoW into the equation doesn't leave much available capacity for your CPU.
  5. Quinoky macrumors regular


    Sep 18, 2011
    Groningen, Netherlands
    Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5)

    Where in WoW are you when this occurs? And do you have an SSD or an HDD? I ask this because logging in to SW on a normal HDD causes a lot of lag and in some cases, even D/C.
  6. Bernard SG macrumors 65816

    Bernard SG

    Jul 3, 2010
    As others mentioned, it appears to be more of a CPU-load issue than RAM.
  7. Lone Deranger macrumors 68000

    Lone Deranger

    Apr 23, 2006
    Tokyo, Japan
    You think OSX is bad? Try running Linux. You always have to keep an eye out to not maximize your physical Ram limits. Because if you do, the system becomes virtually unusable to the point where you can’t even move the mouse pointer interactively anymore. The system becomes too slow to give you a fighting chance to save your work, effectively limiting you to either force quit the applications, or to simply power down. Rubbish.

    OSX’s memory management is pretty darn good.
  8. Wingzero macrumors member

    Jun 28, 2011
    RAM managment is fine, you have 3.4GB's page in and 4MB's page out.

    Can somebody point out the problem here ?

    Your inactive RAM is full of programs you use regularly that are stored there for faster access.

    Free RAM is wasted useless RAM.
  9. snaky69 macrumors 603

    Mar 14, 2008
    You have about 3Gb of free memory in that screenshot, I don't see what your problems is? Your pages outs are low and you're barely using swap, you're not running out of memory.
  10. Quinoky macrumors regular


    Sep 18, 2011
    Groningen, Netherlands
    Erm.. Doesn't a quad-core CPU go all the way up to 400% in Activity Window?
  11. Inconsequential macrumors 68000

    Sep 12, 2007
    Correct. However with HT a quad goes to 800% (Mines currently sitting at ~780% on VMWare Fusion)

    Working perfectly.

    As long as the page-outs have reduced since upgrading then it is doing it's job.
  12. yousifabdullah macrumors regular

    Jul 19, 2011
  13. Freyqq macrumors 601

    Dec 13, 2004
    Well...OP you just dont understand how OSX memory management works...

    inactive memory = cached memory
    Basically, inactive memory is memory that has been used in the past and has data on it in anticipation of future use. Free ram is ram that is completely empty. If you do something new that isn't in the active or inactive ram, and there is not enough free ram for the task, some inactive ram is converted into active ram.

    Pageouts are caches to the hard drive because you don't have enough free or inactive ram available for the task. You want pageouts to be low. High pageouts means that you are too little ram for the tasks that you are doing.
  14. yousifabdullah macrumors regular

    Jul 19, 2011
    No need to understand, it's terrible. Yes, good in theory but bad in practice, especially if you're a heavy multitasker. I have 8GB, too. Take a look at Activity Monitor and currently running apps. If I now started a heavy application, say Adobe Premiere Pro, I'd be in for a very slow session. My trick: to flush the cache using the command purge in Terminal. I've had to use it too many times, quitting applications doesn't free up memory from Inactive, which is stupid because OS X doesn't acknowledge the change quickly enough.

    Oh, and to the person who commented about Linux memory management: You, sir, have no clue what you're talking about. (Lest you mean Ubuntu, which further proves your lack of coherence in the field of Linux.)

    Let's stay all Mac and dandy, folks, but if anything then OS X is a memory swallower. The more you have the hungrier it gets.

    Attached Files:

  15. Freyqq macrumors 601

    Dec 13, 2004
    Well, it tries to keep at least 1/4 of your ram inactive, even if it means you pageout, but windows 7 does the same thing in my experience.
  16. accessoriesguy macrumors 6502a

    Jul 8, 2011
    Are you running Lion or Snow Leopard?

    Lion will try to pounce on every ounce of RAM available, while snow leopard still tries to better manage RAM, inactive RAM is still available to use btw.

    If you do use many RAM intensive tasks you should think about closing some programs up to prevent swapping.

    Only other option is to upgrade to more ram :p
  17. WickedPuddin macrumors member

    Jun 15, 2011
    Maybe restart you computer to reset the kernal task?
    Honestly.....If its been on for two days.....
  18. yousifabdullah macrumors regular

    Jul 19, 2011
    Well, now it's in a good state. Sometimes even Safari starts to slowdown considerably and it's only until I open Activity Manager that I find out there's only a few hundred MBs of RAM left. I don't know the internal workings of OS X' memory controller, but under Windows 7 I have never had similar issues. I have a Boot Camp installation and honestly I can run Windows 7 for a full day with still more than 6GB RAM left at the end of the day. On OS X, I start out with 6GB free from cold boot, but go down to 2GB free in just a matter of seconds when I open all necessary applications (Safari, Mail, iCal, Pages, et cetera).

    Also, I remember having the same problems in Snow Leopard as well. If anything, Lion only makes the situation worse. As I said, quitting applications (that is, cmd-Q) does nothing as far as memory resources go. OS X acknowledges the changes much, much later. If I quit all applications and go down to only having Finder open, most of my RAM shows up under Inactive and continues to do so for a few hours. Yes, hours.

    Restart the computer? I have a MacBook Pro, it's much easier to just close the lid and let the computer sleep until I need it again. In addition, at times I need to use my computer as a media server. Having to restart a server in order to compensate for the problematic memory controller of OS X doesn't seem feasible.
  19. phyrexia macrumors 6502a

    Sep 3, 2010
    Two days is not large amount of uptime.
  20. GuitarG20 macrumors 65816


    Jun 3, 2011
  21. GGJstudios macrumors Westmere


    May 16, 2008
    I haven't read the whole thread, so this may have already been mentioned. Your page outs are cumulative since your last restart. You could have had a period of high memory demand, during which you paged out a very small amount. That period is over and now your memory demands are less, as evidenced by your free and inactive RAM. There is nothing wrong with Mac OS X memory management, only your understanding of it.

    Mac OS X: Reading system memory usage in Activity Monitor
  22. Quinoky macrumors regular


    Sep 18, 2011
    Groningen, Netherlands
    So? This memory is as much available to other applications as the memory that is marked as "free memory". It simply doesn't matter. In fact, be happy that it is still inactive because if you open regular applications it will load much faster thanks to this. If there is ever any situation that requires more memory than what is marked as "free", OS X automatically allocates memory that is marked as "inactive" to it, which is absolutely great IMO.
  23. Lone Deranger macrumors 68000

    Lone Deranger

    Apr 23, 2006
    Tokyo, Japan
    Hmkay.. after 6-7 years of using daily it in the cg/visual effects industry at places like Framestore and Weta Digital, I’m sure I have no clue at all. :rolleyes:
  24. klinic macrumors member

    Apr 7, 2011
    I hope this is true, because it's kind of hilarious.

    Unfortunately it's so easy to lie about what you do on the internet. For amusements sake, I hope you are telling the truth.

    To OP, I've never had any of the issues that you've had, and I do some heavy video editing and 3D work on my MBP. The general consensus doesn't seem to be that your issues are widespread either, so maybe there's some unknown underlying problem.

    I'm pretty sure it should definitely be allocating more ram to wow.
  25. realchimera macrumors regular

    Aug 23, 2011
    I used to not shut down my Thinkpad for months, and it was still amazing.

Share This Page