> If this is not enough, I have a very specific GC-related question as well.
> Occasionally when running the demo -- every 10 or 20 runs or so -- I get
> what I can only describe as "a bad GC run". During normal execution, our
> code allocates a relatively large amount of very short-lived objects, none
> of it promoted to old gen (except for the actual data structure nodes, of
> course). But occasionally, as the program starts, the GC spends an
> inordinate amount of time collecting and continues to behave this way
> throughout the program's lifetime. If it starts behaving this way when the
> program launches, it continues, and if not -- this behavior is not observed
> at all. Any ideas?
We had something similar happen in a production system recently, it
also exhibited large amounts of the pause time where spent in sys.
We're not sure of the specific cause, however the following things
helped:
- We normally have a System.gc() call occur in our overnight window.
This was missed the evening before we saw the problems, we checked to
make sure it happened during our next window.
- We added CPU pinning via taskset to ensure that the Java application
did not run on the same cores that were handling system interrupts,
which were restricted to a different few cores using cpu banning in
irqbalance.
Mike.