Saturday, October 08, 2011
Windows 8 To Use Less Memory Than Windows 7
|You are sending an email that contains the article
and a private message for your recipient(s).
(At the moment, only Text is allowed...)
Fundamentals such as memory usage represent a key engineering tenet of Windows 8. In building Windows 8 Microsoft set out to significantly reduce the overall runtime memory requirements of the core system.
This is always for everyone and especially in a world where people want to
run more and more apps at the same time or run on systems with only 1 or 2GB
Microsoft is delivering the complete Windows 8 experience on SoC-based
devices characterized by low power consumption. This makes it even more
important to leave lots of memory available for multiple concurrent apps and
to sustain the overall responsiveness of devices.
The company made a ballpark comparison of Windows 8 vs. Windows 7 memory use
by installing both operating systems on a 1GB RAM machine (minimum OS RAM
requirement) and compare them when they've been rebooted multiple times, and
then idled for a while. The system used in this test was an off-the-shelf,
first-generation, ATOM-based netbook.
The Windows Task Manager contains the main view of system memory through its
"In Use" statistic. The below graphics compare memory consumption on a 3+
year old netbook running Windows 7 at idle, and then with the same machine
running Windows 8:
Microsoft has made hundreds of specific changes to minimize OS memory use in
Windows 8. For example, when assessing the contents of RAM in a typical
running PC, many parts of memory have the same content. The redundant copies
of data across system RAM present an opportunity to reduce the memory
footprint even for services and OS components. Applications will sometimes
allocate memory for future use and will initialize it all to the same value.
The application may never actually use the memory as it may be there in
anticipation of functionality that is the user never invokes. If multiple
running applications are doing this at the same time, redundant copies of
memory are in the system. Memory combining is a technique in which Windows
efficiently assesses the content of system RAM during normal activity and
locates duplicate content across all system memory. Windows will then free
up duplicates and keep a single copy. If the application tries to write to
the memory in future, Windows will give it a private copy. This approach can
liberate 10s to 100s of MBs of memory (depending on how many applications
are running concurrently).
OS services configured to run all the time are a significant source of
ambient memory use. When assessing the set of OS services during Windows 8
planning, Microsoft decided to remove a number of them (13), move a
different set of services to "manual" start, and also made some of the
"always running" services move to a "start on demand" model. This is where a
"trigger" in the OS (like device arrival or the availability of a network
address) causes the following to occur:
The service starts.
The service does its thing (whatever that happens to be).
It hangs around for a while to make sure there isn?t anything else to
The service goes away.
Plug and Play, Windows Update, and the the user mode driver framework
service are all trigger-started in Windows 8, in contrast to Windows 7,
where these services were always running.
Of course Microsoft has added a new functionality (and new code) to Windows
8. Some of this new functionality is packaged in the form of new services.
Of these new services, two are auto-started; all others are manual or
As Windows executes applications and performs its own system housekeeping,
program files and data are loaded off the disk into main memory. During
Windows 7 and Windows 8 development to date, Microsoft analyzed the pieces
(pages) of memory during normal execution and how often they were
referenced. The idea here is that if you're going to pay the price for
allocating a piece of memory, you'd better be using it (referencing it)
often. If you're not referencing that memory often but need it, consolidate
it with something else.
Windows 8 will feature both the Metro style UI and a classic PC desktop
environment. From a memory perspective, Microsoft has taken advantage of the
fact that there will be some set of devices on which users will stay in the
Metro style UI almost all the time. In this instance, Windows 8 will only
initialize OS components unique to the desktop environment when necessary.
This is another source of memory savings, approximately 23MB right now.
Windows 8 has also a better scheme for the prioritization of memory
allocations made by applications and system components. This means that
Windows can make better decisions about what memory to keep around and what
memory to remove sooner.
For example, antivirus programs (AV) do various checks on files when they
are being opened by other programs. The memory that the AV program allocates
to check virus signatures is usually a one-time allocation (it is unlikely
that specific memory will be needed again). On Windows 7, the memory is
treated as if it had the same priority in the system as other memory (say,
memory allocated by a running instance of Microsoft Excel). If memory became
scarce, Windows 7 could end up removing the memory that helps another
running application (like Excel) stay responsive for the user, which
wouldn?t be the best choice for system responsiveness in this case.
Last but not least, in Windows 8, any program has the ability to allocate
"low priority." This is an important signal to Windows that if there is
memory pressure, Windows can remove this low priority memory to make space,
and it doesn't affect other memory required to sustain the responsiveness of