title: Java Garbage Collection stalls all Java processes
body: <p>We're running multiple instances of a server process on one linux box. The box has 8 cores and 16gb of RAM. I'm starting up each process with the -Xincgc option, using Java 1.6.</p>
  
  <p>We have various timers instrumented throughout the application that track the time to complete various tasks. When garbage collection happens, I notice that every java process on the box prints out that whatever task it was running at the time was slow.</p>
  
  <p>It's not stalling for a long time, maybe 100-300ms or so, but latency is a huge factor for this. It's also not stalling constantly, just periodically.</p>
  
  <p>When garbage collection is happening does it stop any java process from getting any time? If so, is there any way around this? Should I be using different GC options?</p>
  
  <p>UPDATE:</p>
  
  <p>Just to be clear, I'm not worried about one process stalling while GC is happening. I can tweak settings or optimize for that case. I'm just wondering why EVERY running Java process seems to stall at the same time when I thought they were more or less independent.</p>