NFA Enterprise Edition - Performance Tuning Tips

NFA Enterprise Edition - Performance Tuning Tips

Hi All,
 
We can increase the performance of NetFlow Analyzer Enterprise Edition by making some minor changes. The performance can be increased by tunning both the JAVA and MYSQL. Since the  Enterprise Edition is on a distributed architecture, we have to tune both the central server and the collector.


Tuning Steps for the Central Server :

Java Tuning Steps:

The Java tunning has 2 steps
    1) Tunning the run.bat/.sh 
    2) Tunning wrapper.conf

 1) Tunning the run.bat/.sh

Open run.bat/sh" file  present under the <NetFlowCentral-Home>/bin directory of the Central Server installation in an editor.












 
Search for "JVM memory allocation parameters". Here insert "rem" before "SET JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx256m" and remove the "rem" in front of "SET JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1g"

After editing it will look like as given below:

     rem JVM memory allocation parameters. Uncomment and modify as appropriate.
  

     rem Settings for 1GB RAM machine
     rem SET JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx256m

     rem Settings for 2GB or more RAM machine
     SET JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1g


 2) Tunning wrapper.conf

Open "wrapper.conf " file  present under the <NetFlowCentral-Home>/conf directory of the Central Server installation in an editor. Here,  search for "wrapper.java.maxmemory" and increase the maximum memory to 1024.
                  After editing it will look like as given below:









 
                      # Maximum Java Heap Size (in MB)
                     # For 1GB RAM machine
                     wrapper.java.maxmemory=1024


If you have installed the Central Server on a Windows server, after making the needed changes with wrapper.conf, we should follow the below given steps to uninstall and reinstall the service. This is to make sure that correct settings are updated in the memory.

Steps to  uninstall the service and reinstall the service:
      1) Stop NetFlow Analyzer Central Server
      2) Open a command prompt and navigate to NetFlowCentral-Home/bin folder
      3) execute na_service -r (This uninstalls the service)
      4) execute na_service -i  (This reinstalls the service with the updated memory settings)
   

By this we come to the end of tuning for JAVA, next will be the MYSQL tuning for Central Server

MYSQL Tuning steps:

Navigate into <NetFlowCentral-Home>/conf directory. Here you will have a file called "mysqlConf.txt ", this is the file which is currently read by the product to utilize the memory for MYSQL. We have other similar files in the same folder named mysqlConf_1GB.txt, mysqlConf_2GB.txt .... mysqlConf_16GB.txt.

Here rename the current file "mysqlConf.txt" to a different name ie. "old_mysqlConf.txt". According to the available memory in the server, rename the other similar file to "mysqlConf.txt".

For example: If you have a server with 8 GB of RAM. You might have tuned Java already for 1 GB and it needs a 2 GB or RAM for other process running on the server. Hence you can tune the MYSQL for 4 GB. For this rename the file "mysqlConf_4GB.txt" to "mysqlConf.txt"


Tuning Steps for the Collector :

Java Tuning Steps:

The Java tunning has 2 steps
 1) Tunning the run.bat/.sh
 2) Tunning wrapper.conf

 1) Tunning the run.bat/.sh

Open run.bat/sh" file  present under the <NetFlowCollector-Home>/bin directory of the Collector Server installation with an editor.
search for "JVM memory allocation parameters". Here insert "rem" before "SET JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx256m" and remove the "rem" in front of "SET JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1g"



































After editing it will look like as given below:
 
     rem JVM memory allocation parameters. Uncomment and modify as appropriate.

    rem Settings for 1GB RAM machine
    rem SET JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx256m

    rem Settings for 2GB or more RAM machine
    SET JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1g








 2) Tunning wrapper.conf


Open "wrapper.conf " file  present under the <NetFlowCollector-Home>/conf directory of the Collector Server installation with an editior. Here, search for "wrapper.java.maxmemory" and increase the maximum memory to 1024.
                  After editing it will look like as given below:


 
                     # Maximum Java Heap Size (in MB)
                     # For 1GB RAM machine
                     wrapper.java.maxmemory=1024




If you have installed the Collector Server on a Windows server, after making the needed changes with wrapper.conf, we should follow the below given steps to uninstall and reinstall the service. This is to make sure that correct settings are updated in the memory.

Steps to  uninstall the service and reinstall the service:
      1) Stop NetFlow Analyzer Collector server
      2) Open a command prompt and navigate to NetFlowCollector-Home/bin folder
      3) execute na_service -r (This uninstalls the service)
      4) execute na_service -i  (This reinstalls the service with the updated memory settings)
   
Note: You do not have to tune the Mysql for the Collectors since there is no data storage done in the Collector Server.








 
Thanks and Regards
Praveen Manohar.

                New to ADSelfService Plus?