4 Replies Latest reply: Dec 21, 2012 8:29 PM by idfubar
egremyl Level 1 (0 points)

Starting with OS X 10.5 there are evident memory management problems in MAC OS X. The web was already then cluttered with complaints about system slowing down dramatically after some time. Back then i had slower machine, Mac Mini with 1GB RAM, so i (wrongly) concluded that it was due to inferior hardware.

 

Now i have 2010 MBP, core i7, 8 GB RAM, dual GPU.

Mac os X Snow Leopard was pain, but after migrating to OS X Lion, working some serious stuff on MAC started to be a nightmare.

 

I finally managed to reproduce the problematic scenario, so i run the test and recorded the screen, into video.

 

http://www.youtube.com/watch?v=u5wZwZh61_4

 

I run the tar+bzip command, which is basic unix stuff, on the large amount of picture files, in my Pictures/ folder. Just before start, i run the "purge" command, to delete inactive/cached program data.

 

You can see on the video that free memory starts to drop very fast, and inactive is constantly rising. If you take a look at "bsdtar" command, it takes only a fragment of RAM, so the problem is not in this process. You cannot say that it is a program memory leak, because then the problem would not be in inactive ram, rather in active/wired.

 

When the free memory dropped below 100mb, i started some apps, like Safari, iPhoto and MS Word, and you can see in the video, that it takes even minutes to start an app, when normally (when there is free RAM), it would take some 3-5 secs to load.

 

I run the same scenario and the same commands on my Linux Centos 6 box, no problem there ! Memory usage is some 10-20mb, no problems with cache/buffer.

 

The memory management must be very broken in Mac OS X !


MacBook Pro, Mac OS X (10.7.3)
  • William Kucharski Level 6 (14,985 points)

    Broken?  That's a bit harsh.

     

    Immature?  That's perhaps a better explanation.

     

    This paper describes Priority Paging as implemented in Solaris 2.7 back in 1998, and that's essentially what Mac OS X is in need of today:

     

    The problem is that when pages are needed, no differentiation is made between system file cache pages and application pages, and worse, the file cache can actually steal pages needed by applications.

     

    Finally when Dynamic Pager starts up and needs to start swapping things out, it's fairly heavy weight in operation, and causes the UI not responding cursor (aka the spinning beach ball) to appear.

  • egremyl Level 1 (0 points)

    i submited a bug report to apple.

    i finally got an answer, but unfortunatly it is

    The issue is being tracked under under the original Bug ID# ........ which is also listed in the Related Problem section of your bug report.

     

     

    I can see that other bug listed as bug id#, but i cannot open it, search it ....

    does anybody know how to open other people's bug report ?

  • Norm Fox Level 1 (0 points)

    I feel you pain and as someone with an oldish (early 2008) Al iMac with only 4 GB of RAM I feel your pain.  Try running purge from the terminal.  I find I need to do this about once a day.  It will free up most of your Incative RAM. 

     

    You may need Developer Tools installed, I forget

     

    http://osxdaily.com/2012/04/24/free-up-inactive-memory-in-mac-os-x-with-purge-co mmand/

  • idfubar Level 1 (0 points)

    Anyone heard anything further regarding this problem?  It's especially egregious when one runs a virtualization container and a guest operating system as negative performance impact on the host is not a natural expectation...