Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

jvm settings from bootstrap.conf vs from outside

avatar
Expert Contributor

For nifi, we have jvm options in bootstrap.conf:

java.arg.2=-Xms512m
java.arg.3=-Xmx512m

Then we also have env variables(got to know on google search,not from official documentation) that can be set from outside(like from kubernetes config yaml):

NIFI_JVM_HEAP_INIT
NIFI_JVM_HEAP_MAX

What's the connection between these 2 sets of properties?

1 REPLY 1

avatar
Super Collaborator

java.arg.2 and java.arg.3 in bootstrap.conf: These are the traditional way of setting JVM arguments within the NiFi configuration file itself. They translate to:

java.arg.2=-Xms512m: This sets the initial heap size of the NiFi JVM to 512 megabytes (m).
java.arg.3=-Xmx512m: This sets the maximum heap size of the NiFi JVM to 512 megabytes (m).
NIFI_JVM_HEAP_INIT and NIFI_JVM_HEAP_MAX environment variables: These are environment variables that allow you to configure the JVM heap size externally. This is particularly useful when deploying NiFi in containerized environments

If both java.arg.2 / java.arg.3 and NIFI_JVM_HEAP_INIT / NIFI_JVM_HEAP_MAX are defined, the environment variables take precedence. This means the values set in the environment variables will be used to configure the JVM heap size.

@manishg