News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

Linux patches add insight into memory usage

Apr 26, 2007 — by LinuxDevices Staff — from the LinuxDevices Archive — 2 views

Matt Mackall, principal developer for the Consumer Electronics Linux Forum (CELF), is working on a set of kernel patches that let users access detailed, page-level run-time information on process memory usage. Mackall's work stands to make the kernel's virtual memory system much less of a “black box.”

Mackall spoke about his project at CELF's Embedded Linux Conference earlier this month. Long-time kernel hacker, technical author, and LWN editor Jonathan Corbett attended the session, and wrote up a detailed report published today by LinuxWorld.

Corbett said Mackall's work aims to open up the “black box” in which Linux's virtual memory system currently resides. Corbett writes, “The first step is to add a new file (“pagemap”) in each process's /proc directory. It is a binary file containing the page frame number for each page in the process's address space. The file can be read to see where a process's pages have been placed and, more interestingly, it can be compared between processes to see which pages are being shared. Matt has a little graphical tool which can display this file, showing the patterns of which pages are present in memory and which are not.”

Similarly, Mackall's patch set creates a /proc-based pagemap for the kernel itself. In general, his work should help developers determine how much memory their applications are really using, what parts of their applications are consuming memory, how much memory their applications need in order to avoid swapping, and lots of other useful information, Corbett suggests. The patches could make for a big improvement, compared to feeling out application memory bounds with trial-and-error testing.

Read more about Mackall's presentation in Corbett's detailed, technical coverage, here. Or, have a look at Mackall's patches, here.


 
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.