Support Questions

Find answers, ask questions, and share your expertise

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

avatar
Explorer

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.. 

1 ACCEPTED SOLUTION

avatar
Master Mentor

@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

View solution in original post

4 REPLIES 4

avatar
Contributor

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

 

avatar
Master Mentor

@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

avatar
Explorer

Thanks for helping out .. It worked.

avatar
Expert Contributor

Can we set these properties from kubernetes config yaml?