A New VM

By Danny Kalev, ITworld |  How-to

The Story So Far
The original kernel 2.4 Virtual Memory (VM) manager (known as the Rik
Van Riel VM, or RVR VM) suffered from serious problems. Long spinlocks
would block a CPU for relatively long periods of time on a
multiprocessor machine; in order to perform swapping, the required swap
file was at least as large as the system's RAM; and servers with 8GB of
RAM had to allocate at least 9GB of disk space to enable swapping. Up
until kernel 2.4.7, machines with minimal RAM would suffer from
sudden "swap storms" that would practically freeze the system. Due to
these problems and others, quite a few Linux shops have refused to
upgrade from kernel 2.2.19 to 2.4. A few weeks ago, Andrea Arcangeli
decided to write a new VM from scratch.

The New VM
Arcangeli's main goals were to fix known bugs, improve the overall VM
performance, and simplify it. The new VM (known as the AA VM) divides
physical pages into active and inactive pages. These pages are then
subdivided into dirty and clean pages (a dirty page is one whose
content has been modified). When the active dirty pages comprise 66% of
the total pages, the VM looks for the oldest ones and reclassifies them
as "inactive dirty". These are later moved to the swap when memory
becomes scarce. In addition to the noticeable performance improvement,
the swap under the AA VM is additional to the RAM, just like in 2.2
times.

The incorporation of the AA VM into kernel 2.4.10 onward triggered a
debate among the kernel community. While Linus Torvalds endorses it
wholeheartedly, Alan Cox's Linux tree adhered to the original VM.
Fortunately, Torvalds and Cox have finally agreed to adopt the AA VM in
future kernel releases.

The AA VM and You
The transition to the AA VM can affect you as a user in various ways
including performance tuning, system configuration, third-party
applications and libraries, clustering, and hardware compatibility. As
always, be cautious and prepare to deal with surprises when upgrading
to 2.4.10. Although the AA VM looks very promising, it probably has its
own bugs and glitches that will be discovered and fixed in future
kernel versions.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Answers - Powered by ITworld

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question
randomness