Previous 1 2 Next 29 Replies Latest reply: Jun 16, 2012 10:43 PM by Kevin Stanchfield Go to original post
  • numinasthmatic Level 1 Level 1 (0 points)

    This is a repost from another related thread. The problem gets reported in many places, but no-one ever joins the dots to illustrate that it is fundamental memory management bug in the OS.

     

    ......

     

    This is an on-going and serious OS X bug. It is NOT confined to Lion, although that may have made it worse for some people. I experienced ths problem with Snow Leopard as well.

     

    The problem is not with any particular apps, although it may start there. You can shut everything down on the system, and the swap will still not be freed.  That's an OS X problem, because the processes that generated any memory leak have gone away, but OS X doesn't want to know.

     

    The other symptom you will see is that the system will slow down dramatically, because activitymonitord is chewing up increasing percentages of CPU.  I have seen activitymonitord running at over 40% of a CPU. That's impressive, and that was on Snow Leopard.

     

    Apple needs to fix this, but they don't seem to be interested.

  • twtwtw Level 5 Level 5 (4,900 points)

    This is not a problem with Mac memory management.  It's a third-party software fault.  For instance, I had this problem once, but traced it back to the HP Device Monitor (which seems to add a gigabyte swap file every hour or so).  disabling that process (except at need) brought swap files back to a reasonable level after about 10 minutes (the system released them over time - I think it checks every minute or so).  You'll never have these problems in a newly-created user account or a machine booted into safe mode; that should make it clear there's a third-party issue.

  • numinasthmatic Level 1 Level 1 (0 points)

    I'm sorry, but it IS a problem with Mac memory management. Have a look around. There are other threads where the problem is traced back to flash. Someone else reported that the problem was with iGlasses, some application or other.  I suspect that browser plugins are the main source of my (and my wife's) problems.  If you do look around, you will find this problem, or something very similar, being reported in 2009. There are probably even earlier instances.

     

    If, as you say, the problem is just the HP Device Monitor, then the bug reports that have gone into Apple over the past 3 years or so, plus the reports in this forum, should surely have perusaded Apple to have a chat to HP, and, if that didn't work out, to disable the application.

     

    But no, that hasn't happened.  This problem, as I have said, does not go away when one shuts down virtually everything on the system. activitymonitord churns away, chewing up cpu.  Hello, Apple! These are your systems, being run by your users.  If there is a problem with the way applications are using memory, then find out what it is, and sort the problem out with your APIs, or with the 3rd party developers, or both.

     

    Three years and counting.

  • elado Level 1 Level 1 (5 points)

    3rd party or not -- this folder's size should be limited by the OS.

    When I'm out of disk space and it can't grow anymore - it stops growing. This behavior should be applied always.

    There should also be a better way to identify what's the "bad process".

     

    Written with 22.5GB of /var/vm.

  • numinasthmatic Level 1 Level 1 (0 points)

    Given that you have 22.5Gb  in /var/vm, what does activitymonitor reporta as your used swap?

     

    I have, according to du -sk /var/vm

    11534336 (i.e. 11Gb)

     

    My sleepfile is 8589934592, or 8.4 Gb.

     

    The difference is 3145728K, or about 3Gb.

     

    ActivityMonitor says my used swap is 2.27Gb.

  • twtwtw Level 5 Level 5 (4,900 points)

    No, it's not a problem with Mac memory management; it's an app issue.  Swap files are created by the system when it needs to reapportion ram, and they are automatically released when they are no longer needed. The only way to get an ever-growing set of swap files is to have a process which keeps asking for memory allocations but never releasing them.

     

    HP Device Monitor was an example of the problem, I didn't suggest it was the only cause.  And just so you understand the example, when HPDM is running on my machine I will see one 1Gb swap file created roughly every hour (until I run out of disk space, if I let it go), and when I quit HPDM the excess swap files are all slowly released over the next five minutes or so.  The system is doing exactly what it's supposed to do.  Remember, the OS has no way of knowing whether an app's memory allocation is honest use or a leak (video processing apps, for instance, might require huge amounts of memory for some tasks).

     

    open activity monitor, set it to All Processes, sort the display by virtual memory, and leave it open in the background.  watch the processes at the top of the list; one of them will keep getting bigger and bigger over hours or days.  for the long run, contact the developer.  for the short run, set up an automated process that quits and restarts that process periodically so that the excess swaps are released.

  • elado Level 1 Level 1 (5 points)

    ~  du -sk /var/vm

    22020096          /var/vm

     

    And here's my top processes sorted by virtual memory:

    Swap used: 12.21GB

     

    Screen Shot 2012-06-03 at 11.33.30 PM.png

  • twtwtw Level 5 Level 5 (4,900 points)

    No individual process looks too bad, but how many instances of Google Chrome Renderer are there?  I see five.

  • elado Level 1 Level 1 (5 points)

    A lot more, about 30 tabs + extensions. But they're not consuming too much memory/virtual memory.

  • twtwtw Level 5 Level 5 (4,900 points)

    just the renderers I can see in the screenshot are requesting over a gigabyte of virtual memory, and you have 25 more in the list?

     

    Quit Chrome, make sure all the renderers go away, and see how much VM you recover over the next few minutes.

  • elado Level 1 Level 1 (5 points)

    It did drop to 16GB after 10-15 minutes! So Chrome is not releasing memory correctly?

    Is there a way to limit app's VM usage?

  • numinasthmatic Level 1 Level 1 (0 points)

    Add firefox and safari and HP device manager and ,,,, and ,,,, and ,,,,

     

    See the topic

    OS X startup disk has no more space available for application memory

  • twtwtw Level 5 Level 5 (4,900 points)

    Not that I know of.  I mean, it probably can be done, but at a system level that we have no immediate access to through unix. 

     

    You really should bring this up at a Chrome users board.  if other people have noticed the problem they may have a fix for it, or maybe they can convince google to make an update.  SInce I don't use Chrome, I can't really say much about it myself.

  • R C-R Level 6 Level 6 (16,755 points)

    twtwtw wrote:

    You really should bring this up at a Chrome users board.  if other people have noticed the problem they may have a fix for it, or maybe they can convince google to make an update.  SInce I don't use Chrome, I can't really say much about it myself.

    FWIW, I use the Google Chrome browser from time to time. I have never noticed any instances of a "Google Chrome Renderer" in Activity Monitor when I use it. I do see a single instance of a "Google Chrome Helper" & of a "Google Chrome Worker" process, each user owned & 'daughter' processes of the browser, but that is all.

     

    EDIT: I'm using version 18.0.1025.165 of Chrome. I just noticed there is an update available. I haven't installed it yet (getting an "Update server not available" error) but I will try to update it later & see if that makes any difference.

  • Kevin Stanchfield Level 1 Level 1 (110 points)

    You have some program running on your computer that has a memory leak, causing it to use all your physical (RAM) and  virtual (swap) memory.  You can use Activity Monitor to locate exactly which pogram is the culprit.

     

    http://www.thexlab.com/faqs/activitymonitor.html

Previous 1 2 Next