![]() To enable hibernation, the command is as follows: sudo pmset -a hibernatemode 3 To disable hibernation, in the Terminal, the command is as follows: sudo pmset -a hibernatemode 0 ![]() #Macos disable quick note codeIf you disable hibernation, then run your battery low and can't charge, just have the code handy to enable hibernation! No physical harm to the laptop, just a loss of productivity. This will be equivalent to a forced hard restart. The downside risk: if your battery dies while your laptop is sleeping, your current state will be lost. The solution in each case is to disable hibernation, and then delete the sleepimage file that is as large as your installed RAM (8GB in my case). That writes 48GB of data to my SSD daily. My laptop sleeps a half dozen times/day easily. Just throwing in my 2 cents for those who wish to disable swap BECAUSE of small SSDs: the sleepimage uses far more disk space.Īnd, for those concerned about the limited life of the SSD (particularly those with MBA's and hard-wired SSD chips that CANNOT be replaced), if your computer sleeps many times per day, the rewriting of the sleepimage may be a concern. I realize that I can't have as many apps open at once because of this as stated by others but I'm able to work with that. The rare occasions of that happening and the speed up in general makes it worthwhile to keep the swap file disabled for me. The few times I have had apps with memory leaks use up all the RAM, I did have to do a hard reset. #Macos disable quick note freeI make sure to monitor my 4GB memory usage with iStat Menus and use an Automator script with the "purge" bash command (requires Xcode to be installed) to clear out inactive memory and open up more free memory frequently. The average user doesn't even use 10GB/day. Bigger sized drives will last even longer. If you're doing it simply because you're afraid of wearing out your SSD please see: and Intel rates their drives for over 20GB a day, every day, for up to 5 years on a 80gb drive. SSD lifespans aren't actually as bad as people try to make them out to be though. I do not have a SSD but a slow 5400rpm disk. Wired usage does get out of control after a week or so but a simple reboot fixes that. I have disabled the swap file on SL and Lion because the performance increase works for me. Your case with a SSD could be different, so do let us know if you try it. #Macos disable quick note macMany people choose to run without swap so that they get a memory allocation error rather than let their mac start paging since that can slow down a machine when things aren't running smoothly. This is not always so, and at times when the system is thrashing or paging - you can have the opposite. I would keep my swap on even if I knew for certain I had to pay for a new drive annually. If you have a backup and time to experiment, why not turn it off and see how your experience changes. Each program thinks it has a private copy of all the code it needs, but when virtual memory exists, the system has a nice way to map the same physical RAM to different programs.ĭisabling swap prevents the mac from using a tiny portion of your drive as a cache for some memory that has been calculated but the program wasn't smart enough to write those results itself to a proper cache. Having virtual memory means that the system can run substantially faster and use less RAM when many programs use the same common library code. The reason you can disable swap is so the system can run on read only media such as a CD, DVD, locked network image using NetBoot or a read only USB fob like the new Lion installer or recovery fob that ships with some macs that lack optical drives. You have two great answers that explain why this is a bad idea in almost all cases where the system can write to a storage device. If I hadn't been able to ssh in from another Mac to kill several apps remotely, I'd have had to hold down the power button. This was hiding behind the full-screen game, so the system just locked up. While playing Civilization IV (a large, full-screen game), the system ran out of hard drive space (~50 megs free) and presented the "kill apps now" window. ![]() The latter I've experienced (with the swap file enabled) when running out of disk space. If you disable it, you may not be able to run as many programs at the same time (and the limit is far lower than you'd expect) or you may have issues (like freezing and having to hard-reboot the machine) when you run out of memory. The swap file is there for when your running programs consume more memory than you have physically installed. ![]() It is almost always a HORRIBLE, HORRIBLE idea to disable your swap file. That said, this is definitely a case of premature optimization. Swap files can be written to frequently, possibly causing disk fragmentation (as well as file system fragmentation) and, eventually, possibly causing the disk to fail sooner. The reason they disabled the swap file is likely paranoia about SSDs having a maximum number of writes per block. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |