how to know jvm is stopping the world?

Simone Bordet sbordet at
Sun Dec 11 16:32:13 UTC 2011


On Sun, Dec 11, 2011 at 07:31, Li Li <fancyerii at> wrote:
> hi,
>     In our application of full text searching with lucene and solr. we will
> give jvm about 25GB memory. we use CMS as old generation garbage collector.
> But the jvm sometimes can't do anything. So our clients complain that the
> connection is time out. we find the reason is the jvm is doing full gc and
> it will stop service for about 1-3 seconds.
>     I know that this situation is inevitable when using CMS collector. but
> we have more than one searching machines, so if I know jvm is doing full
> gc(specially stop the world), I can send requests to other machines. But the
> question now is that jvm don't provide an api for that.

I think that the hotspot-gc-use is a better mailing list for these
kind of questions.
Having said that, I think your approach is too naive.
If you have a 10s STW, then you cannot "send request to other
machines" because the world is - indeed - stopped.
There is no use for providing the API that you suggest; you should
instead tune your GC until you get rid of long STW pauses.

Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz

More information about the hotspot-gc-dev mailing list