Can the OS stop a Java process from garbage collecting? -
i'm monitoring production system appdynamics , had system slow crawl , freeze up. prior event, appdynamics showing gc activity (minor , major alike) flatline several minutes...and come life.
even during periods of ultra low load on system, still see our jvms doing some gc activity. we've never had totally flatline , drop 0.
also - network i/o flatlined @ same instance of time gc/memory flatline.
so ask: can @ system level cause jvm freeze, or cause garbage collection hang/freeze? on centos machine.
does os have swapping enabled.
i've noticed huge problems java once fills ram on os swapping enabled--it devistate windows systems, effictevly locking them , causing reboot.
my theory this:
- the os ram gets near full.
- the os requests memory java.
- this triggers java full gc attempt release memory.
- the full gc touches every piece of vms memory, items have been swapped out.
- the system tries swap data memory vm (on system out of ram)
- this keeps snowballing.
at first doesn't effect system much, if try launch app wants bunch of memory can take long time, , system keeps degrading.
multiple large vms can make worse, run 3 or 4 huge ones , system starts sieze when on 60-70% ram usage.
this conjecture describes behavior i've seen after days of testing.
the effect swapping seems "prevent" gc. more accurately os spending of gc time swapping makes it's hanging doing nothing during gc.
a fix--set -xmx lower value, drop until allow enough room avoid swapping. has fixed problem, if doesn't fix yours i'm wrong cause of problem :)
Comments
Post a Comment