understanding pmap

Yong Huang yong321 at yahoo.com
Thu Mar 4 21:04:53 UTC 2010


> I?m looking for a memory problem on a system using the pmap command.
> 
> This is an output:
> # pmap -d 4302
> #
.....
> 49770000  128896 rwx-- 0000000049770000 000:00000   [ anon ]
> 51550000 1398144 rwx-- 0000000051550000 000:00000   [ anon ]
> a6ab0000  172288 rwx-- 00000000a6ab0000 000:00000   [ anon ]
> b4612000    8636 r-xs- 0000000000000000 068:00002 charsets.jar
.....
> mapped: 2391764K    writeable/private: 2217000K    shared: 158336K
> 
> I have a lot of used memory and the line that takes my attention is this:
> 51550000 1398144 rwx-- 0000000051550000 000:00000   [ anon ]
> 
> But now I don?t know how to handle it. What can I do with this info? how can
> I know why there is so much memory there?
> 
> Thanks in advance
> 
> ESG

It's always a good idea to tell us your Red Hat and kernel version. On any  slightly newer version, you can see more details about any memory segment in smaps pseudo file under /proc/<pid>. Your 1.4 GB anonymous memory is allocated private to that process. Some programs are written in a way to use lots of memory for data processing. Other than asking the developer to change the code, there's not much you can do. If they can't do it and you have multiple such processes running at the same time, ask the developer to see if they can rewrite to use shared memory, or at least a large portion of it as shared.

If the memory keeps growing and never comes down, that's another issue. Tell the developer he must fix the memory leak.

Yong Huang


      




More information about the redhat-list mailing list