OpenVZ Forum


Home » General » Support » ENOMEM errors
ENOMEM errors [message #30796] Sat, 07 June 2008 06:47 Go to next message
pzttilde is currently offline  pzttilde
Messages: 3
Registered: June 2008
Junior Member
Hey there, inside my machines I've been getting ENOMEM errors and I'm not quite sure how to handle it. The machine's 'host' has 8G of memory of which it caches everything but what is used at that point as soon as I start any container. Not sure if this behavior is intended or faulty. Inside the container only 256M seems to be available.

It's an Ubuntu Hardy install;
Linux merlin.*** 2.6.24-19-openvz #1 SMP Thu Jun 5 13:07:13 CEST 2008 x86_64 GNU/Linux

This is the host:
# free -m
             total       used       free     shared    buffers     cached
Mem:          7981       7933         47          0          0       5850
-/+ buffers/cache:       2083       5897
Swap:        22888          0      22888


Inside container (the only one running at this point):
# free -m
             total       used       free     shared    buffers     cached
Mem:           256         60        195          0          0          0

# cat /proc/user_beancounters | grep privv
            privvmpages                 15638               200464                73728                80362               486040

# sysctl -a | grep overcommit
vm.overcommit_memory = 0
vm.overcommit_ratio = 50
vm.nr_overcommit_hugepages = 0

# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 71680
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 71680
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited


Feel like I'm just doing something essential wrong or that I've stumbled upon a bug. Any advice would be appreciated.




Re: ENOMEM errors [message #30804 is a reply to message #30796] Sat, 07 June 2008 09:48 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

excuse me but I don't understand what's your problem?
Do you want to increase privvmpages parameter or what?
Re: ENOMEM errors [message #30832 is a reply to message #30804] Sun, 08 June 2008 07:50 Go to previous messageGo to next message
pzttilde is currently offline  pzttilde
Messages: 3
Registered: June 2008
Junior Member
maratrus wrote on Sat, 07 June 2008 05:48

Hello,

excuse me but I don't understand what's your problem?
Do you want to increase privvmpages parameter or what?


Well, thanks to this error sometimes the vm just crashes because the host is out of memory. And less bad (but still very annoying.), inside the vm applications have the same issue.

For example:

# vzctl enter 10
Unable to fork: Cannot allocate memory

Are my values strange? I haven't really changed them much. And is it normal for the host to cache all the memory like that?

[Updated on: Sun, 08 June 2008 08:04]

Report message to a moderator

Re: ENOMEM errors [message #30836 is a reply to message #30832] Sun, 08 June 2008 12:56 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Try to increase the value of privvmpages.
For example, you can do it via vzctl (man vzctl):
vzctl set CT_ID --privvmpages [barrier]:[limit] --save
Re: ENOMEM errors [message #31009 is a reply to message #30836] Thu, 12 June 2008 18:32 Go to previous message
pzttilde is currently offline  pzttilde
Messages: 3
Registered: June 2008
Junior Member
maratrus wrote on Sun, 08 June 2008 08:56

Try to increase the value of privvmpages.
For example, you can do it via vzctl (man vzctl):
vzctl set CT_ID --privvmpages [barrier]:[limit] --save



That was indeed the issue, thanks. Is it normal for 'free' to not understand the actual memory available to the system? It always shows 256 for me, even though a lot more is actually used.

On another note, I'm quite impressed by openvz!

[Updated on: Thu, 12 June 2008 18:34]

Report message to a moderator

Previous Topic: HN Network Connectivity loss when VE stopped
Next Topic: missing --numeric-owner in vzctl create?
Goto Forum:
  


Current Time: Thu Apr 25 02:14:05 GMT 2024

Total time taken to generate the page: 0.01503 seconds