Hacker News new | ask | show | jobs
by saltcured 1858 days ago
The RAM probably uses more power just by having more installed, but it shouldn't be causing more expensive work. If anything, being able to use RAM cached content should allow the SSD and its IO channels to idle more often. A "decked out" laptop might also have a more powerful GPU with nowhere near as good idle power characteristics.

But, the largest differences are probably in idle power management, with the phone having much lower power IO channels and better zoned power management to really reduce idle power. A laptop often has the system in a much higher power level with off-chip resources powered up, including WiFi, screen refresh, data buses, and backlight driving a much larger screen area.

Edit to add: I've noticed on laptops with Linux that vastly different battery life from "similar" machines come from differences in how the software and firmware interact to reach different powersaving modes for screen on but idle states, such as with a browser open on a page that has already rendered and awaits user input.

1 comments

That’s not quite accurate. When you’re talking about standby time in suspend-to-ram, RAM refresh is actually a non-trivial battery cost because it’s basically you’re only active power draw remaining. Which DIMMs have active memory pages is a partial function of memory usage.

So if your kernel woke up (let’s say after 30 min of suspend to ram) to try and see if it can reclaim physical DIMMs and mark them unused (shrink caches, reorganize pages, etc) you could get quite a big win on standby time. The trick is how to do this without actually hurting battery life (waking up can be expensive and there’s no guarantee you’ll be able to free up DIMMs) and preserving wake from suspend performance (if you’re phone is laggy on wake that’s an experience users will switch away from + you could eat your entire power savings paging back in).

Is the memory controller aware of unused pages in physical RAM that thus can be safely skipped during refresh? That would surprise me. In stand-by the self-refresh mode is used, and I believe partial refresh is only supported by the low-power (LPDDRx) standards and is very coarse-grained.
No. What I heard proposed was just at the DIMM level. The memory controller has no concept of memory usage.
The refresh costs you are talking about are what I meant by the RAM has cost by being installed on a typical laptop. The power is used because the machine is in an active-idle power state with that much RAM installed, not because the OS has decided to burn more CPU time in the presence of more RAM as someone suggested earlier in the chain. Most of the idle power consumption is all the ancillary system controllers, not the CPU cores themselves. These are the things that are better managed on a typical smartphone SoC platform.

And, I am referring to active idle, not suspend-to-ram scenarios. I think people are talking about screen-on time for battery life, not lid closed and suspended nor lid open but screen disabled. Precious few people are enjoying a laptop that successfully performs a suspend to RAM sleep state while keeping the display alive. Often, the integrated GPU is continuously scanning framebuffers in system RAM and outputting pixel data to the embedded display port even though nothing is changing on screen. Frequently, drivers have disabled LCD panel self refresh modes due to unresolved glitches and artifacts in the graphics stack.

Yup. One of the major reasons cell phones outperform laptops on battery life is because they go to suspend to RAM aggressively. I think a similarly aggressive mode would be needed for laptops on battery power to compete effectively (& might require OS optimizations to make the wake scenario to be as instant as it is on mobile).