Out of memory at 72% usage
The answer to your question is you are using more memory than 72%. You can calculate it via the OOM Report.
The bit that tells you what the state of the memory was is this bit:
Aug 11 04:20:14 myserver kernel: Node 0 DMA free:15884kB min:8kB low:8kB high:12kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15968kB managed:15884kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Aug 11 04:20:14 myserver kernel: lowmem_reserve[]: 0 3539 48337 48337
Aug 11 04:20:14 myserver kernel: Node 0 DMA32 free:181176kB min:2060kB low:2572kB high:3088kB active_anon:1334312kB inactive_anon:445152kB active_file:221600kB inactive_file:1327176kB unevictable:0kB isolated(anon):0kB isolated(file):384kB present:3644928kB managed:3624548kB mlocked:0kB dirty:1328084kB writeback:0kB mapped:220kB shmem:7852kB slab_reclaimable:75340kB slab_unreclaimable:34920kB kernel_stack:48kB pagetables:4684kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:2463022 all_unreclaimable? yes
Aug 11 04:20:14 myserver kernel: lowmem_reserve[]: 0 0 44797 44797
Aug 11 04:20:14 myserver kernel: Node 0 Normal free:25892kB min:26072kB low:32588kB high:39108kB active_anon:31943548kB inactive_anon:1879196kB active_file:5038872kB inactive_file:5769308kB unevictable:0kB isolated(anon):0kB isolated(file):4224kB present:46661632kB managed:45873100kB mlocked:0kB dirty:6184880kB writeback:324kB mapped:41268kB shmem:1577696kB slab_reclaimable:442212kB slab_unreclaimable:314476kB kernel_stack:3296kB pagetables:92756kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:17216562 all_unreclaimable? yes
In linux, memory is split into zones which are regions of physical RAM allotted (usually by address range) to serve a particular purpose.
DMA
is for very old hardware which in could only address a small region in DMA. This zone does not accumulate for much memory and is rarely -if ever- used.
DMA32
is a zone reserved for hardware which can only address 32 bits of memory. This is used in 64bit systems for that particular class of hardware. Normally cover about 4G of memory (can be less though).
The vast majority of memory however gets allocated to the 'Normal' zone. Nearly all memory goes in and out of here. Its used when there is not special purpose markers against the memory being allocated. When memory in this zone gets tough to find, the kernel typically starts using memory in other zones to find it (although I believe DMA
never gets touched).
Based off of your logs, the following calculation can be made.
DMA Present + DMA32 Present + Normal Present = Total available memory
15968kB + 3644928kB + 46661632kB = 50322528kB
-
DMA Free + DMA32 Free + Normal Free = Total free memory
15884kB + 181176kB + 25892kB = 222952kB
=
Total available memory - Total free memory = Total Used Memory
50322528kB - 222952kB = 50099576kB
=
(Total used memory / Total available memory) * 100 = Total used percent
50099576kB / 50322528kB * 100 = 99.55%
Other zones can in effect be free of memory but still you get an OOM because the zone you want is not free.
OOM killer is a possible means to free memory when the min
value is greater than the free
value. If you check your Normal
zone you can see that this is the case here.
Your biggest memory consumers are mysql
and java
. Either retune them to alter their memory usage, or get more memory for them.