Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A quite convenient way to monitor (and partially change) the runtime parameters of a JVM instance is VisualVM:</p> <ul> <li><a href="http://visualvm.java.net/" rel="nofollow noreferrer">VisualVM homepage</a></li> <li><a href="http://docs.oracle.com/javase/7/docs/technotes/guides/visualvm/" rel="nofollow noreferrer">Oracle VisualVM docs</a> </li> </ul> <p>PS<br> (deleted)</p> <p>PPS I remembered the other tool I used some time ago: <a href="http://www.oracle.com/technetwork/java/visualgc-136680.html" rel="nofollow noreferrer">Visual GC</a>. It shows you visually in detail what happens inside the JVM memory management, here some <a href="https://www.google.de/search?q=visual%20gc&amp;client=firefox-a&amp;hs=X6D&amp;rls=org.mozilla:de:official&amp;tbm=isch&amp;tbo=u&amp;source=univ&amp;sa=X&amp;ei=bv2cUYqwG43Vsgbg14HQBw&amp;ved=0CDsQsAQ&amp;biw=1351&amp;bih=946" rel="nofollow noreferrer">screenshots</a>. Very powerful, and it can even be integrated with a plugin in VisualVM (see plugins section on VisualVM homepage).</p> <p>PPPS<br> <em><code>We sometimes have anormaly long pauses, up to 20 seconds. [...] I guess the pauses could be a full GC on a swapped heap right?</code></em><br> Yes, that could be. That long pauses could be caused by full GC even on non-swapped heaps. With VisualVM you can monitor if a full GC happens at the moment the ~20sec pause is happening. I suggest running VisualVM on another host and connecting it to the JVM process on your virtual server via <a href="http://visualvm.java.net/jmx_connections.html" rel="nofollow noreferrer">explicit JMX</a>, in order to not falsify the measurings with additional load. You can leave that setup running over days/weeks and therefore gather definitive information on the phenomenon.</p> <p>Afaics with current information, at the moment there are only these possibilities:</p> <ul> <li>the pauses observed happen simultaneously with full GC: the JVM isn't properly tuned. You can alleviate this via JVM parameters, and maybe choosing another GC algorithm/engine (have you tried out <a href="http://www.omsn.de/blog/brief-comparison-of-java-7-hotspot-garbage-collectors" rel="nofollow noreferrer">CMS and G1</a> GC? More info about how this happens e.g. <a href="http://blog.mgm-tp.com/2013/03/garbage-collection-tuning/" rel="nofollow noreferrer">here</a>)</li> <li>the pauses observed do not coincide with a full GC in the JVM: the physical virtual host might be the cause. Verify your SLAs (how much virtual RAM is guaranteed to be in physical RAM) and contact your service provider asking to monitor the virtual server. </li> </ul> <p>I should have mentioned that VisualVM is shipped with Java. And JConsole, also shipped with Java, which is lighter and more compact than VisualVM (but has no plugins, no profiling, etc), but provides a similar overview.</p> <p>If setting up the JMX connection for VisualVM/JConsole/VisualGC is too complicated for the moment, you can resort to followng java parameters: <code>-XX:+PrintGC -XX:+PrintGCTimeStamps -Xloggc:/my/log/path/gclogfile.log</code>. These parameters will cause the JVM to write to specified log file a entry for every GC run. This option is also well suited for long term analysis, and is probably the one with least overhead on your JVM.</p> <p>After thinking again (and again) about your question: if you wonder where the additional 3+ GB come from, here a <a href="https://stackoverflow.com/questions/3513903/how-to-calculate-and-specify-the-total-memory-space-allowed-for-java-process">related question</a>. I personally use the factor x1.5 as rule of the thumb.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload