Memory needs / Special requirements for OS inside container? [message #35032] |
Sun, 22 February 2009 22:36  |
Fork
Messages: 1 Registered: February 2009
|
Junior Member |
|
|
Hi,
I'm slightly irritated by the memory usage of the applications inside a container and wonder if I did anything wrong while installing the OS.
I used to run my webserver on a real machine and even with 150 httpd processes (Apache prefork, plus MySQL server, OpenSSH and a few smaller ones), total memory usage barely reaches 128 MByte. The machine has 256 MByte RAM plus 128 MByte swap. Never had an issue with that in the past years.
A few weeks ago I moved the whole system into an OpenVZ container provided by my hoster. In this container, I frequently run into the 768 MByte barrier, cause just some 35 httpd processes eat up all the memory.
Using top -u httpd, the httpd processes' data looks almost the same on both systems:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24478 httpd 25 10 27700 9168 2728 S 0 1.2 0:00.03 httpd
[..]
Looks to me like the VIRT ain't as virtual inside a container as it is on a real system.
Now, I did not use the OS templates my hoster provided, since I always felt comfortable with my LFS (linuxfromscratch). Using the HyperVM console, I deleted the existing directories created by the Slackware template and then untar'ed my own LFS "template" (not an OpenVZ template, just the same clean copy I used for my old server, too).
The system boots and runs just fine, except for this memory issue.
Before I start bugging my hoster about an OS he didn't provide, I'd like to know if there is anything I need to take care of when compiling the system libraries? Is there e.g. any difference between compiling glibc for a real machine and doing so for a container?
The OpenVZ wiki guides that show how to create an OS template don't seem to indicate that anything special needs to be taken care of, but I'm not sure if I missed something.
Or is there some other explanation for the memory needs inside a container?
Thanks!
Output from uname -a: Linux ka 2.6.18-12-fza-686 #1 SMP Sun May 18 12:30:42 CEST 2008 i686 pentium4 i386 GNU/Linux
|
|
|