8 ms·
Mountain Lion seems to have addressed the memory management issues in OS X
- kevinconroy 14y agoI can concur with OP. My MacBook Pro suffered severe paging issues under Lion, but seems to be (mostly) gone in Mountain Lion. Running Eclipse, Photoshop, Chrome, and Parallels at the same time is possible once again without major slow down on my machine. As always, YMMV.
- cicloid 14y agoSince the GM, I also noticed this on my production machine. Previously I had custom settings for the dynamic pager, but it seems that is not longer necessary. Subtle changes and I'm happy with them. Probably the next year, we'll see some subtle improvements on the backend.
- bsimpson 14y agoThis is the reason I installed Mountain Lion. I've only used it a bit in the last few days, but I haven't seen crazy amounts of mds RAM usage since installing either.
- chiph 14y agoOK, that's enough reason to do the upgrade. Parallels gets abysmally slow for me when TimeMachine starts up.
- bchen 14y agoThis is slightly off topic, but make sure you are on the latest version of Parallels before doing the upgrade. For some reason, Parallels 6, which is less than 2 years old, does not support Mountain Lion. Personally, I do not care about the new features in Parallels 7, but was a bit annoyed when forced to upgrade.
- rogerchucker 14y agoI was surprised to see myself being forced to upgrade to the next version of Parallels. Pretty annoying.
- adestefan 14y agoI got bit by the same thing with VMware. You must be on Fusion 4 for Mountain Lion. Sucks because I had no plans on upgrading.
- jasomill 14y agoThere's a free Technology Preview of Fusion 5 that's time-limited, but probably not so much that it wouldn't work until Fusion 5 ships. Mountain Lion is officially supported as a host and guest. I've been using it daily for a couple months to run Windows (7 and Server 2008 R2, plus the various previews of 8 and Server 2012), FreeBSD, and OS X (Lion, Snow Leopard Server, and Leopard Server), and it seems stable.
- jpxxx 14y agoVirtualizers need as much RAM as you can possibly throw at them. Filler up!
- simonh 14y agoIs that memory consumption or i/o contention? If your VM image is being backed up that could be a problem. I keep my VM images on an external drive mainly for overall i/o performance reasons. They're not backed up but then all the data I care about is still on my main drive and safe. If you can tolerate the risk, you could try excluding the VM image directory from time machine and see if that makes a difference.
- taude 14y agoMy battery life seems to last as long as it did on Snow Leopard, too.
- Zirro 14y agoHow much did Lion affect it?
- taude 14y agoWith Lion, I got only about 2 hours...then went back to SL. Now with the upgrade, I seem to be back in the 3.5 hour range.
- cydonian_monk 14y agoI'm seeing the exact opposite, but for a different reason. On Lion I could put my MBP to sleep and only lose about 5-10% of the battery over 8 hours. Now on ML I lose ~40%, with nothing running. I turned off location services today to see if that's the culprit. As for actual on-battery use - yes, the battery life is noticeably improved over Lion.
- cmelbye 14y agoIs Power Nap on? (The switch is in the Energy Saver pane)
- cydonian_monk 14y ago13" MacBookPro - Power Nap is not supported. Though it is certainly behaving as though it's turned on (power-wise).
- dailyrorschach 14y agoAre you running Power Nap on battery? Also are you leaving USB items plugged in? On Lion at least I noticed that if I left my USB HD in, and closed the lid on battery it killed it, every time. There was an Apple Support thread confirming that.
- taude 14y agoMy battery life seems to be back at Snow Leopard durations, too.
- tedsuo 14y agoHaven'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
- matthewlyle 14y agoI'm running programs of similar functionality but coming in at 1.95GB. Chrome (only 8 tabs right now), Rdio, Sparrow, Coda, Terminal, Notational Velocity.
- siculars 14y agoQuick 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.
- weiran 14y agoWhat's the problem with the OS and apps using as much available memory as possible?
- cellularmitosis 14y agoThe 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.
- coob 14y agoA lot of that memory is shared memory.
- 14y ago
- 89a 14y agoThis guys initial advice was terrible and should never have been paraded around as a solution
- fields 14y agoIn spite of the fact that it worked for many people?
- cellularmitosis 14y agoReally? Because it solved my problem completely. I have to reboot when my system runs out of RAM, but I'd much rather do that once every two weeks than be constantly bombarded with beach balls.
- DrJokepu 14y agoOne of the things I've noticed is that the new Xcode 4.4 (released the same time as Mountain Lion) seems to be an awful lot snappier to me. My theory is that this is happening because they might have switched Xcode from being garbage collected to ARC (since it used to be GC ever since Snow Leopard came out but GC is now deprecated).
- bonch 14y agoXcode 4.4 is still using garbage-collection according to otool.
- chucknelson 14y agoDoes anyone know if there is a way to monitor xcode and find out if it's GC or ARC?
- msbarnett 14y agoYou can just use otool to dump the Objective-C information out of the MachO executable: otool -o /Applications/Xcode.app/Contents/MacOS/Xcode ..... Contents of (__DATA,__objc_imageinfo) section version 0 flags 0x6 OBJC_IMAGE_SUPPORTS_GC That's for Xcode 4.4. So yes, it's still being built for Garbage Collection.
- binarycrusader 14y agoA recent post on the Apple developer forums indicated that it is still using gc. But it's a very large, old codebase at this point so that's not surprising. I imagine that as they drop support for older platforms and have the time, they'll slowly remove reliance on gc.
- deleted 14y ago[deleted]
- whalesalad 14y agoIt seems as though a lot of people are noticing some speed enhancements. I haven't quantified any of it, so my experience is all anecdotal, but I definitely notice the boost as well. The changes in Mountain Lion have been subtle, but I really love the upgrade. I performed a full disk backup which took the longest amount of time. The actual install (2012 MacBook Air) took like 15-20 minutes. If anyone is in doubt, definitely do yourself the favor and upgrade. Typically I am hesitant to do major OS upgrades due to things like python or ruby breaking most of my local websites ... everything works great! I had to modify some apache2 settings (I use the built-in webserver for PHP development) but that was about it. Oh also, apache is still there. A lot of people think that it's gone because the preferences pane is missing, but it's still hiding within the belly of the beast. I feel like I can throw anything at this. I've never multitasked like this before.
- T_S_ 14y agoOdd. I had this problem in 10.6 (Snow Leopard) and it went away when I upgraded to 10.7 (Lion). The most obvious symptom is the machine does not seem to be able to make use of the inactive memory (the blue slice of the pie in Activity Monitor). I did not notice the problem at all when I first started using 10.6. When I hunted around on the help forums a few months ago I found lots of users with the symptoms, but nobody acknowledging the "validity" of the problem. In fact a lot of deniers out there. I wonder if it was quietly fixed or will recur after the system gets used for a while.
- slig 14y agoAnyone did the upgrade from SL? Is a clean install always recommended?
- ChiperSoft 14y agoClean install is always recommended no matter which OS you're coming from.
- ghshephard 14y agoRecommended by who? The mac pundits that I listen to, Gruber, Siracusa, certainly don't seem to have a problem with upgrading in place on OS X. And, "no matter which OS" is definitely incorrect. I've done an in-place upgrade of an OpenBSD system for the better part of six years (twelve upgrades, twice a year). The _recommended_ approach on that platform is to do _in place_ - not clean install. It's how you maintain library compatibility with all your legacy apps.
- jasomill 14y agoI've had no more problems with the Lion machine I upgraded to Mountain Lion than I have with the two machines I did clean (USB stick, NetInstall) installs on, and the same was true when I moved from Snow Leopard to Lion. With that said, there are fewer things that can automatically go wrong in any clean install (as opposed to the things that can go wrong manually with a clean install, like forgetting to deactivate Adobe CS, or that scripts accustomed to sshing in to your server don't take kindly to unannounced host key changes).
- demallien 14y agoWhat makes you say that? I've been running the same install since 10.3. It's changed machine several times, and I have run every version of OS X along the way, all without any problems.
- X-Istence 14y agoUpgraded one machine from Snow Leopard (10.6) and another from Lion (10.7). No issues what so ever. Both still work perfectly, all my stuff from HomeBrew transferred over without any issues either (which is fantastic, did not want to have to recompile all of that stuff). The upgrade was fast and easy, definitely not something I expected and I had backed up my machine to do an install from scratch, but not required at all.
- kalleboo 14y agoI still ended up with an 8 GB page file after a few days of regular usage (nothing too hard like VMs or anything - just your typical Xcode dev workflow, including opening up Photoshop once or twice to export graphics). This is on a MBP with 8 GB RAM. I never had any memory-related performance issues in Lion, (maybe because I have an SSD), but I always end up with a big pagefile of stale data.
- DrJokepu 14y agoMost modern operating systems try write the contents of the physical memory to the page file at the first good opportunity (well before it's needed) in order to save time when the page is actually paged out, so it's perfectly normal to have a page file that is at least as large as your physical memory.
- wmf 14y agoAFAIK VMS and NT behave that way but Linux is much lazier. Especially if your swap is dynamically allocated (as in OS X) you don't want to swap out unless there is actual memory pressure.
- kevinconroy 14y agoThe size of your page file isn't a sign of a performance problem. What matters is how often your paging out and in between disk and memory. That will result in a huge slow down in human-perceived performance. The OP (and others, including myself) have observed a noticeable drop in the delays caused by frequent paging in and out. I checked and my pagefile is the same size as on Lion. Perhaps ML is still paging frequently, but if so, they've found a way to do it so that I'm not noticing it. Everything just feels faster compared to Lion.
- jonhendry 14y agoAre you sure that's not your sleep image?
- kalleboo 14y agoI'm going by the stat in iStatmenus. It slowly grows from 0 the first 2-3 days.
- Karunamon 14y agoOnly thing holding me back from upgrading is the complete lack of wanting to hex edit my ATI kext again.. heck it might not even be compatbile with ML. Hackintoshes :/
- rangibaby 14y agoWhat kind of card do you have? Hackintoshing has gotten a lot friendlier in the last few years. I upgraded a hackintosh I built for a friend from 10.6 to 10.8 and was pleasantly surprised by how everything "just worked" with minimal kext juggling.
- Karunamon 14y agoGigabyte Radeon 6850. What'll happen is, you have to choose a specific framebuffer configuration to even boot. 2 of these work with my card, only one of which allows hardware acceleration to work right and allows both DVI ports to work. The one that allows hardware accel on a single screen is actually the right one for the card. The hex editing is to change the display outputs to enable the second head.
- jonhendry 14y agoI'm using an XFX 6870, two-headed, on my Hackintosh, and didn't have to edit anything. I'm pretty sure hardware acceleration is working, too.
- Karunamon 14y agoThose are sufficiently different that you likely don't have the problem. The 6870 uses a different framebuffer personality than the 6850, and likely the fact that it's a different manufacturer might ameliorate the problem altogether.
- jonhendry 14y agoWhich hackintosh tools did you use? I used Unibeast/Multibeast.
- udp 14y agoI don't suppose anyone can comment on whether Mountain Lion has done anything for the mouse lag issue[1]? I can't upgrade yet because I disabled HFS+ journaling and nothing seems to be able to re-enable it (the installer requires journaling to be enabled). [1] http://d43.me/blog/1205/the-cause-for-all-your-mac-os-x-mouse-annoyances/ http://d43.me/blog/1205/the-cause-for-all-your-mac-os-x-mous...
- glhaynes 14y agoJust curious: why did you disable journaling?
- udp 14y agoLinux doesn't currently support writing to journaled HFS+ volumes.
- evoxed 14y agoI'm sure someone will be along to correct me quick enough if I'm wrong, but last year when I was upgrading to Lion I had the same issue (journaling turned off) and was able to turn it back on with minimal pain by doing it from the Snow Leopard boot disc (Disk Utility, of course).
- udp 14y agoUnfortunately that just gets me a helpful "Journaling could not be enabled". I guess something got messed up when I was writing to the volume from Linux.
- lloeki 14y agoWhat about: $ diskutil enableJournal /dev/diskXsY ML's diskutil(8) says: enableJournal device Enable journaling on an HFS+ volume. This works whether or not the volume is currently mounted (the volume is temporarily mounted if necessary). Ownership of the affected disk is required. disableJournal [force] device Disable journaling on an HFS+ volume. This normally works whether or not the volume is currently mounted (the volume is temporarily mounted if necessary). If the force option is speci- fied, then journaling is disabled directly on disk; in this case, the volume must not be mounted. Ownership of the affected disk is required. moveJournal external | internal [journalDevice] device external will create a 512MB Apple_Journal partition out of journalDevice and an HFS+ partition will be created out of the remaining space if available; journalDevice must be a partition, not a whole-disk. The journal for device will then be moved externally onto the newly created Apple_Journal partition. internal will move the journal for device back locally. I don't know if it can work on the mounted root filesystem so you may want to try that from the recovery partition.
- Flow 14y agoYup, memory management seemed to be fixed as of 10.7.4 even. I've found new bug in ML, whenever I switch users, Mountain Lion seems to think I've a desktop much smaller than what I actually have. And sometimes the "virtual" desktop isn't even positioned at 0,0 on my actual desktop. :-/
- chatmasta 14y agoDoes anyone still have a 4gb MBP? I'm still on SL and wondering if I should switch.
- Nicole060 14y agoMountain Lion uses like 300mb more on my Macbook Air (probably some of the new stuff running in the background like Notifications) but I don't feel the difference in performance. It's not much slower or heavier than SL during real world usage. It does on the other hand feel better than Lion (I really had regrets when I first switched to Lion, particularly before the bug fixes). But I don't think Lion's problems had anything to do with ram management. Some of the animations just felt particularly sluggish, even if the computer had lots of ram free, and lots of other little things like that. By not switching to lion and waiting for ML you dodged a bullet.
- inuhj 14y agoI had 4gb up until I upgraded to ML. After 2-3 days on ML I noticed my free memory was around 300mb. I upgraded to 16gb for $65(cheap Komputerbay ram from amazon.com). An 8gb upgrade is ~45 for crucial 1.35V ram. I think its worth it.
- chatmasta 14y agoCool, thanks for the advice. I didn't even realize upgrading memory was so easy. I have a 2010 unibody, and Apple claims the maximum memory it supports is 8gb. Is that not really "true?"
- dedward 14y agoDig around - the 16 gig aftermarket upgrade may have been confined to some early 2011 mbp's - the 13" for sure (mine's on the way)
- otterley 14y agoIt's important to get the terminology correct when discussing VM behavior. Page-outs are not identical to swap-outs. And unfortunately, due to the age and architecture of the Mach kernel, there's no way I'm aware of on OS X to measure the rate of the latter. Page-outs refer to a file-backed page being committed to disk; these are perfectly normal and expected (program writes to a file, kernel eventually commits to disk). Every OS guarantees that file-backed pages be committed within some reasonably short period of time to reduce the risk of lost data in the event of a power outage (the sync interval). A high page-out rate doesn't necessarily imply memory pressure; it may simply mean some program running on the system is writing to files frequently. However, memory pressure may temporarily increase the page-out rate if the sync interval hasn't yet kicked in. Swap-outs, on the other hand, relate to anonymous memory pages (i.e. the heap). Swap-outs, in contrast to page-outs, are generally bad and indicate severe memory pressure.
- pooriaazimi 14y ago> Every OS guarantees that file-backed pages be committed within some reasonably short period of time Just curious: is that "short period of time" usually in order of seconds or minutes? (I know different OSes have different defaults; I just want to know a ballpark figure!)
- cellularmitosis 14y agoReiserFS on Linux was somewhat unusual in that it had a 5 second timer used to flush all of the dirty VFS blocks to disk. If I recall correctly, EXT2 (the previous popular filesystem) just flushed everything as soon as possible. The first time I installed a box with ReiserFS, I recall being alarmed by my box "ticking" every 5 seconds.
- IsTom 14y agoIt's there to keep disk from trashing the head around, so I believe it's not more than a few spins of the platters.
- pooriaazimi 14y ago
- Perceval 14y agoI am running Mountain Lion on a 24 GB ExpressCard (about 3 GB free) with 4 GB of RAM. After upgrading to Mountain Lion I am getting a "Hard disk is nearly full" message much more frequently. Almost never seen that on Lion. Could this memory management change be the culprit?
- chadrs 14y ago> addressed the memory pun intended?
- fields 14y agoNo, but that's funny.
- pooriaazimi 14y agoQuestion: (2009 15" MBP, 8GB 1333MHz RAM, 7200rpm HDD, Mountain Lion) I have zillions of apps open. 1GB wired, 3.25GB active, 1GB inactive, 2.55 free 757,197 Page Ins 0 Page Outs It's confusing... If I haven't "swapped out" (page out) anything to disk, then how come I've "swapped in" (page in) 750,000 pages from the disk?
- achivetta 14y agoIf you mmap a file, and then access the mmap'ed region, pulling in the pages of the file from disk is considered paging the file in. Watch the output of fs_usage to see examples of this.
- astrange 14y agoI would not describe this as "the memory management issues in OS X". It should be obvious to anyone how much of an oversimplification that is.
- cellularmitosis 14y agoI'm not so sure. When someone says "the memory management issues in OS X", I feel pretty confident in assuming specifically which problem they are referring to. There are some memory models which appear to behave in a way which is relatively psychologically pleasing, and some which do not. When users are using a program, there are certain times when they have a reasonable expectation that the machine is going to need some time to complete a task ("click and wait"). There are other times when they have no such expectation, and if the machine makes them wait, they get annoyed. It isn't about the total time they have to wait, its about whether that waiting occurs when they expect it to or not. Further, when they start to experience these unexpected, annoying pauses, they have a certain expectation that adding more RAM to the system should solve the problem, and when it doesn't, their annoyance only intensifies. Having used both Linux and OS X as a desktop, I'm going to claim that the Linux VM behavior is pleasing in the ways described above, and the OS X behavior is not. My understanding is that this is due to just one underlying behavior of the VM: When experiencing memory pressure, Linux (generally) favors evicting filesystem cache over swapping out stack/heap memory to disk, and OS X does not.
- unconed 14y agoIt's pretty hilarious that this is in one area in which Linux put the user first, while OS X has been plagued by the engineers saying "there is no problem" over and over again.
- deleted 14y ago[deleted]
- LoganCale 14y agoIt's much, much worse for me. Things go into Inactive memory, which is fine, but then it doesn't get freed when it's needed, or else it does so very slowly. So I have 20 MB of Free memory and 4 GB of Inactive and everything slows to an unusable crawl and I have to run `purge` to get my computer to start behaving properly again.
- tambourine_man 14y agoWe've been hearing this for a long time: “free memory is wasted memory” vs “inactive memory is never released” “Purge is the worst thing you could do” vs “Purge solves the issue” We have the kernels's source[1] and DTrace. Let's get some real data? [1]http://opensource.apple.com/source/xnu/xnu-2050.7.9/ http://opensource.apple.com/source/xnu/xnu-2050.7.9/