Any sane operating system has to write dirty pages to disk from time to
time.
Unfounded presumption.
If the system were to experience a non-recoverable fault and
reboot, then any dirty pages will be lost as memory is cycled.
.... Which we don't care about
Keeping
a large number of dirty pages in memory is really pretty silly,
especially since the cost of a combined write is relatively small.
Even worse is perpetual writies to a mechanical storage
device. "Cost" is cumulative, as well as consuming power,
putting wear on a drive.
Moreover, even if you had a UPS and could keep dirty pages around
indefinitely, you really are much better off with consistent write
backs.
UPS? You seem to be implying it's the AC power, not windows
or an app. fault, which isn't as likely.
You've also ignored the other reasons for disk writes,
presuming it's only a pagefile issue. The issue is that
windows writes to the HDD at all, ever. Virtual memory
implementation is but one problem.
If you keep too many dirty pages around, you could lock the
system up when you try to write them all back; this situation is
analogous to garbage collection.
So the whole problem is the HDD writes in the first place.
The best user experience is when the
GC occurs every X time periods in the background, rather than pausing
all execution to do GC. No interruptions or usability degradation that
way.
"User experience" is best when an OS doesn't build more and
more bloat on top of itself until there's no way to control
what happens. The pagefile logic tries to be a
one-size-fits-all, presuming a system won't have enough
memory to run the jobs, when these days it usually does
because most is allocated but never actually used.
An active hard drive consumes 2-3W, the infrequent disk activity due to
windows uses 0.2W, that's a factor of 10-15x difference.
Windows has FREQUENT disk activity, and it either keeps the
drive spinning or constantly spins it up and down again
(futher degradation in performance). What it does is
constantly cause the drive to not go into any deep state of
power management, so there's no 10-15X at all, Windows'
design itself is the CAUSE, not a savings of power.
So it describes what I had already, that windows writing
uses more power that if it didn't, and keeps the drive
spinning which uses even more (albeit a minor amount) power.
No. Any modern laptop can drop the bus between the northbridge and
memory, the northbridge and south bridge, or the south bridge and
memory into a sleep state where almost no power is used. It's really
not that hard, and for Intel chipsets it's standard practice.
You mean when the system isnt being used, which is not what
we were talking about... or at least not what most people
would be talking about, it is obvious enough that a laptop
uses less power when in a higher power management mode.
The bottom line is that more memory is always good for performance and
power efficiency. You should add more memory to the system and not
sweat about losing bandwidth.
Often more memory improves performance but if we are looking
at a goal of improving performance then more memory may not
be the answer. Blindly adding it may raise latency, and
overall it would be a bit too quick to assume that in
today's PC or laptop, the typical 1GB isn't enough for the
most common uses (web, office, email, etc). Certainly it's
easy to exceed 1GB *need*, but this is assessed on a
use/user by user basis, blindly beefing up a system is going
to have a practical diminishing return, and that often
before the system has max memory possible, installed. If
we could stop windows from wastefully writing to HDD, then
it would be better to have the extra memory but
unfortunately Windows doesn't give us that choice, it's
written to run on low spec systems at the expense of better
spec systems.