-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JEP 318: Epsilon: An Arbitrarily Low-Overhead Garbage Collector #1370
Comments
Discussed this idea with @charliegracie and it should be relatively straightforward to create a "zero gc" policy based off Likely by extending one of the classes (TODO: remember which one) and adding a flag to determine whether or not to GC on allocation failure. Update: |
@Param-S and I were discussing something similar few weeks back and that it could be useful in OpenWhisk (serverless) kind of environment where the JVM does not run long enough to exhaust heap. We won't need to worry about GC cycle at all; JVM would just handle allocation. @Param-S - fyi |
@ashu-mehra Possibly provided the Whisk container has sufficient memory to live through the request(s). My understanding of OpenWhisk is that the container is reused for subsequent requests and killed every ~15 minutes. The use of this kind of GC in that environment would require tuning of the max heap to live through multiple requests. |
I wonder if there's an opportunity to reduce the number of async checks the JIT inserts if we were running in a no-GC environment. The JEP seems to be looking at two scenarios, one for testing and one for short lived JVMs wanting to extract maximum performance. |
@dmitripivkine Can someone on the GC team take a look at this? It's (tentatively?) targeted to JDK11 but would be nice to support all the way back to 8. |
Optthruput should be good base because of all barriers are off. Call of GC in allocation failure path might be disabled. Instead JVM must try to expand heap or, if it is not possible, take OOM path. The generation of core files for this event should be disabled by default. There is no need to create GC Slave threads at startup as well as reserve LOA. Collector should be setup to expand on allocation failure. New option parsing, new flag in GC_Extensions expected. JIT Team might provide number of optimizations as well. Testing plan required. This feature should be implemented for Java 8 and higher versions. The feature should be documented |
@LinHu2016 Would you please start work on this? |
sure |
not sure if we need to support finalization for "no-gc collector" |
I believe we should not touch finalization code for primary implementation. There are number of possible improvements (including finalization) we can do in future if necessary |
first step:
|
I suggest -gcpolocy:nogc instead of -gcpolicy:noop. +1 for supporting -XX:+UseNoGC for compatibility. -1 for supporting options using epsilon as this seems like a transient name that wouldn't necessarily be supported in the future. |
I agree with Pete: -gcpolocy:nogc and -XX:+UseNoGC looks better |
first step: Updated
|
After discussion we decided that -Xgcpolicy:nogc should generate set of dumps on OOM by default. |
Agreed. In a scenario tuned to run with the |
FYI if we see people starting to use this new mode to squeeze out maximum performance, there should be opportunities for the JIT to eliminate and relax some checks if we can assume no GC will ever happen. |
Well, I was just about to ask @dmitripivkine @LinHu2016 if there more work to do, or we can close this Issue. @fjeremic do we need to keep it open for potential future JIT work, or should we create another issue for that? |
I would say create another issue or leave things as is since we already took note of it here. I see this as an opportunity for future improvement however we would need to justify investment into this area which means this GC policy has to see some traction first from users. Edit: Actually I don't think this warrants a new issue. We've already brought up the point here which we can reference in the future. |
I believe we do have good starting point and can close this issue. JIT support and GC further improvements can be done under another issues. |
Seems the consensus is to close. |
Perhaps a little hasty. I should have confirmed, did the appropriate testing for the new gc policy get added? |
@pshipton testing plan has not completed, currently we are using openjdk hotspot jtreg epsilon tests for verifying JEP318 functions and SPECjbb2005 for performance test, but there are some limitations to use epsilon tests. |
@LinHu2016 where are we for the testing? I'd like to assign this to a milestone and close it off. The 0.11.0 milestone closes Oct 8, which I'm guessing is too early. I'll tentatively assign this to the 0.12.0 milestone which closes in Jan. |
@pshipton original plan for testing is that trying to reuse openjdk test/hotspot/jtreg/gc/epsilon. |
@LinHu2016 do you have a timeline for completing the work? Can it be completed by early January? |
plan to complete it in October. |
ok. I'll leave it in the Jan 0.12.0 milestone for now, since the Oct 0.11.0 milestone work needs to be completed by Oct 8. If it happens to be finished in time we can change the milestone. |
@LinHu2016 is there still some testing to complete? I was under the impression it's not quite done yet. |
We are in the process of moving tests in the other direction (move more sanity tests to extended), to ensure sanity set stays small / runs fast. Is there a specific request to move the nogc tests to sanity, or can we leave them where they are? |
@LinHu2016 see Shelley's comment #1370 (comment) Separately from the above, is there any reason to keep this Issue open or can it now be closed? |
@smlambert keep the tests in extended level are fine, move to sanity just for catching regression earlier. BTW the most of tests only take under 10 secs, but 2 of them for each platform due to generate dumps might take a couple mins. |
@pshipton yes, the issue can be closed now. Thanks |
http://openjdk.java.net/jeps/318
This is an "Epic" to contain requirements for supporting this JEP on OpenJ9.
The text was updated successfully, but these errors were encountered: