OpenJDK G1 Patch

Kirk Pepperdine kirk at kodewerk.com
Fri May 25 18:49:20 UTC 2018


> Hi Ruslan,


> 
> Ok, but I don’t believe you need a full collection to release memory back to the OS. Released memory should come from high memory regions and those regions will be empty under most circumstances after a young gen collection. A reduction of heap size should put the live data set size over the IHOP meaning you should almost immediately trigger a concurrent mark cycle.
> Hi Kirk, thank you for the additional comments. Such feedback brings us closer to a better solution. We will discuss with Rodrigo these technical points and follow-up.  

It appears as if the OpenJDK team is open to accepting what I’d call your less than desirable solution to this problem so I do hope that you will still explore the possibility of releasing memory after a young collection. The advantage is that this would actually offer a means to resize without a speculative call to a full collection. And, it could work on any GC cycle. Also, Gil’s and my continued conversation with Michal seem to lead me to believe that there are some unreasonable expectations w.r.t. how weak references work and how the may, or may not be cleared by the collector. It seems to me that it would benefit you to explore that gap before offering a modification of the JVM. In other words, fix the problem at the right layer and if that layer happens to be the JVM, so be it. I’m not convinced that it is in this case and I have a strong feeling that your benchmark is busted in that it’s asking the collector to do something that it shouldn’t and so tricking it to do it on a trigger isn’t really a fair measure of what is happening. That said, the OpenJDK team seems willing to accept the patch.. and quite frankly, having the JVM be able to return heap to the OS would be nice.. just not at the expense of a Full.
>  
> 
> As for the idle comment, if you’re idle why not simply shutdown JVMs in your cluster?
> Possible, but doing horizontal scaling with a special logic may be overkilling for many projects. It should be tuned and maintained. It's more efforts and complexity. Java users need a platform for that. You can imagine how many applications are running in a single or two tomcats on the mass market. 

I fear you’re correct on this point….

Kind regards,
Kirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20180525/0ec78f72/attachment-0001.html>


More information about the hotspot-gc-dev mailing list