High Virtual Memory Usage when loading shared libraries [message #38379] |
Sat, 12 December 2009 22:07 ![Go to next message Go to previous message](/theme/ovz3/images/down.png) |
alamar
Messages: 3 Registered: February 2009
|
Junior Member |
|
|
Kernel:
Quote: | Linux version 2.6.24 (root@gw) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #4 SMP Thu Feb 19 04:36:29 CET 2009
|
Architecture: x86_64
(The program where I noticed this is inspire ircd (it uses lots of dynamically loaded modules) but I have the same issues with other programs that load lots of .so's as well. Also on a non-ovz system I don't see the problem described below)
Hi everybody,
I noticed a process using 300mb virtual memory looking at top in a container a while ago.
After doing a "pmap -x pid" it became apparent where the massive usage comes from.
The question/problem is that I can't understand why the size pmap shows is so big.
top:
Quote: | 28665 inspircd 20 0 314m 11m 8352 S 0 1.2 0:00.32 inspircd
|
314m of virtual memory is way to much on non-ovz systems usage is about ~12m
small extract of pmap -x 28665
Quote: | [..]
00002b23d397a000 44 - - - r-x-- m_tline.so
00002b23d3985000 2044 - - - ----- m_tline.so
00002b23d3b84000 4 - - - rw--- m_tline.so
00002b23d3b85000 40 - - - r-x-- m_userip.so
00002b23d3b8f000 2044 - - - ----- m_userip.so
00002b23d3d8e000 4 - - - rw--- m_userip.so
[..]
---------------- ------ ------ ------ ------
total kB 321652 - - -
|
Now if I look for example at m_userip.so. On the harddisk the .so uses
Quote: | 64K ./inspircd/modules/m_userip.so
00002b23d3b8f000 2044 - - - ----- m_userip.so
|
Where do the 2044k come from? And why are there no permissions?
This is the case with every .so file, and they don't dynamically (by using new/malloc) allocate this much memory.
About 300m of the 314m come from the 2044 or 2048 kb entries.
On non-ovz systems the line without the permissions is missing, I can't find any document explaining where this line would come from.
I thought maybe the 2044kb are the Virtual Page size but Virtual Page Size of the System is:
Quote: | getconf PAGESIZE
4096
|
Greets,
Julian
PS:
Sorry, in the meantime I noticed that it's more an architecture related problem and not due to openvz. If anybody knows why this happens on 64bit systems I'd still be glad to learn about it
[Updated on: Sat, 12 December 2009 22:45] Report message to a moderator
|
|
|