New kernel puts a spotlight on memory hogs

Jon Corbet analyzes the 2.6.25 kernel, out last night.

After 2.6.21, which came out about a year ago, we started to be able to use PowerTOP to spot problem applications that wake up the processor and waste power. (See "Linux tool points out power-wasting applications")

At Google last year, Andrew Morton said, "I don't think we expose enough stuff to sophisticated programmers to tell them what's going on in the kernel." New kernel work is changing that. This time, the measurement feature is more accurage measurements of memory consumption, thanks to Matt Mackall's "pagemap" patches.

Measuring memory use has been a problem spot. Using the standard tools, it's possible to see how much memory you're using, but applications share pages, so you can't tell how much memory you would save if you killed a given application.

With pagemap, you can see exactly which pages each process is using, so you can accurately account for shared pages. Matt impressed the crowd at last year's Embedded Linux Conference, showing off a new tool that gives you new "proportional set size" and "unique set size" metrics to work with. Proportional set size allocates pages among all the processes that share them, and unique set size counts pages that only one process is using.

With every new metric comes a list of bottom performers, so watch for reports based on pagemap stats to put some attention on the greediest of your system's memory hogs.

Join the newsletter!

Error: Please check your email address.

More about GoogleLinux

Show Comments

Market Place