News for hackers. Stuff that matters.
Re:Mountain Lion seems to have addressed the memory manageme... by tedsuo on Thursday August 02, 2012 @11:37AM (#4329226)
Haven't seen the paging issues Adam was noticing, but I'm still gobsmacked by the amount of memory some applications seem to take. The OS (kernel_task, mds, WindowServer, and friends) regularly eat up .75 of a gig, and Firefox consumes .5 - 1 gig without much effort (other browsers seem to have a similar profile).

Quick poll, what are you running, and what's your memory consumption? Here's me:

Currently running: Firefox, Spotify, Mail, Calendar, Terminal, Mongo (mongo using 100mb).

Memory Used: 3.75 GB

Re:Mountain Lion seems to have addressed the memory manageme... by blinkingled on Thursday August 02, 2012 @12:25PM (#4329500)
It is definitely better overall with ML in that it is no longer ridiculously slow but memory consumption for typical set of tasks still is way higher than either of Linux and Windows.

For instance I have KDE4 running on Linux with Firefox, Amarok, Kopete, Konsole and all other default services (ssh etc). Used memory is 1.1GB.

I've ML running with Firefox, Terminal.app, Activity Monitor in addition to the defaults. Any my used memory is 3.92GB. Wired is 1.75GB and Swap used is 11MB!

My experience with Windows 7 is also lot better than ML - it tends to be bit more than Linux but in the same ballpark.

Edit: To put this in perspective - I just realized that my work laptop (that I RDP into and never reboot) with all possible bloatware loaded and running - Word, Outlook, RDP, Lync 2010, Java Backup process, Enterprisey stuff, Firefox with couple tabs etc. is taking up only 2.83 GB! Apple really has a memory usage problem with OS X.

Re:Mountain Lion seems to have addressed the memory manageme... by stephencanon on Thursday August 02, 2012 @09:08PM (#4331972)
Unused memory is wasted. You should be complaining about the system that doesn't use all available memory.
Re:Mountain Lion seems to have addressed the memory manageme... by blinkingled on Thursday August 02, 2012 @10:35PM (#4332232)
Windows and Linux don't leave unused memory around - both use it heavily for page cache. However what we have a problem here with is active/resident memory use and/or VM subsystem making no so smart decisions(this part seems to have gotten better with ML).

So the end result is that when Windows and Linux can be quite usable with 2GB RAM with a rotational disk, for similar workload OS X slows down quite a bit.

Re:Mountain Lion seems to have addressed the memory manageme... by Zr40 on Thursday August 02, 2012 @12:12PM (#4329413)
Unused memory is wasted memory. As a user, you shouldn't care about memory usage if there's plenty available.

It's far more interesting to see what happens in a low-memory situation.

Re:Mountain Lion seems to have addressed the memory manageme... by mgkimsal on Thursday August 02, 2012 @12:58PM (#4329701)
Except... when apps are using a lot more memory than they do on other OS, you tend to get a low-memory situation anyway.

If I've got a 4gig machine, and running 5 apps takes up 3.8 gig, trying to run another app with necessitate swapping/paging some of the existing apps around to accommodate my new app. If those initial 5 apps only took up, say, 2.8g, I'd have less chance of hitting 'low-memory' situations in the first place.

I say this as someone with 16g mbp and SSD who still hits beach balls and unexplained pauses on a daily basis. Fewer than I used to, but it gets annoying. Not quite as annoying as win95/2k blue screens of 12+ years ago, but getting my ire up.

Re:Mountain Lion seems to have addressed the memory manageme... by pooriaazimi on Thursday August 02, 2012 @02:09PM (#4330093)
Beach ball is not necessarily a low memory warning (or memory related). It's showed (only) when a GUI application fails to respond to UI events. Sometimes it's because of bad threading in applications or things like that.
Re:Mountain Lion seems to have addressed the memory manageme... by mgkimsal on Thursday August 02, 2012 @02:18PM (#4330137)
understood they're not always the same thing - I often see a beachball with 6gig free, which used to perplex me a bit, now it just bugs me. :/
Re:Mountain Lion seems to have addressed the memory manageme... by Zr40 on Thursday August 02, 2012 @04:31PM (#4330833)
If you're interested in seeing what's happening, fire up Activity Monitor and hit Sample on the app when you see the beach ball. It records the call frames of all threads a couple of thousand times over a few seconds, so you can see what that app is waiting for.
Re:Mountain Lion seems to have addressed the memory manageme... by stephencanon on Thursday August 02, 2012 @09:09PM (#4331980)
... and report the bug to the app's developer! Be sure to include the sample.
Re:Mountain Lion seems to have addressed the memory manageme... by mikeash on Thursday August 02, 2012 @09:40PM (#4332075)
If the entire system has ground to a halt such that it's difficult to actually get to Activity Monitor to do the sample, then it's likely to be a memory problem. If it's just one app, it's probably something else.
Re:Mountain Lion seems to have addressed the memory manageme... by stephencanon on Friday August 03, 2012 @06:32AM (#4333415)
If the system is hung such that you can't get Activity Monitor to sample, use command-option-control-shift-period to run sysdiagnose. Attach the resulting /var/tmp/sysdiagnose_$(TIME).tar.gz to your bug report.
Re:Mountain Lion seems to have addressed the memory manageme... by jonhendry on Friday August 03, 2012 @01:43PM (#4335146)
And inside that tar.gz file is a spindump.txt file, which will have the samples of whatever application is spinning at the moment, just like if you used Activity Monitor to sample it.
Re:Mountain Lion seems to have addressed the memory manageme... by pooriaazimi on Friday August 03, 2012 @07:19AM (#4333515)
I had never heard about it... Wonderful.
Re:Mountain Lion seems to have addressed the memory manageme... by mgkimsal on Thursday August 02, 2012 @07:43PM (#4331677)
good idea - upvoted! :)
Re:Mountain Lion seems to have addressed the memory manageme... by dedward on Thursday August 02, 2012 @10:44PM (#4332267)
Odd - I've been using an 8 gig mbp with swap disabled and I've yet to crash due to running out of ram. That's running a few browsers, editors, VM instances, possibly photoshop for some tweaking. Beachballs are very rare and would be due to software errors, not out of memory conditions - those would just crash.
Re:Mountain Lion seems to have addressed the memory manageme... by coob on Thursday August 02, 2012 @11:56AM (#4329319)
A lot of that memory is shared memory.
Re:Mountain Lion seems to have addressed the memory manageme... by weiran on Thursday August 02, 2012 @11:55AM (#4329313)
What's the problem with the OS and apps using as much available memory as possible?
Re:Mountain Lion seems to have addressed the memory manageme... by cellularmitosis on Thursday August 02, 2012 @02:34PM (#4330233)
The problem is that OS X appears to favor swapping over evicting file caches. This ends up creating a situation where no matter how much physical RAM you add to your system, you still end up seeing frequent swap-induced beach balls.
Re:Mountain Lion seems to have addressed the memory manageme... by joezydeco on Thursday August 02, 2012 @12:05PM (#4329365)
That's child's play. Open Dashboard and watch the horror.
Re:Mountain Lion seems to have addressed the memory manageme... by notlisted on Thursday August 02, 2012 @12:17PM (#4329448)
Funny you should say that. Exactly my experience. Just left a comment on Adam's blog, but let me add it here as well.

I turned off Dashboard where I had a couple of unused widgets active running in the background (used Dashboardkiller app from MacUpdate) because I haven't used any of those widgets in months. Suddenly all of my mysterious memory/paging issues on Lion disappeared. Swap and page-outs decreased significantly. Machine is running like the first fresh install. Give it a try.

Edit: I'm running Lion 10.7.4

Re:Mountain Lion seems to have addressed the memory manageme... by joezydeco on Thursday August 02, 2012 @12:18PM (#4329456)
I've never really tried to understand Dashboard from the O/S side, but it seems like it's almost installing a separate WebKit process for each widget.

Edit: I'm on Mountain Lion, and Dashboard is still a memory hog. I just disable it now.

Re:Mountain Lion seems to have addressed the memory manageme... by Zr40 on Thursday August 02, 2012 @12:25PM (#4329499)
I believe it actually is a separate WebKit process per widget.

Could you quantify the Dashboard memory usage? I'm using the Weather and Delivery Status widgets, and they're only using 16.7 MB and 28.9 MB. This is on Mountain Lion.

edit: most of that memory is shared, so the real memory usage is even lower.

Re:Mountain Lion seems to have addressed the memory manageme... by notlisted on Thursday August 02, 2012 @01:28PM (#4329869)
Note: I did not shut down dashboard because of reported memory usage, nothing was obvious from activity-monitor either, ie not listed separately as a memory-hog.

However, once I did shut it down (not just remove all the widgets, I had like 10 running, but actually prevent it from starting) my machine was finally back to normal.

I'd be curious to see if anyone here who does experience the memory problems can replicate this.

Addition: since shutting it down, the reported memory usage for the kernel task has dropped a lot, does that make sense?

Re:Mountain Lion seems to have addressed the memory manageme... by joezydeco on Thursday August 02, 2012 @08:18PM (#4331807)
My dashboard has 10 widgets, two of those are web clips. I'm seeing 90MB real memory and 220MB virtual. Maybe it's not as bad as I thought. Or maybe it's just improved since 10.6.
Re:Mountain Lion seems to have addressed the memory manageme... by malkia on Thursday August 02, 2012 @12:02PM (#4329349)
Is that Virtual Memory? Or Private / Reserved / Shared?
Re:Mountain Lion seems to have addressed the memory manageme... by flatline on Thursday August 02, 2012 @12:24PM (#4329490)
On a new rMBP with 8GB RAM, running eclipse, iTunes, weka (ML software), kindle reader, open office, safari, preview with a half dozen pdfs open, terminal. 5.5 GB used, 0 pages out:)
Re:Mountain Lion seems to have addressed the memory manageme... by altarelli on Thursday August 02, 2012 @02:09PM (#4330091)
open office -> try libreoffice, it is evolving much better.
Re:Mountain Lion seems to have addressed the memory manageme... by matthewlyle on Thursday August 02, 2012 @11:53AM (#4329306)
I'm running programs of similar functionality but coming in at 1.95GB.

Chrome (only 8 tabs right now), Rdio, Sparrow, Coda, Terminal, Notational Velocity.

Re:Mountain Lion seems to have addressed the memory manageme... by siculars on Thursday August 02, 2012 @04:17PM (#4330766)
Quick thing on Terminal. I noticed that I had to limit the scroll back history in Terminal or else it eats up all your everything. For example if you have a number of term windows open and they are tailing log files or have verbose running processes open. I put it at 10k or so and things are fine now.