8 ms·
Something is deeply broken in OS X memory management
- jguimont 14y agoWhen time machine starts on my MBA ( to an external hd ) it almost freezes the Mac. Is this related?
- deleted 14y ago[deleted]
- deweller 14y agoI had a similar problems with my Mac slowing down to a crawl with certain instances of disk access. I tried turning off spotlight (which was taking a very long time to complete) but it did not help. For me, the problem turned out to be a failing hard drive. After replacing my system hard drive, things returned to normal speed. I'm just posting this in case it might help someone else.
- coffeedrinker 14y agoI concur. I've seen this exact behavior on two different systems when the hard drive was beginning to fail. Swapping the drive fixed the problem. My friend had installed a new larger drive that was causing the problem, whereas there were no beach balls while booting off the original drive via USB.
- collint 14y agoYou can run `purge` in a terminal to free your 'inactive' ram. I've set up a cron job to purge frequently, keeps thing humming.
- sabat 14y agoCmd line syntax, for the lazy, please?
- follower 14y agoCan you explain a bit more how this works? The `purge` command has a pretty short man page: > purge -- force disk cache to be purged (flushed and emptied) > Purge can be used to approximate initial boot conditions with a cold disk buffer cache for performance analysis. It does not affect anonymous memory that has been allocated through malloc, vm_allocate, etc. [This seems to talk about it more: http://workstuff.tumblr.com/post/19036310553/two-things-that-really-helped-speed-up-my-mac-and http://workstuff.tumblr.com/post/19036310553/two-things-that... On my 10.5 laptop it didn't seem to dramatically decrease the memory marked "inactive".]
- collint 14y agoyeah, it's not directly attacking your 'inactive' memory. Just the disk cache, which shows up in the chart as 'inactive'. I'm not familiar with other cases that fit into the 'inactive' piece of the pie. I have regularly seen 1-3G of ram get free'd up on a 'purge'
- eridius 14y agoThat's a terrible idea. `purge` is not a tool for freeing inactive ram. It's a tool for deleting the filesystem cache in order to simulate cold boot conditions for performance analysis. Yes, it has the side effect of reducing memory usage, inasmuch as it's throwing away stuff that was kept in memory. But that doesn't make it an appropriate tool to use.
- hughw 14y agoWhat's the downside? It worked for him.
- collint 14y agoYeah, I've had zero problems doing this for over a year. I used to get into swap hell every other day and now my life is beautiful and awesome.
- eridius 14y agoThe downside is it slows filesystem access down across the board until the caches get repopulated. So sure, go ahead and use it if you like having a slow filesystem. Caches exist for a reason. Deleting them willy-nilly tends to be a bad idea.
- wagerlabs 14y agoFrom my days of optimizing Firefox startup on the Mac, I remember that this doesn't work 100%. The only way to ensure that caches are 100% purged is to unmount the filesystem.
- jhspaybar 14y agoI too have noticed huge issues particularly when using photoshop or final cut pro. I figured it was the applications, but if it's the OS that's definitely a much bigger issue. I regularly restart every 2-3 hours when using those two programs heavily.
- w0utert 14y agoNot this again, we already went through this a few weeks ago. Back then, I thought the conclusion was that there is nothing broken about OS X memory management, and that with every 'fix' you come up with, you will just introduce another degenerate corner case. The same holds for any OS, trade-offs are made that may have some negative effect in some cases, to the benefit of the general cases. I don't recognize any of his symptoms anyway, and my OS X computers get pretty RAM-heavy use, with almost always a linux VM open, XCode, Safari with ~10 tabs, iTunes with a few thousand songs, etc. Edit: Just to be sure I read through some of the links he provides that are supposed to explain what is going on and why the fix would be of any help, but nowhere do I see any hard facts that demonstrate what is going on. Only that he 'saw in vm_stat that OS X was swapping out used memory for unused memory'. I'd like to see some actual evidence supporting this statement.
- gurkendoktor 14y agoThe thing is, Lion runs like crap without an SSD or insane amounts of RAM for many people. It doesn't help if it works for some, or even the majority. If anything, we need more people digging in OS X internals. I am sorry to use a tired analogy here, but Vista did work great for many too. I have two Macs, one brand new, one migrated from SL, and 10.7 Safari was almost unusable on both until I installed SSDs. If that isn't a negative effect in every possible use case, then I don't know one. I actually guessed it was just that Lion inofficially dropped support for HDDs (by removing all caches or so).
- ComputerGuru 14y agoI upgraded to an SSD while on Leopard, and was amazed at the speed. Snow Leopard continued to impress. Lion slowed things down terribly (even with the SSD!), but I have good news: ever since Mountain Lion DP2, it's been fast again.
- gurkendoktor 14y agoYes, I am a fan of ML so far too. Given that Apple has fixed none of my reported bugs in 10.7, but I can't reproduce many of them in 10.8, I wonder if it even makes sense to analyze 10.7 anymore - seems it's a done deal for Apple.
- chrisdroukas 14y agoDoes anyone else notice extreme time-based slowdowns using multiple monitors? I've looked through forums and system logs and I can't find an immediate explanation for it. The system tends to hang when using multiple monitors for any extended period of time.
- cydonian_monk 14y agoYes, but I'm using weaker hardware (2009 Mini w/ 2.2GHz Core 2 Duo) on two Samsung panels @ 2048x1152 each. It's improved and doesn't completely hang since I bumped it to 8Gigs of RAM, but there is still a noticeable amount of lag at times. Goes away completely on one panel. Not sure which chunk of the hardware or OS I'd blame first, as I'm hitting the limits of most everything. Little box wasn't bought (or intended) for what I'm using it for.
- yeureka 14y agoYes, ever since Lion I need to use the 9600m in my MBP instead of relying on the cooler running and less power hungry 9400m. Never noticed the ram problem, but there are other issues with Lion that I never encountered with Snow Leopard. For instance, sleep seems to take forever now and I can't use my external monitor without the fridge magnet hack. I might get downvoted for this, but my MBP seems faster and runs better on Windows 7 than on Lion at the moment. I hope ML improves the experience.
- mikeash 14y agoNo actual data, barely any technical discussion at all, mention of "the garbage collection algorithm" which most likely isn't even being used by most of the apps running, capped by a total cargo-cult solution... and this is #1 on the front page?
- Udo 14y agoAnecdotal data point (against the article): I have almost the same setup as this guy (2008 Mac Pro with 24GB and a 2011 MacBook Pro with 4GB), and even though I torture those machines with many hungry apps running concurrently, I haven't run into the same issues. Furthermore, I can't reproduce the high Inactive RAM count nor the high page-out activity, even after weeks of uptime.
- danieldk 14y agoThe post is (too) light on information, but I don't dismiss it immediately. Perry Metzger was very much involved with NetBSD (maybe he still is) as a developer. He might know a thing or two about memory management ;).
- mikeash 14y agoMetzger's post is much more subdued and interesting. IMO it would have made a much better submission. Link for the curious (it's linked from this article): https://plus.google.com/116685507294337280246/posts/camYp28M9St https://plus.google.com/116685507294337280246/posts/camYp28M...
- ralfd 14y agoI still don't quite grasp it. He is talking about page outs, but how is disabling the dyn-pager helping with that? Shouldn't page outs only happen when RAM is full? At my machine with 8 GB RAM and uptime of 4 days I have page outs of only 2 Megabyte. And page ins of 2 Gigabyte. P.S. I subscribe to your blog! * starstruck
- mikeash 14y ago
- DIVx0 14y agoI've experienced exactly the same thing that was described in this article. All the way though to installing more ram and disabling the dynamic pager (this is a late 2011 mbp). Like the author I was shocked at how accustomed I was to waiting for an app to become responsive again. I was trained to wait on the OS to do it's business before I could do my work. Now things happen as quickly as I can think to do them, this is how computing should be.
- munin 14y agothe OS X kernel is open source. so why aren't people reading it to figure out where this bug is?
- kevingadd 14y agoYeah, I'm sure if you just read the Darwin kernel there's a '#define USE_LOTS_OF_MEMORY 1' in there that you can change. The class of problems described in the original post are not the sort of thing you 'just find' by glancing at kernel source code. The problems described sound like they could be an issue of poorly tuned heuristics/thresholds, or necessitate some extra machinery inside the OS X memory manager that isn't there currently. It's not like you can send Apple a pull request on github.
- munin 14y agoyes I know, that's the point of my question ;) everyone is all positive about "open source" until they have to dive into a few millions lines of complicated system-level C code and then...
- wickedchicken 14y ago> and then... become immensely employable.
- RickHull 14y ago> yes I know, that's the point of my question ;) It's a facile point. > everyone is all positive about "open source" until they have to dive into a few millions lines of complicated system-level C code and then... Does anyone doubt that 99% of open source users never read a line of the source code which they are using? The point is, they have the opportunity to, and more importantly, the 1% (or whatever) with the skills and resources are able to actually do something about it. If you don't have the ability to change or examine the source code, then there is little incentive to do any runtime analysis which might illuminate the problem.
- jfb 14y agoBut given enough eyes all bugs are shallow! Are you implying that ESR is full of shit?
- digid 14y agoI also have major memory problems. 8GB RAM total in the system and I have 4GB sitting in inactive and it's paging out? http://imgur.com/VE4GB http://imgur.com/VE4GB At this point the system pretty much thrashes until I start closing apps or perform a manual `purge`
- chrisballinger 14y agoI have the same issue. This is unacceptable.
- bsimpson 14y agoI've been a Mac user since the beginning, and by far my biggest frustration is the perpetual running-out-of-RAM, even when I close basically everything. I have 4GB of RAM, and frequently catch kernel_task using at least half of it.
- nchuhoai 14y agoSeriously, I have the same problem
- fromhet 14y agoIsn't there anything to do about kernel_task using up so much memory? Since it's nonfree, is apple planning on doing anything about this?
- jfb 14y agoWhy shouldn't the kernel be using as much memory as possible? It's not like big disk caches or what have you cause your memory to go bad? As long as you get it back when you need it, who cares?
- krakensden 14y agoBecause he's not getting it back when he needs it?
- DrJokepu 14y agoRecent Windows NT kernels, recent Linux kernels and recent Darwin kernels will drop disk cache pages the moment something more important needs them. Memory management in modern kernels can be very complicated and just because it appears that a process does a lot of paging it doesn't necessarily mean that it needs more physical memory.
- spudlyo 14y agoThe notion that disk cache is so ungodly important that the OS will SWAP MY APPLICATIONS OUT TO DISK PRESERVE IT boggles my mind a bit. Users of desktop systems clearly don't like this behavior, in fact they'll do crazy things like purging disk cache via cron every minute to try to stop this from happening.
- deleted 14y ago[deleted]
- comex 14y agoAnyone have a radar number? This entire discussion is incredibly vague.
- tomc1985 14y agoI did this for awhile and ran into an interesting (if fatal) edge case: I use a 1.5tb external drive formatted in exFAT to minimize cross-platform headaches, and whenever the drive is marked dirty (improper shutdown, eject, etc), OSX will run fsck_exfat on it before I can use it. fsck_exfat isn't a huge deal -- or wouldn't be, if it didn't have a nasty tendency to leak RAM... the moment you plug in, fsck_exfat's footprint climbs up and up and up... never stopping! Pretty soon it's eaten up 8gb out of my 8gb RAM and poor ol' lappy is unusable. I can say with authority what happens when you run out of physical RAM in OSX: it hard locks. Nothing works -- no keyboard, no mouse, nothing. So, if you plug in your large, dirty (you dirty drive you!) exFAT-formatted external drive, with dynamic_paging switched off, and let fsck_exfat do its thing, your laptop freezes! Leaving the drive dirty, only to be re-scan on boot-up... freezing the laptop, leaving the drive dirty, only to be re-scan on bootup... EDIT: this is with Snow Leopard...
- andyzweb 14y agoexFAT is Microsoft proprietary shit.
- georgemcbay 14y agoThe problem isn't with exFAT, it is with fsck_exfat, which I'm fairly certain Microsoft didn't write. chkdsk on Windows manages to clean exFAT volumes just fine without using up 8gb+ of memory.
- tomc1985 14y agoyeah sometimes I'll boot into Windows just to clean the drives :-(
- tomc1985 14y agoyeah but its the only real alternative for R/W support in OSX and Windows for large volumes. I've had corruption issues with NTFS and HFS+ drivers :-(
- carguy1983 14y agoI have an 8-way Xeon Mac Pro w/ 20GB of RAM, almost half of which is 'free' at any point during the day unless I'm doing something really out of the ordinary. Yet it still swaps to disk ALL THE TIME and a new Terminal.app window can take up to 5 seconds to open. I really don't give a shit how it's not "technically" broken - that's broken from an experience point of view. And I haven't re-installed the OS (this was an App Store upgrade from Snow leopard) because that's a major pain in the ass as this is an actual workstation used to do actual work. I can't believe this is actually advice, either - that's what Windows users used to say in the 90s. Anyway, I guess I'm just ranting. OS X is wonderful except for the fact that it sucks at managing memory to keep a system snappy.
- sliverstorm 14y agoI can't believe this is actually advice, either - that's what Windows users used to say in the 90s. At least Windows, having gone through this particular growing pain, is nowadays fairly painless to reinstall. Did OSX ever improve that aspect of their product?
- rohansingh 14y agoYes. I reinstalled OS X on a couple machines do to various issues. I was extremely surprised at how nice the experience is. When I logged back in after the reinstall, Chrome even reopened with my old tabs in it.
- replax 14y agoNot sure if that is a good or a bad thing. Would really really annoy me, tough. If I reinstall an OS, I do it because I want a clean plate, everything back to "standard". Opening my old tabs in my browser tells me, that it kept various config/temp files, which is probably what I wanted to get rid of.
- msbarnett 14y agoIf you want to lose all of your user settings, create a new user account and nuke the old one. If you want to replace various bits of the system, reinstall the OS. These are different scenarios with different use-cases, and I'd argue it's a much worse idea to conflate the behaviours, as in certain other OSes, than OS X's fault for properly treating them as separate operations.
- spudlyo 14y agoWhat really needs to happen is that Spotlight and Time Machine need to use direct i/o (F_NOCACHE) when they read data from the filesystem, this way they won't pollute the disk cache with their reads and OSX won't swap out a bunch of pages in response. I think you could probably hack something together that does this with DYLD_INSERT_LIBRARIES (OSX's LD_PRELOAD) that would would hook the open system call and fcntl F_NOCACHE on the file descriptor before it hands it back to the application.
- lobster_johnson 14y agoThis is the correct solution. Time Machine and Spotlight should not pollute the OS cache.
- nirvana 14y agoI bet the odds are damn good that neither of them ARE polluting the OS Cache. That they are is just speculation from someone whose taken his experience and projected it onto everybody. Since he's a person who mucks around with random system settings (like the one in his article) there's no telling what previous damage he's done to cause this problem.
- spudlyo 14y agoYou might be right. In my testing, mdworker and friends behave like you'd want them to, I don't see them polluting the cache on my Lion machine. Haven't tried time machine yet. EDIT: I can't get either spotlight or time machine to show any cache polluting behavior at all, at least not in the way that I run them. I used "mdutil -E /" to force a re-index of my disk, and I kicked off an initial time machine backup on a secondary drive I had lying around. I see both backupd and mdworker doing a lot of disk reads using iotop, but top shows my inactive memory not really changing as drastically as I'd expect, like if I were to cat a giant file to /dev/null.
- reddit_clone 14y agoThis is an excellent suggestion that might actually solve whole lot of these issues. I hope Apple engineers are looking at this thread.
- DanI-S 14y agoI'm (fairly) uninformed on this, but from an initial read of the post it seems like memory management may have been optimized for SSD-equipped systems, at the expense of hard disk performance? Whether this is unintentional, part of a calculated tradeoff, or a cynical business/tactical decision is another thing.
- nirvana 14y ago1.5TB of spinning rust in my macbook pro, no observations of this problem. Did see something like it when I was using an SSD that was about to fail.
- hmart 14y agoThe only winners are those "Mac cleaner, keeper" apps whose Google Ads know we are all watching beach balls.
- puredanger 14y agoApple should really sell ad space on those beach balls.
- joeyh 14y agoAh, so it's some kind of hourglass/throbber display. As a linux user with a whopping 1 gb of ram on my laptop, I was puzzled by what that term meant. :)
- DavidAbrams 14y agoPinwheels.
- waivej 14y agoTry "Free Memory"... I looked for a solution to this problem a few months ago. My computer runs better if I free the memory every few days. For example, resuming a parallels virtual machine drops from 30 seconds down to 3-4. Note, this is a 4GB Core 2 Duo with SSD.
- kirbysayshi 14y agoMy completely non-scientific observations have found that OS X needs plenty of RAM, like any modern OS. However, any disk I/O task has a huge performance impact on the rest of the system, as described by this article. For example, something like unRARing a file will affect the entire system detrimentally, even if CPU usage is nominal. By affect I mean even the cursor can get jittery, which is normally unheard of on OS X. This typically affects me in low memory situations, such as less than 100mb of free memory. The effect is most pronounced when switching between browser tabs, which would cause a lot of disk usage... pulling all of that data in and out of non-ram cache.
- rdg 14y agoI fucking hate OS X Lion Vista. I really miss the stability of Snow Leopard. But can't easily go back.
- illicium 14y agoThere's a nice script[1] for tweaking OS X's dynamic pager settings to reduce the system's swappiness that helps a bit. Incidentally, if you have both an SSD and HDD installed, you can use it to move the swapfiles to the HDD to reduce wear. [1]: http://dropsafe.crypticide.com/article/3848 http://dropsafe.crypticide.com/article/3848
- fanf2 14y agoHave they not improved the dynamic pager parameters in the last two years?
- adityanag 14y agoDamm.. I turned swap off, and now I have 3 VMs running concurrently on my 2009 MBP with 8 GB RAM, and it's smooth! Before this, even one VM would cause the system to periodically become unresponsive. Ok, this is my _subjective_ opinion, and you can ignore it, but hey, it works for me.
- xpaulbettsx 14y agoThe core reason that this happens is that OS X uses a memory management mechanism called Unified Buffer Cache (http://kerneltrap.org/node/315 http://kerneltrap.org/node/315 is the only reference I can find on this). This seems like a good idea to unify paging and disk cache memory, but it actually isn't. This means, that if you do a lot of I/O, resident pages (i.e. your programs) can actually get pushed out of memory to free up RAM for the disk cache. This degenerates pretty badly in scenarios like using VMs, since you're also using large sections of mmap'd memory. This doesn't happen on NT or Linux, because disk cache can only be turned into memory (i.e. making disk cache smaller), not the other way around; the policy is "Disk cache gets whatever's left over, Memory Manager has priority" Unfortunately, the only thing you can really do about it, is have a machine with a huge amount of RAM, which will kind of help.
- zurn 14y ago> This doesn't happen on NT or Linux, No, NT and Linux also have unified VM. What BSD had pre-UVM was pretty antiquated.
- kfury 14y agoThank god for this article. My wife is a photographer making heavy use of Lightroom on her 17" MBP and has been experiencing these exact problems for a year or two. We've tried everything to fix it, rebuilding the system from scratch, to no avail. She had 4 gigs of RAM which we recently upped to 8gigs which reduced the severity of the problem. I really, really hope this is something that gets fixed in Mountain Lion. Tasks that should take 20 seconds take 10 minutes or more. It's good to know she's not crazy.
- nirvana 14y agoShe's not crazy, but she is running Adobe software on a machine without sufficient RAM. Adobe installs gods own cache of really crappy stuff that starts up at boot and who knows what kind of kexts they shove in there to make your machine unstable. I won't run any adobe software after I saw the abuse they did to my machine. Apple basically gets a free pass if you're running Adobe. This is a company that ships crap. Also, you're probably starving it of sufficient memory. If Lightroom is up, you're probably out of memory, even with 8GB. I'd recommend getting rid of Lightroom and going to Aperture, or given aperture is a bit behind the curve, upgrading to 16GB of RAM and seeing what adobe-installed processes and KEXTS you can get rid of.
- kfury 14y agoMoving from Lightroom to Aperture's not a possibility, given the workflow, experience, and catalog data she's built up in Lightroom over the years. Upgrading from 4 to 8 gigs last week helped a lot. I'd go to 16 except her MBP won't support it. I'd love to get her on an SSD but she's on a 1tb drive now and it would be hard for her to try and fit into a 512gb SSD now (especially now that she's on the D800 with huge video files and 72mb raw photo files. It's frustrating that it will work find some of the time and not others, implying that the problem could be fixed with better memory management. I do hope that a serious Adobe competitor arises to force Adobe to make its apps faster and more resource efficient.
- batista 14y ago>Moving from Lightroom to Aperture's not a possibility, given the workflow, experience, and catalog data she's built up in Lightroom over the years. Forget the advice. Lightroom is faster, as noted in every review of both programs. Try Aperture yourself with the demo to find out. Working with 10+ megapixel images is always going to be slow, and with camera advances, it will get worse every time your wife gets a higher resolution camera --so comparing it with how it used to be when you have 6mp files is not exactly correct. More memory and an SSD will definitely help.
- nirvana 14y agoThis claimed problem is not adequately described-- because I don't see it. Therefore there is something else going on here. I have 8 GB of memory on my Macbook Pro, and I've never seen anything like the problems described in this article. I leave my machine up for weeks at a time, I leave the Time Machine drive connected for weeks, and never have a slowdown, even when time machine is backing up. The only time I have memory issues is when I have too many safari tabs open for too long. Eventually safari takes too much memory. So, I shut down safari and start it back up-- it opens up all the tabs that were open and takes a lot less memory. I'm kinda astounded that people with 20 and 32GB of RAM and 8 CPUS are saying it takes 5 seconds to open a terminal window. Have never seen anything like that. I would venture to guess that these people who are seeing the problem are running a kernel extension or possibly have otherwise modified their machine.
- 9oliYQjP 14y agoRunning your setup and I've seen this problem only with VMWare Fusion running. But they have KB article (http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1038864 http://kb.vmware.com/selfservice/microsites/search.do?langua...) which discusses what they're doing. VMWare Fusion won't let go of memory allocated to a suspended VM, only to a VM which has been fully shut down. The rationale is that the user might unsuspend the VM so it's a performance tweak. But I never use my VMs this way, so I've resorted to shutting down my VMs and everything is back to being snappy.
- hollerith 14y agoInteresting tangent: Plan 9 never had "dynamic paging" (swapping to disk). It supports virtual memory, but not swap. This information is accurate as of about 6 years ago (when I stopped following Plan 9).
- algoshift 14y ago> OS X is wonderful ROFL
- algoshift 14y agoI guess the point of the short comment was lost: How can anyone say that any of the current crop of OS's is "wonderful"? Wonderful? Really? Whether you use Windows or OSX (or both, as is my case) you can probably rattle off a sizable list of how these OS's have gotten screwed-up by their respective publishers. Someone saying "<OS name> is wonderful" and then going on about the reason it actually isn't is very funny. Again, the comment was OS agnostic even though the thread is about OSX.
- United857 14y agoI've gotten a lot of his symptoms, and there might be another cause: http://reviews.cnet.com/8301-13727_7-20064489-263.html http://reviews.cnet.com/8301-13727_7-20064489-263.html Bad blocks in the disk, causing the system to beachball frequently due to disk I/O failures when swapping out to disk. The solution for me was to back up, reformat the disk and zero-ing out everything causing bad sectors to get remapped, and then restore.
- DavidAbrams 14y agoI have to say, I was experiencing a shitload of disk thrashing on my iMac, and eventually decided to replace the drive. So I did the whole ridiculous suction-cup routine (yeah, that's Apple "elegance") and replaced the drive. Problem resolved. Not that I don't still get inexplicable pinwheels, but nothing like before.
- jmah 14y agoI've had problems with mtmd (Mobile Time Machine) really slowing down writes (and all disk stuff) since the Lion pre-releases. With that off (sudo tmutil disablelocal) things are pretty smooth.
- wagerlabs 14y agohttp://wagerlabs.com/blog/2008/03/04/hacking-the-mac-osx-unified-buffer-cache/ http://wagerlabs.com/blog/2008/03/04/hacking-the-mac-osx-uni... It's called the Unified Buffer Cache (UBC).
- lattepiu 14y agoSomething is quite wrong indeed. I disabled the dynamic pager, and now my system is working as it's supposed to. Snappy and responsive. I opened all of my apps, expecting it to crash miserably: instead, the system started paging as it should, stayed responsive (though slower), and promptly returned to normal once it regained memory. I don't know what's going on, but I can definitely say that this is how I want my computer to work.
- marcamillion 14y agoAnyone have any nice articles with tips on how to generally optimize OS X? Esp to better handle this paging/memory management problem that the OP is talking about. I have a MBP with 4GB RAM and leave programs open all the time. After a few days, it feels very sluggish. Aside from double my memory and changing my habits (i.e. shutting down every night), how do I fix this?
- forgetcolor 14y agoi don't understand why anyone who cares about performance doesn't at least max out the RAM, let alone use an SSD as their boot disk. sure, the SSD is expensive, but the RAM? dirt cheap. i only wish the MBP could take more.
- daemeh 14y agoI don't have any tests to prove this, but switching from a 64-bit kernel to a 32-bit one and forcing apps to run in 32-bit mode helps a lot with memory usage on OS X. You can use this app to switch apps to 32-bit: http://www.macupdate.com/app/mac/40405/sixtyfour http://www.macupdate.com/app/mac/40405/sixtyfour If you look at Windows 7 memory consumption with the same set of software you use in OS X, you'll notice memory usage is 1/2 or 1/3 on Windows compared to OS X. Maybe someone knows why that is?
- kghose 14y agoAwesome. The thread is more informative and entertaining than the article! This is Hacker News!
- KC8ZKF 14y agoIt occurs to me that HFS might be the real culprit. A lot of the bad behaviors described here involve heavy disk use. John Siracusa has a nice round-up of all the HFS faults: http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars/12 http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.a...
- herf 14y agoI think this is the penalty we pay for the advice from two years ago: "Buy all your developers SSDs. It makes them more productive."
- rangibaby 14y agoDisabling dynamic paging as suggested in the fine article seems to have made some apps that constantly gave spinning wheels before (Firefox, Time Machine backups) some extra speed. However, it's still early days. It might just be a "washed car effect." (Mac Pro 1,1 / 7GB RAM / WD Caviar Black)
- gulbrandr 14y agoPlease: font-size: 16px; line-height: 1.5em;
- commononsense 14y agoIt really doesn't matter if it's broken. Apple already has your money. Food for thought: When something like this happens to a free OS, like NetBSD, to which Mr. Metzger has been a longtime contributor, it usually gets fixed rather quickly. I haven't run with disk swap in many years. With FreeBSD, you need to at least configure swap on a /dev/md, but it doesn't need a real disk. The FreeBSD kernel may panic otherwise. With NetBSD you don't even need a md. It is nearly impossible to get the kernel to panic from memory starvation. These are "free" systems. What did you pay for your MacBook Pro and it's amazing GUI?
- napierzaza 14y agoI can't believe how amazing this fix has been. My cursor is insanely fast now. I was used to deleting text by holding the delete key for some time as it slowly deleted character by character. Now it simply buzzes so fast that I am deleting whole words in an instant. Not to mention terribly laggy CLI response when running simple commands. I realized that there were maybe some issues, but I didn't think a single command would give so much of a speed gain. Now if I could only figure out how some of my files revert to previous saves, losing data...