Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-31 Thread Staffan Larsen
Quoting Bengt from earlier in this conversation: As for just doing a System.gc() to force a GC I think you can rely on that System.gc() does a full GC in Hotspot unless someone sets -XX:+DisableExplicitGC on the command line. Considering that you are relying on Hotspot specifc names for pools

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-30 Thread Jaroslav Bachorik
On 24.10.2013 21:33, Mandy Chung wrote: On 10/24/2013 7:01 AM, Jaroslav Bachorik wrote: Hi Mandy, On 24.10.2013 01:02, Mandy Chung wrote: On 10/23/2013 7:32 AM, Jaroslav Bachorik wrote: I've updated the patch. The GC is called even before the first attempt to get the pool memory usage and

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-30 Thread Mandy Chung
On 10/30/2013 4:23 AM, Jaroslav Bachorik wrote: Ok. I've added a big object and an initial call to System.gc(). But I'm leaving the calls to System.gc() right before checking the pools as well - just to be sure. http://cr.openjdk.java.net/~jbachorik/8020467/webrev.04 The update looks okay

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-30 Thread Jaroslav Bachorik
On 30.10.2013 17:30, Mandy Chung wrote: On 10/30/2013 4:23 AM, Jaroslav Bachorik wrote: Ok. I've added a big object and an initial call to System.gc(). But I'm leaving the calls to System.gc() right before checking the pools as well - just to be sure.

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-24 Thread Jaroslav Bachorik
Hi Mandy, On 24.10.2013 01:02, Mandy Chung wrote: On 10/23/2013 7:32 AM, Jaroslav Bachorik wrote: I've updated the patch. The GC is called even before the first attempt to get the pool memory usage and System.gc() is used to perform GC (no MXBean checks). This should simplify the change a

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-24 Thread Mandy Chung
On 10/24/2013 7:01 AM, Jaroslav Bachorik wrote: Hi Mandy, On 24.10.2013 01:02, Mandy Chung wrote: On 10/23/2013 7:32 AM, Jaroslav Bachorik wrote: I've updated the patch. The GC is called even before the first attempt to get the pool memory usage and System.gc() is used to perform GC (no

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-23 Thread Staffan Larsen
I think you can simplify the logic for forcing a GC to just a simple call to System.gc();. AFAIK System.gc() will cause a full collection to happen for all collectors. /Staffan On 23 okt 2013, at 10:02, Jaroslav Bachorik jaroslav.bacho...@oracle.com wrote: On 22.10.2013 22:04, Mandy Chung

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-23 Thread Jaroslav Bachorik
On 23.10.2013 10:08, Staffan Larsen wrote: I think you can simplify the logic for forcing a GC to just a simple call to System.gc();. AFAIK System.gc() will cause a full collection to happen for all collectors. Hm, will it now? I had the impression that it was just hinting the GC system to

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-23 Thread Staffan Larsen
On 23 okt 2013, at 10:12, Jaroslav Bachorik jaroslav.bacho...@oracle.com wrote: On 23.10.2013 10:08, Staffan Larsen wrote: I think you can simplify the logic for forcing a GC to just a simple call to System.gc();. AFAIK System.gc() will cause a full collection to happen for all

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-23 Thread Jaroslav Bachorik
Hi Bengt, On 23.10.2013 14:40, Bengt Rutisson wrote: Hi Jaroslav, A couple of questions. I don't understand why this is a CMS only problem? Why don't the other collectors have the same issue? I guess it is less likely that the other collectors start (or complete) a GC without a lot of

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-23 Thread Jaroslav Bachorik
On 23.10.2013 15:15, Bengt Rutisson wrote: On 2013-10-23 14:55, Jaroslav Bachorik wrote: Hi Bengt, On 23.10.2013 14:40, Bengt Rutisson wrote: Hi Jaroslav, A couple of questions. I don't understand why this is a CMS only problem? Why don't the other collectors have the same issue? I guess

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-23 Thread Jaroslav Bachorik
On 23.10.2013 16:43, Bengt Rutisson wrote: Hi Jaroslav, On 2013-10-23 16:32, Jaroslav Bachorik wrote: On 23.10.2013 15:15, Bengt Rutisson wrote: On 2013-10-23 14:55, Jaroslav Bachorik wrote: Hi Bengt, On 23.10.2013 14:40, Bengt Rutisson wrote: Hi Jaroslav, A couple of questions. I

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-23 Thread Bengt Rutisson
Hi again Jaroslav, On 2013-10-23 17:07, Jaroslav Bachorik wrote: On 23.10.2013 16:43, Bengt Rutisson wrote: Hi Jaroslav, On 2013-10-23 16:32, Jaroslav Bachorik wrote: On 23.10.2013 15:15, Bengt Rutisson wrote: On 2013-10-23 14:55, Jaroslav Bachorik wrote: Hi Bengt, On 23.10.2013 14:40,

Re: jmx-dev RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

2013-10-23 Thread Mandy Chung
On 10/23/2013 7:32 AM, Jaroslav Bachorik wrote: I've updated the patch. The GC is called even before the first attempt to get the pool memory usage and System.gc() is used to perform GC (no MXBean checks). This should simplify the change a bit.