How OS X “Mavericks” works its power-saving magic
arstechnica.com
arstechnica.com
It sounds like the OSX version is more of a "forced timer coalescing" feature.
Seriously? I can't say I've had an app use more than 3-5% of my CPU while it was sitting idle. I don't think it has anything with my OS. Is this what others are experiencing?
Turning on plugin click-to-activate is good for power, too, not just security.
Safari 6 has been a major resource hog. But I can't stand that ugliness of Chrome. Solution while the next iteration doesn't solve this: close tabs or add ram.
2% of a contemporary processor it alot more than 2% of a 10 year old one.
So is Mail now doing alot more in the backgound than before? Or is this some artifact in the way CPU utilitation is measured?
So, the CPU usage of Safari totally depends on what websites you happen to have open.
http://www.ambrosiasw.com/ambrosia_times/january_96/3.1HowTo...
MagnaRAM worked by replacing a portion of Windows' virtual memory system. MagnaRAM would insert itself in the string of Windows Programs that determined what pieces of RAM will be moved to the hard disk. Instead of writing directly to the hard disk, the information to be written would go to MagnaRAM's own buffer as this was a faster process. During CPU idle, MagnaRAM would compress the information in its own RAM buffer. When the RAM buffer becomes full, it is then swapped to the hard disk taking both less time and less space
Sounds very similar to zram on Linux. Virtual memory always seemed like a black art to me.
Will this technology be intelligent enough to know a network server process (e.g socket syscalls)? Will there be a user method to override/exclude this optimization on processes where this has an undesirable effect?
I think another good idea for OS developers is to push the concept of fibers more over threads. Often a multi-threaded application can be re-patterned to use fibers for immediate CPU optimization.
It sounds like a great OS improvement, especially coupled with SSDs. But I'm hoping we can turn the magic off for certain processes when the magic gets too crazy.
The answer to this is in the article: yes.
BTW, "developers can explicitly make an app ineligible for App Nap by using the existing IOKit IOPMAssertion API (used today in OS X to prevent the system from sleeping while an app is busy)."
> App Nap reduces power consumption by completely suspending your app’s execution when it meets certain criteria. This ensures that your app does not periodically wake up to do unnecessary work. An app is considered to be a candidate for sleep if:
> * It is not visible—if all of an app’s windows are either hidden by other windows or minimized in a hidden dock, and the app is not in the foreground
> * It is not audible
> * It has not explicitly disabled automatic termination
> * It has not taken any power management assertions
> When all of these conditions are met, OS X may put the app to sleep. While asleep, the app is placed on a scheduling queue that rarely gets actual time on the CPU.
There are also new methods provided on NSProcessInfo to temporarily prevent sleep and increase scheduler timer precision.
> Note: If you experience problems with App Nap, you can temporarily disable it for a particular process by typing:
> defaults write <app domain name> NSAppSleepDisabled -bool YES
> Immediately file a bug describing the app and explaining how to reproduce the problem.
At no point did I imply that. I was replying to eddieplan9's declaration that
> Timer Coalescing - is the only one that has the potential to alter application behavior
by noting Apple thinks App Nap may do so.
defaults write NSGlobalDomain NSAppSleepDisabled -bool YESPower Nap is the marketing name of the previously-released (in 10.8) feature whereby a Mac in sleep mode still does things like check email, update calendars, perform automatic photo downloads, etc.
AFAIK zram is using LZO compression. According to some tests it is about the same efficiency as WKdm (used in Mavericks) but it has bit slower compression speed [1].
zram is an experimental kernel module since 3.2 and can be installed: [2], [3], [4].
[1] WKdm vs LZO http://terpconnect.umd.edu/~barua/matt-compress-tr.pdf
[2] Gentoo zram http://wiki.gentoo.org/wiki/Zram
[3] Arch zram https://wiki.archlinux.org/index.php/Maximizing_Performance
[4] Debian&Ubuntu zram http://gionn.net/2012/03/11/zram-on-debian-ubuntu-for-memory...
I was going to say that this is crazy: why waste RAM to hold swap space, when you could use that RAM to avoid swapping in the first place. I still think it'd be odd to reserve a significant chunk of your memory for it. But I can see how it'd be pretty cool if you can manage it dynamically, ie. only start compressing memory as you run out of it to avoid hitting the disk.
Of course the usual rule still applies: if your PC swaps often, get more RAM; or if the RAM is not upgradable, go back in time and buy a machine with more RAM, then smack yourself on the head for not doing so in the first place. :)
Because you can get faster performance, and more importantly lower energy usage, on the same hardware.
Note that you need kmod–staging from RPMFusion.
"App Nap" is a familiar concept to anyone who has ever played a game with unfocused framerate caps (like most MMOs, for example). It being enforced by the OS may be new, though. It kind of feels like a more aggressive `nice` though.