Giter VIP home page Giter VIP logo

Comments (4)

gregorskii avatar gregorskii commented on August 22, 2024

Can you provide an example in the readme about how to set the java arguments for one of the services? In other cookbooks I have used the arguments are provided as a string.

When I set the arguments in this book they are not applied to the running tasks.

MIN_HEAP_MEMORY = node['MIN_HEAP_MEMORY']
MAX_HEAP_MEMORY = node['MAX_HEAP_MEMORY']

opts = "-Xms#{MIN_HEAP_MEMORY}m -Xmx#{MAX_HEAP_MEMORY}m"

node.default["confluent"]["kafka"]["env_vars"] = {
  '_JAVA_OPTIONS' => opts
}
conflue+ 25416  6.9  4.7 4299520 377084 ?      Sl   00:58   0:02 java -Xmx1G -Xms1G -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+D
conflue+ 25503  9.7  3.1 4259460 255608 ?      Sl   00:59   0:03 java -Xmx256M -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+Disabl
conflue+ 25568 12.2  3.2 4255248 261332 ?      Sl   00:59   0:03 java -Xmx512M -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+Disabl
conflue+ 25654 95.1 14.7 4251696 1178788 ?     Sl   00:59   0:19 java -Xmx256M -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+Disabl

The tasks seem to have their default memory settings.

from confluent.

bbaugher avatar bbaugher commented on August 22, 2024

You are correct that the environment variables config is the best way to set java options. The next is what environment variables to set. This is provided by kafka and its run/start server scripts. You can see an example here where its using $KAFKA_JVM_PERFORMANCE_OPTS and provides the value -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true by default. There are others for heap ($KAFKA_HEAP_OPTS).

I'd assume these environment variables are the same as the ones in confluent's kafka package but you may need to verify in its package/distribution.

from confluent.

bbaugher avatar bbaugher commented on August 22, 2024

I'll see if I can add a small bit in the README about this

from confluent.

gregorskii avatar gregorskii commented on August 22, 2024

Perfect thank you for pointing that out, appreciate it.

I didn’t know if it was global java options or per argument ones on Kafka, great to have clarity.

👍

from confluent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.