Comments (4)
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.
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.
I'll see if I can add a small bit in the README about this
from confluent.
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)
- Initial working cookbook HOT 1
- Support schema registry
- Setup proper logging for services by default
- Support kafka
- Add unit tests
- Restart services if config files change
- Release support for kafka and schema-registry HOT 2
- Update to confluent 2.0 HOT 1
- Schema-registry service does not work HOT 1
- Kafka-rest and Schema-registry wont start after reboot HOT 1
- Bad practices in attributes/default.rb
- Bug with replacing kafka start script
- Install can build up old versions
- Connect should clean up jars not referenced in jar_urls
- Changes not reflecting in local cookbook HOT 2
- make template backups optional HOT 2
- Support for Confluent 3.3? HOT 2
- Kafka process is not correctly identified in init.d script
- Feature Request: Topic support via cookbooks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from confluent.