Strange memory problems or memory leak in OS???

Discussion in 'OS X Mountain Lion (10.8)' started by OldGuyTom, Sep 28, 2013.

  1. OldGuyTom macrumors regular

    Sep 6, 2013
    I got a copy of Scannerz a few weeks ago to troubleshoot a problem that I had with a BRAND NEW Western Digital 2TB external drive. This Western Digital unit is about the cheapest built piece of crap I've ever seen in my life. The only good thing about it is the 2TB size. Aside from that, the cable is flimsy and the case is even worse. I was getting erratic I/O errors and Scannerz pointed me at the cable (which looks, like the case, like it was built by elves.) I replaced the cable with a good cable and the problems disappeared. I probably should have returned it but that takes time and the drive inside this POS case is supposed to be good, so I decided to keep it figuring if the case malfunctions I'll extract the drive and put it in something else.

    In any case, once that problem was fixed, I decided, for kicks, just to run "Performance Probe" which comes with the Scannerz package for free. As an FYI this system is a mid 2009 MacBook w/4GB of memory. Most of the time, and I'd like to stress the word "most" the system runs OK. In any case, one day I noticed tons of spinning beach balls along with very, very slow response to everything. I look at Performance Probe and notice that the CPU and Memory readings seem to be having a war with each other, meaning it's almost looks like they're trying to outdo each other for which can hog the most resources, and yet I'm running only Mail and I went to to get the forecast using Safari (YOU'VE GOT TO BE KIDDING ME!! This now qualifies as bottlenecking????).

    I look at Performance Probe and it indicates the OS and all running apps are taking up 2GB of memory. I figure Spotlight is running, so I bring up Activity Monitor and it's clear that Spotlight isn't running (mds and mdworker threads aren't hyperactive) At this point I say "screw it, I'll check it out in an hour" because I didn't have time. I come back about 90 minutes later and Performance Probe is now telling me that 75% of the memory is in use. In use for what? I figure it's a bug in the program so I open up Activity Monitor and it tells me the exact same thing. The two report memory differently. Performance Probe sums all active and wired memory into one group on a pie chart (red) whereas Activity Monitor breaks out the two. You can see a picture of Performance Probe here: Probe.html

    75% of the fricking memory for what????? I haven't even been using the system! How did it manage to go from about 50% of the used memory to 75% of the memory WHEN I WASN'T DOING ANYTHING????

    I should add that I have Snow Leopard on an external FireWire drive so I can use some old, now "not allowed" programs. I've done similar tests on it, and it isn't consuming any where the memory that Mountain Lion uses, and I'm not having any of the erratic, "guess what…I think I'll lock up and hog all your memory for no apparent reason" bug (I assume they're bugs.)

    Are bugs like this well known? I've wasted (EMPHASIS: WASTED) time troubleshooting the system. I've run Scannerz on all HDs now, no problems. I've run AHT on it several times figuring I'll find some system error. No problems. I run it with Snow Leopard. No problems. I run Mountain Lion, and about 10% of the time I'm getting similar errors.

    I wish I could say, "Yes, I'm running MacKeeper because God Almighty has bestowed this wonderful product on us to save all of us from non-existent threats for about 50 bucks" but I know better than that. This looks like a bonafide bug. This is release 10.8.5. There's no excuse for this.

    …and they want me to give me more money for Mavericks? Does Apple know what they're doing anymore???
  2. benwiggy macrumors 68020

    Jun 15, 2012
    Firstly, "use of memory" is not necessarily a Bad Thing in itself. Whilst there may be issues with ML's memory management, merely using RAM is not one of them. ML is designed to use the available RAM.
    I've run a 2009 MacBook on Mountain Lion with 4Gb and not had any significant slow-downs, spinning beachballs or other problems. A memory leak in Safari or related process in a possibility, though.

    Secondly, Activity Monitor should tell you all you need to know. You can see what processes are hogging the CPU and what's using all the memory when you have spinning beachballs. If you don't have spinning beachballs and the OS is using most of the memory, then you have no problem.
    However, Flash ads on webpages can use a surprising amount of CPU and memory.

    You say you're "getting errors". What errors, exactly?

    Next, memory management is Mavericks is completely different and has had a massive revision. Extrapolating your experience of 10.8 is not going to be accurate. It's likely that Mavericks will perform better than ML. (Though you may find that it also uses the RAM that you have. Empty RAM is wasted RAM.)

    Finally: if you use diagnostic tools, you'll find things to worry about. :p
  3. TheBSDGuy macrumors 6502

    Jan 24, 2012
    Mountain Lion is easily the buggiest version of OS X I've ever used. I would say that 10.8 -> 10.8.3 were comparable in quality to Windows 95. With 10.8.4 and 10.8.5 I think they got a lot of the bugs fixed, but (apparently) not all of them.

    The biggest causes of problems, at least previously were mds and mdworker threads from Spotlight, Safari, Safari Web Content, Flash, and unfortuately the Kernel. Most of these seem fixed to me, now but that doesn't mean everything is fixed.

    Did you hit a bug, like a memory leak? Probably. See if you can replicate it and report it to Apple if you can.
  4. OldGuyTom thread starter macrumors regular

    Sep 6, 2013
    Today I'm using it with active applications, several of them, and the thing isn't even using half the memory in the system.

    I wonder what's going on? :confused:
  5. MacRobert10 macrumors 6502

    Nov 24, 2012
    Since you have a copy of Scannerz, and I'm assuming it's not Scannerz Lite, then you have either FSE or FSE-Lite. If this happens again you could run it and see if there's any file system activity going on that might point at the culprit.

    I've seen this happen after a Spotlight indexing session, but usually over time the memory frees itself. I've never seen it grow for no reason.
  6. ZVH macrumors 6502

    Apr 14, 2012
    When problems like that happen, pay attention to the following:

    1. Has spotlight been doing a full index sweep during the time frame.
    2. Were there large applications open at start up that you closed after starting.
    3. Are you sure somebody else, like "junior" perhaps, didn't get on the system.

    For whatever reason, Spotlight causes the kernel and mds process to each eat a lot of memory and hang on to it for a while. Eventually...Eventually, they relinquish it...but not until they manage to scare the cr*p out of people!:)

    Good Luck
  7. MacRobert10 macrumors 6502

    Nov 24, 2012
    I thought it was your imagination, quite frankly. But it happened to me now too. Here's what happened:

    1. I used Mail and Safari, just like you did. Memory looked OK.
    2. I left it alone for a while. Memory went use went up to about 75% for no reason. OK, I think, I've got a memory leak. It's real. This guy wasn't imagining things. Let's leave it alone and see if it eats up so much memory the system crashes.
    3. I come back about an hour later and Performance Probe is indicating about 30% of the memory is now in use!!! IT"S DROPPED DRASTICALLY!!!

    My conclusion: Memory management in ML is just plain strange. I verified the stuff from Performance Probe against Activity Monitor and they're both reporting the same thing. I can't explain it.
  8. MacRobert10 macrumors 6502

    Nov 24, 2012
    I think a possible cause of this problem might be the mds (Spotlight) process. It started doing it again and when Performance Probe was showing a lot of memory in use when it didn't need to be in use, I opened up Activity Monitor and checked the memory usage. mds was hogging tons of memory. I left the system alone to eat dinner, came back about 2 hours later and it's memory consumption had dropped a lot.
  9. ZVH macrumors 6502

    Apr 14, 2012
    The same company that makes Performance Probe also makes SpotOff:

    You could try that out if Spotlight's being a hog. I use it with my laptop because I got sick Spotlight kicking on and hogging CPU...then the fans come on....then the heat then you watch your battery life drop like a rock falling off a cliff....

    The way I use it is to just leave indexing alone, then if Spotlight decides NOW is the time to be most obnoxious, I turn it off with SpotOff. I re-enable it when I'm done with the system and it's plugged in. Spotlight can cause the system to run all the fans it wants to and hog all the CPU resources it wants. Hell, it can ask one of the CPU cores out on a date for all I's not bothering me anymore!;)
  10. TheBSDGuy macrumors 6502

    Jan 24, 2012
    This "problem" (note the quotes) is apparently being reported by a lot of users. Apparently it isn't necessarily a problem, this is just the way some of the lower level processes allocate and deallocate memory.

    If this causes you performance problems (slow loading, slow applications, increases in page outs and swap size) then yes, it's likely a bug of some sort. As I said before ML has had more than it's fair share. However, if performance problems aren't present this may be the way some of the underlying processes such as the kernel process, mds, and Safari web content just work. Unlike most other applications that free memory and it ends up being marked as inactive, apparently some of the lower level system processes will hang on to real, active memory, even though it isn't in use, unless demand requires they free it or a period of time elapses. None of what I've just said has been proven beyond a reasonable doubt so don't assume it's correct, but it would make sense while also explaining a lot.

    Then of course there's this theory:

    It's the ghost of Steve Jobs saying "Hello, World."
  11. ZVH macrumors 6502

    Apr 14, 2012
    If it's of any value, I've been monitoring the system using Performance Probe, and I can safely tell you that the mds (Spotlight) likes to be a mysterious memory pig. I have no idea WHY it likes holding on to memory for an hour or so after indexing is just does. Then it seems to free it. I verified this initially with Performance Probe then brought up Activity Monitor to get the details.

    I don't remember if it was CNET or MacWorld that did a recent critique of Spotlight, but whoever did were right. Spotlight has become just plain stupid. The processes associated with it are both memory and CPU hogs. If I run Performance Probe on my system and the CPU bar flags red for a sustained period of time, I can just about count on it being Spotlight. If the memory consumption goes up for no obvious reason, I can just about count on it being Spotlight. And on top of all that, it isn't even intuitive anymore. You used to be able to just enter some text into the Spotlight dialog and it would present you with a list of files. Now you need to play "keyboard games" to try and figure out just where the file you're looking for really is.

    This is stupid. You shouldn't need to be buying 3rd party tools to tell you when your system is being overloaded, or for that matter, buy a product to control what's supposed to be an advanced feature of the OS that doesn't work properly. I'm not knocking SCSC for making SpotOff and Performance Probe, they do their job. I'm knocking Apple for not doing the job right in the first place!
  12. MacRobert10 macrumors 6502

    Nov 24, 2012
    My experience has been that you only run into Spotlight problems when Time Machine backup units are attached to your system. Once they're disconnected the Spotlight problems seem to end.

    I don't know if it's like that on every version of OS X or if this is a Mountain Lion "feature."
  13. Bear macrumors G3

    Jul 23, 2002
    Sol III - Terra
    For a bare/internal drive, Western Digital seems as good as any other brand. For external drives, Western Digital should be stayed away from. Seagate external drives are fine.

    If you prefer Western Digital drives, I suggest you buy an internal drive and put it in a good external case.

Share This Page