Sometime back Engadget showed a video of Windows 8 Developer Preview running, with full Aero, on just 128 MB of memory on the BootCamp virtualization software on a Mac. The video is embedded below.
Now a Softpedia writer revealed that she has successfully run the same Windows 8 build on half the RAM – a mere 64 MB. “As expected, Windows 8 was not exactly usable at just 64MB RAM. But then again, you can’t take out half the engine of a car, put bike pedals in, and expect it to run under normal parameters”, wrote Marius Oiaga.
“Windows 8 boots amazingly fast even on an abysmal 64MB of memory. So far so good, especially considering that I wasn’t even expecting the operating system to start at all.
I slid the lock screen out of the way and entered my password. The next stage took a bit of patience on my behalf. But since Windows 8 did not appear to crash or to stop responding, I stuck by it.
Approximately 10 minutes later I got to the Start Screen full of beautiful tiles for Metro apps.”
Recently Microsoft wrote in a blog post about memory optimization in Windows 8 to allow even low-end machines that pre-dates Windows 7 to comfortably run the new operating system.
We wanted to ensure that people running on Windows 7-era hardware would have the option to easily upgrade their existing machines to Windows 8 and take advantage of the functionality it has to offer. We also expect that many machines that predate the Windows 7 release will run Windows 8 based on the experiences we’ve had with older machines we intentionally keep in our performance test infrastructure.
One of the techniques Microsoft implemented to reduce memory consumption is Memory Combing.
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. All of this happens under the covers in the memory manager, with no impact on applications. This approach can liberate 10s to 100s of MBs of memory (depending on how many applications are running concurrently).
Another technique is the ‘start on demand’ model.
When assessing the set of OS services during Windows 8 planning, we …. 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 do, and
The service goes away.
Windows 8 also can make better decisions about what memory to keep around and what memory to remove sooner.
For example, antivirus programs 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.
In Windows 8, any program has the ability to allocate memory as “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 the system.