• Post Reply Bookmark Topic Watch Topic
  • New Topic

Disabling OOM-killer on ubuntu?

 
Elhanan Maayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..

while i know that OOM-killer is usefull for machines that have more then one process, we have a vm with only one process, that tends to get killed when it recieves large chunks of communications, dmesg indicate that oom-killer was at works, so i was wonder if it's ok to disable it.
[ 145.614194] Killed process 1503 (java) total-vm:10264060kB, anon-rss:7919392kB, file-rss:0kB
[ 145.897401] Killed process 1202 (java) total-vm:4037188kB, anon-rss:3856kB, file-rss:0kB
[55796.674830] Killed process 1831 (java) total-vm:10203812kB, anon-rss:7805060kB, file-rss:0kB
[75956.949679] Killed process 14681 (java) total-vm:10199932kB, anon-rss:7852576kB, file-rss:0kB
[75957.053241] Killed process 1658 (java) total-vm:4236880kB, anon-rss:46708kB, file-rss:0kB
[76366.957083] Killed process 2628 (java) total-vm:10215660kB, anon-rss:7894140kB, file-rss:0kB
[76367.071981] Killed process 2034 (java) total-vm:4103752kB, anon-rss:25520kB, file-rss:0kB
[76469.704886] Killed process 5376 (java) total-vm:10196872kB, anon-rss:7844800kB, file-rss:0kB
[76761.420596] Killed process 7400 (java) total-vm:10219820kB, anon-rss:7892404kB, file-rss:0kB
[76761.842409] Killed process 5202 (java) total-vm:4103752kB, anon-rss:22860kB, file-rss:0kB
[231505.019515] Killed process 9367 (java) total-vm:10134684kB, anon-rss:7804720kB, file-rss:0kB
[232227.708168] Killed process 15862 (java) total-vm:10125300kB, anon-rss:7898536kB, file-rss:0kB
[232227.868810] Killed process 9000 (java) total-vm:4236880kB, anon-rss:12244kB, file-rss:0kB
[232771.681270] Killed process 16321 (java) total-vm:10207732kB, anon-rss:7900632kB, file-rss:0kB

 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The killing is happening to try and keep the system itself running. What kind of large chunks of communication do you have? Do you maintain a large buffer that you never let get deallocated?
 
Elhanan Maayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there's nothing in system but this process, it's a dedicated vm, the maybe oom's heuristics don't match up correctly here .

we have a server that sends us a soap request with a large xml including many attachments of gif/jpeg/png files which we then analyze using ImageIcon class to extract it's dimentions. xml itself is dealt with DOM (no jaxb marshaling or anything)

we also see cases where top indicates usage of 150% or even 197 , which i understand can happen when you use more then one core.

we requested to vm to be have 8gb of dedicated memory, but only have 4 of it dedicated. (they won't allow 4 more without proof we need more resources)

btw this is java 6 build 25

 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can turn off the heuristic with /proc/sys/vm. You might want to change the value to 1 from default 0
http://www.linuxinsight.com/proc_sys_vm_overcommit_memory.html

You asked if you could disable OOM-killer. You might have already seen this, but the second post contains a lot of info on configuring it.
http://serverfault.com/questions/362589/effects-of-configuring-vm-overcommit-memory

ALSO the last post here might help, describes a bug
http://www.linuxforums.org/forum/servers/192733-unusual-memory-related-problems-java.html

 
Dave Tolls
Ranch Hand
Posts: 2268
23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How big is the XML?
If you're sticking that in a DOM rather than processing via streaming it you need to multiply it by 3 or 4 at least, if I remember correctly.

Are you sure it'll fit?
 
Elhanan Maayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the weird part is that OOM shouldn't be activated, we use xmx to always specify memory size smaller by one gb the the vm's memory. meaning if the vm's memory is 8gb we use 7.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!