LINUX TIPS AND TRICKS --- November 09, 2001

Published by ITworld.com -- changing the way you view IT
http://www.itworld.com/newsletters
_________________________________________________________________

A New VM
By Danny Kalev

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.


About the author(s)
-------------------
Danny Kalev is a system analyst and software engineer with more 
than 10 years of experience, specializing in C++ and 
object-oriented analysis and design on various platforms 
including VMS, DOS, Windows, Unix, and Linux. His technical 
interests involve code optimization, networking, and distributed
computing. He is also a member of the ANSI C++ standardization 
committee and the author of ANSI/ISO C++ Professional 
Programmer's Handbook (Que, 1999). Danny can be reached at 
linuxnl@excite.com.
_________________________________________________________________

ADDITIONAL RESOURCES

Linux 2.4 Virtual Memory Overview
http://itw.itworld.com/GoNow/a14724a46138a76537031a2

Compressed Caching: Linux Virtual Memory
http://itw.itworld.com/GoNow/a14724a46138a76537031a3

Virtual Memory Manager
http://itw.itworld.com/GoNow/a14724a46138a76537031a1

Understanding Virtual Memory Manager Interfaces
http://itw.itworld.com/GoNow/a14724a46138a76537031a0
_________________________________________________________________

ITWORLD.COM NEWSLETTER ARCHIVE

Index of Linux Tips and Tricks
http://www.itworld.com/nl/lnx_tip/

Alias Physical Files
http://www.itworld.com/nl/lnx_tip/01122001/

Newsgroups
http://www.itworld.com/nl/lnx_tip/01052001/
_________________________________________________________________

CUSTOMER SERVICE

SUBSCRIBE/UNSUBSCRIBE:
- Go to: http://www.itworld.com/newsletters
- Click on "View my newsletters" to log in and manage your
  account
- To subscribe, check the box next to the newsletter
- To unsubscribe, uncheck the box next to the newsletter 
- When finished, click submit

Questions? Please e-mail customer service at: 
mailto:support@itworld.com
_________________________________________________________________

CONTACTS

* Editorial: Andrew Santosusso, Newsletter Editor, 
  andrew_santosusso@itworld.com

* Advertising: Clare O'Brien, Vice President of Sales, 
  clare_obrien@itworld.com

* Career Corner: Janis Crowley, Vice President/General Manager,
  IDG Recruitment Solutions, janis_crowley@itcareers.net

* Other inquiries: Jodie Naze, Senior Product Marketing Manager, 
  jodie_naze@itworld.com
_________________________________________________________________

PRIVACY POLICY
ITworld.com has been TRUSTe certified 
http://www.itworld.com/Privacy/

Copyright 2001 ITworld.com, Inc., All Rights Reserved.
http://www.itworld.com

