Skip to content
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

K8SSAND-1853 ⁃ Support additional jvm options for the various option files #737

Closed
adejanovski opened this issue Oct 24, 2022 · 3 comments · Fixed by #738
Closed

K8SSAND-1853 ⁃ Support additional jvm options for the various option files #737

adejanovski opened this issue Oct 24, 2022 · 3 comments · Fixed by #738
Labels
enhancement New feature or request

Comments

@adejanovski
Copy link
Contributor

adejanovski commented Oct 24, 2022

Cassandra uses multiple jvm options files (jvm.options, jvm-server.options, jvm8-server.options, jvm11-server.options, cassandra-env.sh), and we're currently allowing to pass unstructured options to cassandra-env.sh only.

We'd need to have new []string additional jvm options fields for each file in the CassandraConfig.JvmOptions struct:

config:
  jvmOptions:
      additionalJvmServerOptions:
        - '-XX:+UseConcMarkSweepGC'
        - '-XX:+UseCMSInitiatingOccupancyOnly'
        - '-XX:+CMSParallelInitialMarkEnabled'
      additionalJvm8ServerOptions:
        - '-XX:ThreadPriorityPolicy=42'
      additionalJvm11ServerOptions:
        - '-Djdk.attach.allowAttachSelf=true'

would map in the cassdc to:

  config:
    jvm-server-options:
      additional-jvm-opts:
        - '-XX:+UseConcMarkSweepGC'
        - '-XX:+UseCMSInitiatingOccupancyOnly'
        - '-XX:+CMSParallelInitialMarkEnabled'
    jvm11-server-options:
      additional-jvm-opts:
        - '-Djdk.attach.allowAttachSelf=true'
    jvm8-server-options:
      additional-jvm-opts:
        - '-XX:ThreadPriorityPolicy=42'

Additional options for the cassandra-env.sh would still be handled by the  JvmOptions.AdditionalOptions field as they currently are.

┆Issue is synchronized with this Jira Task by Unito
┆friendlyId: K8SSAND-1853
┆priority: Medium

@sync-by-unito sync-by-unito bot changed the title Support additional jvm options for the various option files K8SSAND-1853 ⁃ Support additional jvm options for the various option files Oct 24, 2022
@adutra
Copy link
Contributor

adutra commented Oct 24, 2022

Currently in k8ssandra-operator, JVM options are exposed as a high-level, schemaful struct. The operator assigns each user-provided value to the appropriate cass-config-builder key, so the whole complexity around having multiple JVM options files is hidden from the user.

What you are asking would require to go schemaless for JVM options, pretty much what we did for cassandra.yaml and dse.yaml recently.

@adejanovski
Copy link
Contributor Author

What you are asking would require to go schemaless for JVM options, pretty much what we did for cassandra.yaml and dse.yaml recently.

I'd say it's a little different since we're trying to assign a list of strings to separate options files, whereas the cassandra and dse yaml files are structured as a map[string]interface{} type, all going to the same file.

Based on our offline conversation, what do you think of the following structure?

      - config:
          jvmOptions:
            additionalJvm11ServerOptions:
              - '-XX:+UseConcMarkSweepGC'
              - '-XX:+CMSParallelRemarkEnabled'
              - '-XX:+UseCMSInitiatingOccupancyOnly'
            additionalJvm8ServerOptions:
              - '-XX:ThreadPriorityPolicy=42'
            additionalJvmServerOptions:
              - '-Dio.netty.maxDirectMemory=0'

@adutra
Copy link
Contributor

adutra commented Oct 24, 2022

Yes, after our conversation, I agree that your suggestion is a good compromise. 👍

@adejanovski adejanovski added zh:In-Progress Issues in the ZenHub pipeline 'In-Progress' enhancement New feature or request labels Oct 25, 2022
@adejanovski adejanovski added zh:Ready-For-Review Issues in the ZenHub pipeline 'Ready-For-Review' zh:Review Issues in the ZenHub pipeline 'Review' and removed zh:In-Progress Issues in the ZenHub pipeline 'In-Progress' zh:Ready-For-Review Issues in the ZenHub pipeline 'Ready-For-Review' labels Oct 25, 2022
@adejanovski adejanovski removed the zh:Review Issues in the ZenHub pipeline 'Review' label Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants