Skip to main content
GKrishan
Silver ⭐️
November 23, 2019
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 ⭐️⭐️⭐️
December 4, 2019

@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 ⭐️
November 26, 2019

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 ⭐️⭐️⭐️
December 4, 2019

@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 ⭐️
December 16, 2019

Thanks for helping out .. It worked.

Translate
manishg
Gold ⭐️
March 28, 2024

Can we set these properties from kubernetes config yaml?

Translate