Skip to main content
GKrishan
Silver ⭐️
Nov 23, 2019 12:15 AM UTC
Solved

Where to update memory attributes for NIFI (Xms and Xmx)?

Installed CFM (Nifi) on Cloudera 6.2 using parcels. I see default 512 M being allocated for Heap size and want to increase it. I did not see nifi.properties file where I could do the same... 

 

Any guidance would be appreciated.. 

MattWho
MattWhoAnswer
Titanium ⭐️⭐️
Dec 4, 2019 3:34 PM UTC

@GKrishan 

You want to be very careful when setting safety valve in CM to override existing default property values in NiFi files.

@wengelbrecht screenshot shows creating a safety valve that would override "java.arg.2" in the NiFi bootstrap.conf file with a new value of "Xmx1024m".  The problem here is that "java.arg.2" is used to set Xms while "java.arg.3" is used to set Xmx.  So you would end up with two properties defining Xmx and missing the property for Xms.

 

Here is an example setting override safety valves in CM for both Xms and Xmx:

Screen Shot 2019-12-04 at 10.34.13 AM.png


Hope this helps,
Matt

4 replies

wengelbrecht
Gold ⭐️
Gold ⭐️
Nov 26, 2019 12:09 PM UTC

In CM, the bootstrap file is auto generated when you start NiFi, so it is not really something you can edit. 

 

However you can set the same parameters through name=value pairs as Java args in CM:

nifi.JPG

 

Translate
MattWho
Titanium ⭐️⭐️
MattWhoAnswer
Titanium ⭐️⭐️
Dec 4, 2019 3:34 PM UTC

@GKrishan 

You want to be very careful when setting safety valve in CM to override existing default property values in NiFi files.

@wengelbrecht screenshot shows creating a safety valve that would override "java.arg.2" in the NiFi bootstrap.conf file with a new value of "Xmx1024m".  The problem here is that "java.arg.2" is used to set Xms while "java.arg.3" is used to set Xmx.  So you would end up with two properties defining Xmx and missing the property for Xms.

 

Here is an example setting override safety valves in CM for both Xms and Xmx:

Screen Shot 2019-12-04 at 10.34.13 AM.png


Hope this helps,
Matt

Translate
GKrishan
GKrishanAuthor
Silver ⭐️
Dec 16, 2019 10:24 PM UTC

Thanks for helping out .. It worked.

Translate
manishg
Gold ⭐️
Mar 28, 2024 9:32 AM UTC

Can we set these properties from kubernetes config yaml?

Translate