RFR: 8204089: Timely Reducing Unused Committed Memory
Rodrigo Bruno
rbruno at gsd.inesc-id.pt
Fri Aug 3 19:58:21 UTC 2018
Hi Thomas,
thank you for your reply. No problem, w.r.t reponse times. I can also take
a while to respond.
Let me just summarize my ideas for the next version of the patch taking
into consideration your comments.
This way we will see if we are both on the same page.
1 - move the should_gc check from vmthread loop into G1ConcurrentMarkThread.
I will use sleep_before_next_cycle
to trigger periodic checks (tune frequency).
2 - inside should_gc:
a) move the frequency test to first place
b) use Ticks/Tickspan to measure time
3 - when should_gc returns true, trigger G1CollectedHeap::resize_after_
full_collection
from a new VM operation
4 - provide a flag UseFullGCForIdleCompaction to allow a full GC instead of
just
G1CollectedHeap::resize_after_full_collection.
5 - use "Idle Time Compaction" for GC cause
6 - create one JUnit test.
This is what I understood from your email. If you agree, I will produce a
new version of the patch with the proposed changes.
cheers,
rodrigo
2018-07-26 13:32 GMT+02:00 Thomas Schatzl <thomas.schatzl at oracle.com>:
> Hi,
>
> at least one sentence needs further clarification.
>
> On Thu, 2018-07-26 at 13:25 +0200, Thomas Schatzl wrote:
> > Hi Rodrigo,
> >
> > first, sorry for taking so long to respond in this thread.
> >
> [...]
> > On Tue, 2018-06-19 at 20:46 +0200, Rodrigo Bruno wrote:
> > > Hi all,
> > >
> > > here is the first version of our contribution for draft JEP-
> > > 8204089.
> > >
> >
> > some comments:
> >
> [...]
> > - looking a bit at other implementations it might be worth to be able
> > to customize what is been done when idle is detected.
> >
> > In most cases it might be sufficient to just shrink the heap (in a
> > new VM operation, using the existing code in
> > G1CollectedHeap::resize_after_full_collection() that already uses
> > Min/MaxHeapFreeRatio). A System.gc() seems very intrusive and should
> > be optional imho after some thinking; making this optional does not
> > seem too much work.
> >
> > Consider applications with more than a few GB of heap, those will be
> > affected a lot (i.e. unresponsive for multiple seconds)
> >
> > A flag like UseFullGCForIdleCompaction(?) could be used here.
> >
> > - the change does not make the system.gc() use "Idle" (probably "Idle
> > Time Compaction") or similar as suggested in the JEP.
>
> ... as GC cause...
>
> It is very important to make sure that this action is easily
> identifiable for users.
>
> Thanks,
> Thomas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20180803/773df8bb/attachment.htm>
More information about the hotspot-gc-dev
mailing list