You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/08/15 15:22:48 UTC

[GitHub] [accumulo] dlmarion opened a new pull request, #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

dlmarion opened a new pull request, #2882:
URL: https://github.com/apache/accumulo/pull/2882

   Was recently working with a customer that was doing some performance testing. Customer was experiencing about a 10x performance decrease vs earlier testing runs. It appears that the JVM flag `-XX:+UnlockDiagnosticVMOptions` was lost between the customer test runs. Based on helping customer debug this and reading about it this JVM flag activates many performance related things to include intrinsics and inlining. To see this you can compare the output of:
   
       1. `java -XX:+PrintFlagsFinal -version | grep Intrinsic` and `java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -version | grep Intrinsic`, and
       2. `java -XX:+PrintFlagsFinal -version | grep Native`and `java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -version | grep Native`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1238451454

   > For the example you gave of UseGHASHIntrinsics, I think the default is true. 
   
   The default is [false](https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/hotspot/share/runtime/globals.hpp#L345). I believe it becomes `true` when the JVM is running on hardware that supports it or maybe when the source is compiled for a specific OS.
   
   > That's not how I interpret the output you're seeing. I think all you've shown is that supplying only that option when printing the list of options allows the diagnostic options to show up in the printout. When you don't supply that option, none of the diagnostic options are included in the printout. When you do supply that option, it shows the current values of diagnostic options that you can control.
   
   That could be, I had not considered that.
   
   > Unless we can actually demonstrate that the unlock flag is enabling features, by actually measuring it, and not merely interpreting the printout, I'm inclined to think that is the same design here... and this flag isn't needed at all.
   
   I'm happy to concede that I still don't know how this works. You have supplied a sufficient counterpoint that I would have to go back and re-read everything on this topic. My initial [comment](https://github.com/apache/accumulo/pull/2882#issue-1339136794) indicates that merely providing this flag, the customer had a 10x increase in performance. Maybe there is more information that I was not told. Again, I'm fine with closing without merging.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1215309209

   My thought, in adding this to default Accumulo configuration, is that even though the option is called `UnlockDiagnosticVMOptions`, it's really unlocking some performance related things too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] ctubbsii commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1238498933

   > I'm happy to concede that I still don't know how this works. You have supplied a sufficient counterpoint that I would have to go back and re-read everything on this topic. My initial [comment](https://github.com/apache/accumulo/pull/2882#issue-1339136794) indicates that merely providing this flag, the customer had a 10x increase in performance. Maybe there is more information that I was not told. Again, I'm fine with closing without merging.
   
   Not really sure I understand myself. It's not very well documented. If somebody is getting 10x increase in performance with this alone, I'd be very surprised. I'd be curious what java build they are using. I suspect there's more going on, and would not be surprised to find them setting an additional flag in conjunction with this... perhaps using one that defaults to false in an older version but is now true in newer versions of Java.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] ctubbsii commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1235631302

   I cannot find any documentation that says that setting this flag automatically enables some diagnostic options. Everything I can find seems to suggest that you need to set this flag in order to *manipulate* these diagnostic options (to diverge from their default, which may already be on). So, unless we are using a diagnostic option by default (if we are, which one?), there's no point in us setting this by default on its own, because a user can always do that when they want to use one. The same goes for experimental flags.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion closed pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion closed pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options
URL: https://github.com/apache/accumulo/pull/2882


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1216532396

   You can view the diagnostic parameters, and which one's are enabled on your platform, using the command:
   ```
   java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -version | grep diagnostic
   ```
   
   For Accumulo, I would think that users might want to enable many things for inlining, hashing, compression, and encryption.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1230315811

   This [issue](https://bugs.openjdk.org/browse/JDK-8145348) is where they made all of the instrinsics `diagnostic`. This [issue](https://bugs.openjdk.org/browse/JDK-8153655) notes that they had to update all of the intrinsic tests to add `UnlockDiagnosticVMOptions` to the JVM options as some of the intrinsics moved from `product` (and enabled by default) to `diagnostic`. Follow-on [issue](https://bugs.openjdk.org/browse/JDK-8169585) to update the documentation for instrinsics to note that `UnlockDiagnosticVMOptions` is now required.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1238555219

   > The globals file you link to and the values shown there don't match the default values output to my screen. So, I don't trust that those match the actual defaults for any particular installation.
   
   My understanding is that during JVM startup an intrinsic may be enabled due to the machine architecture or presence of certain capabilities on the host. So, the value may default to `false` in the source code, but may be reported as `true` in `PrintFlagsFinal`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1255228134

   Closing this, I think we have documented enough information here for now. We can re-open when we get more information.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] ivakegg commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
ivakegg commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1216903435

   Well then I have to ask whether there are other options that the UnlockDiagnosticVMOptions does not automatically enable that we may want to use?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1238345592

   So, I agree that the [documentation](https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-3B1CE181-CD30-4178-9602-230B800D4FAE) says `Flags that control intrinsics now require the option -XX:+UnlockDiagnosticVMOptions.` However, as shown in my comment [above](https://github.com/apache/accumulo/pull/2882#issuecomment-1216515401), supplying *only* the `-XX:+UnlockDiagnosticVMOptions` property does enable some intrinsics. I think the comments on this PR provide enough documentation on this issue. I'm fine if we close this without merging.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] ctubbsii commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1238494502

   > > For the example you gave of UseGHASHIntrinsics, I think the default is true.
   > 
   > The default is [false](https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/hotspot/share/runtime/globals.hpp#L345). I believe it becomes `true` when the JVM is running on hardware that supports it or maybe when the source is compiled for a specific OS.
   
   I have been trying to dig through the hotspot code to see if I can understand how the defaults are set. The globals file you link to and the values shown there don't match the default values output to my screen. So, I don't trust that those match the actual defaults for any particular installation.
   
   The [description of the unlock flag](https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/hotspot/share/runtime/globals.hpp#L272-L273) says that it just "Enables normal processing of flags". It doesn't mention anything about turning anything on or off... just how it processes other flags. I've been trying to confirm this in the OpenJDK source code, but I am having a hard time following that code. The closest I've come is finding:
   
   * [the check that ensures the diagnostic flag is set](https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/hotspot/share/runtime/flags/jvmFlag.cpp#L347-L355) to prevent [diagnostic flags from being processed](https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/hotspot/share/runtime/flags/jvmFlag.cpp#L367-L372) if it isn't
   * [the check that ensures the flag is unlocked](https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/hotspot/share/runtime/flags/jvmFlag.cpp#L1498-L1501) to determine whether or not to print it
   
   I can't find any code related to altering flags when the unlock field is set... only command-line processing checks and print filtering.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion closed pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion closed pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options
URL: https://github.com/apache/accumulo/pull/2882


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1216905047

   I think you would have to find the properties that you may want to use first....


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1238334161

   
   Search for `intrinsic` in https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-3B1CE181-CD30-4178-9602-230B800D4FAE


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] ctubbsii commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1238697799

   > My understanding is that during JVM startup an intrinsic may be enabled due to the machine architecture or presence of certain capabilities on the host. So, the value may default to `false` in the source code, but may be reported as `true` in `PrintFlagsFinal`.
   
   Yeah, that was my understanding as well. The only "default" value we care about for this conversation (and the one I meant before we started linking to source :smiley_cat: ) is "no flags specified" default, not the "hard-coded in source" default.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1216676291

   > If any of these are marked experimental
   
   I don't believe these are experimental. There is another option for experimental properties, you can see them with:
   
   ```
   java -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -version | grep experimental
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] drewfarris commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
drewfarris commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1215207952

   > Based on [..,] reading about it[,]  this JVM flag activates many performance related things to include intrinsics and inlining.
   
   @dlmarion, would you mind dropping some references as links here? Curious to learn more about this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1215299675

   Likewise, I think that `-XX:+UnlockExperimentalVMOptions` unlocks all of the properties listed in the `experimental` availability dropdown item. A lot of `Shenandoah` options in there


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] ctubbsii commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1238411710

   > So, I agree that the [documentation](https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-3B1CE181-CD30-4178-9602-230B800D4FAE) says `Flags that control intrinsics now require the option -XX:+UnlockDiagnosticVMOptions.` However, as shown in my comment [above](https://github.com/apache/accumulo/pull/2882#issuecomment-1216515401), supplying _only_ the `-XX:+UnlockDiagnosticVMOptions` property does enable some intrinsics. I think the comments on this PR provide enough documentation on this issue. I'm fine if we close this without merging.
   
   That's not how I interpret the output you're seeing. I think all you've shown is that supplying only that option when printing the list of options allows the diagnostic options to show up in the printout. When you don't supply that option, none of the diagnostic options are included in the printout. When you do supply that option, it shows the current values of diagnostic options that you can control. I don't think you're actually enabling any options by setting the unlock flag... you're just revealing them. For the example you gave of `UseGHASHIntrinsics`, I think the default is `true`. So it's going to show up as enabled, when you include diagnostic options in the printout. But, it doesn't mean it's turned off when the flag is hidden... it just means you can't see it... because all diagnostic flags are suppressed from the printout unless you add the unlock flag.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] EdColeman commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
EdColeman commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1216666698

   If any of these are marked experimental, then I think we should not be enabling them by default.  Would providing an "experimental" config, along side (or enabled from) the standard configuration be a better path?  We could point to these things as you are likely to want, but you should test in your environment, rather than just making them our default - which seems to add weight that we *know* that they are appropriate?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1215283816

   I closed my browser tabs, but I will try to drop some knowledge here :-)
   
   https://chriswhocodes.com/ - this site shows different options for different JVMs. I assume it's mostly correct.
   
   https://alidg.me/blog/2020/12/10/hotspot-intrinsics
   
   https://www.infoworld.com/article/2073676/hotspot-jvm-options-displayed---xx--printflagsinitial-and--xx--printflagsfinal.html
   `java -XX:+PrintFlagsInitial -version` - prints flags and default values
   `java -XX:+PrintFlagsFinal -version` - prints flags and values after JVM startup
   `java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -version` - includes diagnostic options
   
   
   So, now go back to https://chriswhocodes.com/ and select the JVM that you are using. Let's use https://chriswhocodes.com/hotspot_options_openjdk11.html as an example. Now, change the `availability` drop down from `Show All` to `diagnostic`. I believe that `UnlockDiagnosticVMOptions` unlocks all of these. Note the pages at bottom right. Included in this list are inlining of various native calls and UseSha256Instrinsics, UseSha512Intrinsics, UseAESIntrinsics, etc.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] ivakegg commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
ivakegg commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1215611041

   It seems like a poorly designed side effect of "unlock diagnostic vm options" that this would automatically activate some performance related options.  That being said, whether we add this in to the default set of options should be based on how reliable those options are.  If we can count on this performance increase regardless of the updates in JVMs that come down the pike, then I am ok with this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
dlmarion commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1216515401

   I think you would end up having to add `-XX:+UnlockDiagnosticVMOptions` in any case. For example, let's say that you want to use the GHASH Intrinsic (added in https://bugs.openjdk.org/browse/JDK-8073108).
   
   It's not enabled by default:
   ```
   ~$ java -XX:+PrintFlagsFinal -version | grep -i GHash
   openjdk version "11.0.15" 2022-04-19 LTS
   OpenJDK Runtime Environment 18.9 (build 11.0.15+9-LTS)
   OpenJDK 64-Bit Server VM 18.9 (build 11.0.15+9-LTS, mixed mode, sharing)
   ```
   
   If you enable just that option, you get the message saying you have to add `-XX:+UnlockDiagnosticVMOptions`:
   ```
   ~$ java -XX:+PrintFlagsFinal -XX:+UseGHASHIntrinsics -version | grep -i GHash
   Error: VM option 'UseGHASHIntrinsics' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.
   Error: The unlock option must precede 'UseGHASHIntrinsics'.
   Error: Could not create the Java Virtual Machine.
   Error: A fatal exception has occurred. Program will exit.
   ```
   
   When added:
   ```
   ~$ java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:+UseGHASHIntrinsics -version | grep -i GHash
        bool UseGHASHIntrinsics                       = true                                   {diagnostic} {command line}
   openjdk version "11.0.15" 2022-04-19 LTS
   OpenJDK Runtime Environment 18.9 (build 11.0.15+9-LTS)
   OpenJDK 64-Bit Server VM 18.9 (build 11.0.15+9-LTS, mixed mode, sharing)
   ```
   
   But also enabled if you don't add `-XX:+UseGHASHIntrinsics` (and it's supported on your platform, etc.):
   ```
   ~$ java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -version | grep -i GHash
        bool UseGHASHIntrinsics                       = true                                   {diagnostic} {default}
   openjdk version "11.0.15" 2022-04-19 LTS
   OpenJDK Runtime Environment 18.9 (build 11.0.15+9-LTS)
   OpenJDK 64-Bit Server VM 18.9 (build 11.0.15+9-LTS, mixed mode, sharing)
   ```
   
   So, if you add `-XX:+UnlockDiagnosticVMOptions` you enable *all* of the "diagnostic" options. If any of them is unreliable, then you will likely have to disable it using `-XX:-<option>`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] ctubbsii commented on pull request #2882: Add JVM flag UnlockDiagnosticVMOptions to default JVM options

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on PR #2882:
URL: https://github.com/apache/accumulo/pull/2882#issuecomment-1238435353

   Consider this:
   ```
   diff -u <(java -XX:+PrintFlagsFinal -version) <(java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -version)
   ```
   
   This appears to show a mix of options, defaulting to on and off. The extra ones with the unlock flag seems to just include the diagnostic options in the output.
   
   A related discussion can be seen at `https://github.com/trinodb/trino/issues/12253` and `https://github.com/trinodb/trino/pull/12251`. There, it is clearly suggested that the unlock flag is no longer needed, since the underlying diagnostic option defaults to the value they desire for performance. That would only make sense if the unlock flag is merely revealing the default values for these flags, and not actually altering them. It really wouldn't make sense that unlocking a set of options would alter their values.
   
   A similar user experience exists on Android phones for developer options, as well as Chrome browser flags for experimental options. It is a common thing to hide flags like these in a locked area. But, unlocking that area to change the flags doesn't actually change them from their defaults. It merely grants you access. It really seems like that's the same design here. Unless we can actually demonstrate that the unlock flag is enabling features, by actually measuring it, and not merely interpreting the printout, I'm inclined to think that is the same design here... and this flag isn't needed at all.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org