Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home > News > Linux

April 25th, 2007, 10:44 GMT · By Roxana Popa

New Linux Memory Map

SHARE:

Adjust text size:


Tux wallpaper
Enlarge picture
Matt Mackall has recently released at the Embedded Linux Conference, a set of patches that improves the way memory usage information is made available.
The memory usage process on Linux is complicated and it deals with many direct or indirect factors. The most commonly used tool to get a memory usage report is the ps tool, which outputs information about processes, such as the process id (PID), the current running state(S), VSZ (virtual set size) and RSS (resident set size). But the information reported by ps does not exactly represent the real current memory usage of a process, but more like an estimation of how much memory a process would use if it is the only one running.

More detailed questions, such as which are the parts taking up most memory, are even harder to be answered. Matt Mackall's project is intended to fix this up and provide some more usable information on the memory usage report.

The way Matt's patches work is quite simple, and logical. First of all, there is a file called pagemap added to each process' directory that contains the page frame number for each page in the process's address space. This file provides even comparisons between processes to see the shared pages.

The /proc/kpagemap file is used for providing information on the kernel's memory map, as kpagemap contains the mapping count and page flags for each physical page. Matt's patchset introduces two new metrics, the PSS (proportional set size) and the USS (unique set size) representing a count of processes that currently are stored in the memory, respectively the number of pages to be returned to the system in case the process is killed.

In order to calculate these numbers, which are very difficult to be computed as they require a pass through the process' address space, there are a couple of tools to do it well; as, for example, the memstats tool or the memrank tool that list the processes by decreasing PSS.

You can download these patches from here.
FILED UNDER:
Linux
kernel
memory
map

TELL US WHAT YOU THINK:

5,139 hits · Link to this article · Print article · Send to friend · Subscribe to news

MUST-READ RELATED ARTICLES:


Linux Kernel Vulnerability: IPv6 Sockets Local DoS

Linux Kernel 2.6.20 Released

Linux Mint 2.2 KDE Edition Released

Ubuntu 7.04 - Well Done

Linux Kernel Gains Serviceability Features

READER COMMENTS:



No user comments yet.
Be the first to express your opinion!
Copyright © 2001-2012 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM