Java 7 Default GC for server

Jon Masamitsu jon.masamitsu at oracle.com
Mon Mar 30 20:59:51 UTC 2015



On 03/30/2015 02:47 AM, Rohit Mohta wrote:
> Hi All,
>
>    I have quite some questions around default GC in server mode
>
> (a) Is the formula for calculating number GC threads is
> 3 + (5 * cores/8)

For N hardware threads for N <= 8, GC threads = N
For N > 8,  8 + (N-8) * 5 / 8
>
> (b) In the GC logs, I can see the below lines printed even when the 
> application is idle. Is this something to do with JIT or some other 
> JVM internal operation?

Yes, some other (than GC) JVM operation that requires a safepoint.
>
> 2015-03-05T14:42:18.320+0000: 520807.126: Total time for which 
> application threads were stopped: 0.0000500 seconds
> 2015-03-05T14:42:18.320+0000: 520807.126: Application time: 0.0000240 
> seconds
> 2015-03-05T14:42:18.320+0000: 520807.126: Total time for which 
> application threads were stopped: 0.0000500 seconds
> 2015-03-05T14:42:58.405+0000: 520847.212: Application time: 40.0857170 
> seconds
> 2015-03-05T14:42:58.406+0000: 520847.212: Total time for which 
> application threads were stopped: 0.0001980 seconds
> 2015-03-05T14:42:58.406+0000: 520847.212: Application time: 0.0000250 
> seconds
> 2015-03-05T14:42:58.406+0000: 520847.212: Total time for which 
> application threads were stopped: 0.0000520 seconds
> 2015-03-05T14:43:28.406+0000: 520877.213: Application time: 30.0001550 
> second
>
> (c) We have about 15 JVM's on a single server. Linux Server has 24 
> cores and about 37GB of RAM. When we restart all the JVM's, they start 
> with a good heap size, about 700MB+. And we have no issues with that. 
> After a day or so, some of the processes drop down to less than 100MB 
> of heap size and they start doing very frequent minor and major GC. We 
> have lot of unused memory on the server.

I don't recall seeing that happen before.  Maybe another on the list has 
an idea.

> Why won't GC cause expansion?
> I know we can set a Xms to a minimum value, but we are curious to know 
> why few of them go from 750MB to 100MB, whereas some of them stay 
> around 500MB. Is this has to do with SizeIncrement, SizeSupplement or 
> AdaptiveeSize values?

Try -XX:+PrintAdaptiveSizePolicy and see it that tells you why the heap is
not growing.

Jon

>
> Thanks,
> Rohit
>
>
>
>
> _______________________________________________
> hotspot-gc-use mailing list
> hotspot-gc-use at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20150330/2bf36697/attachment.html>


More information about the hotspot-gc-use mailing list