-
Notifications
You must be signed in to change notification settings - Fork 729
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
Using full command line as GC hints key causes key proliferation #19308
Comments
There is an ongoing PR that avoid finding/storing GC hints in SCC in certain cases: #19305. |
There is a huge list of 'elements' that are irrelevant to GC hints. Probably the complement list is much shorter, mostly GC command line options (for example, tenure age threshold that may effect heap expansion dynamics). Either way it's not easy to identify it precisely... As far as reducing find/store operations on a given JVM run, beside fully expanded heap scenario that we are addressing, we could perhaps avoid storing new hints if they are close to the existing value. |
The original discussions for the key of the GC hints are here #3743. As there could be many options (combinations), the decision at that time was to use the whole command line. |
This is an enhancement. The idea is to extract significant parameters from java command line and ignore insignificant for hint search. For example customer has unique ID identifier for each run. It prevents finding the hint using exact command line match. Also may be it makes sense to limit number of stored hints to prevent long search. I guess these improvements might help in general, not only for GC related items. |
It is also possible to store the GC hints in JVM exit phase rather than JVM startup, in this way users won't experience the possible performance impact during startup . We have existing options like |
Talked to @amicic @dmitripivkine, we still want to store the GC hints in the startup phase so that other JVMs startup together could benefit from the GC hints. We could add a limit for the number of the GC hints that can be added to the SCC, so that the SCC will not be gradually filled up with the hints. |
It is worth mentioning for this particular case, the unique ID of each run is in the java command line arguments, not the JVM command line options. |
Here is my understanding, there are two issues:
For 2) Peter suggested adding a new capability ( What do you think of this approach @gjdeval ? |
How would this new capability ( If this setting must be manually configured by the system operator, I wonder how useful it will be ... even with my long GC experience, I would not know how to decide which applications should be grouped together for GC hints identification. |
You don't need to group any applications together, you can use a separate config for each application. The VM can't separate applications from each other if the command line for an application is changing from run to run. |
Here is the latest on this issue.
Any questions on the feasibility of this approach @hangshao0 ? |
I agree that we should keep a maximum number of GC hints that can be stored into the SCC so that it will not gradually fill up the cache, like what is happening in this case. One more thing I want to mention is that we are not doing a linear search to find the GC hints. It is a hashtable lookup where the command line string is the key. In this case as the java command line argument changes in every run, no existing GC hints will be found and one more new hint will be stored each run. It will create one more store contention if there are multiple JVMs starting up together. This perf impact can be measured comparing to a run using - |
For multiple JVMs starting up together sharing the same GC hint (under the same config), there could also be one more store contention if they go to update the hint. |
Removing comp:c tag, an implementation is on VM side |
Issue Number: 19308 |
The Java command line may have unique elements which are irrelevant to GC hints, causing multiple keys to be created when the GC hints are going to be the same. Using the entire command line can also make the keys very long and complex, which increases the work to search for a matching key when a new JVM instance is launched. This extra unnecessary work slows down JVM startup.
The text was updated successfully, but these errors were encountered: