Modifying FineBI Configuration Parameters

  • Last update:  2023-03-31
  • Overview

    FineBI is a commercial business intelligence analysis service platform that runs purely on the B/S end. It supports deployment on servers through a web application server, providing enterprise cloud servers. Therefore, there are certain configuration requirements for the server. When the server cannot meet the requirements for running FineBI, there is a risk of server downtime.

    After deployment, FineBI needs to modify its memory usage and other parameters to ensure stable server operation.

    Classification of Physical Memory Used in FineBI

    The physical memory used in FineBI is classified into Heap memory and Direct Physical memory.

    Requirements for the physical memory BIMax used in FineBI:

    BIMax = Xmx + MaxDirectMemorySize + FineIO + Other.

    To ensure server stability, it is required that BIMax be less than or equal to the user server memory multiplied by 7/8. The details are shown in the table below:

    Parameter

    Value

    Xmx

    8 GB <= Xmx < 32 GB (must be < 32 GB) or 40 GB <= Xmx <= 64 GB

    Note: Less than 8 GB poses a risk of server downtime, 32 GB - 40 GB will cause severe performance issues, and > 64 GB will result in poor performance.

    MaxDirectMemorySize

    The minimum requirement is 2 GB, with no upper limit. But it is necessary to consider the size of the user server memory. FineBI's memory usage (BIMax) should be less than or equal to the user server memory multiplied by 7/8.

    Note: It is recommended to set the parameter value between 2 - 4 GB.

    FineIO

    • For versions before 2020/01/15, FineIO value is the same as MaxDirectMemorySize.

    • For versions between 2020/01/15 and 2020/08/04, if the -Dfineio.direct_mem_limit parameter is configured, FineIO value is the same as it; if not configured, it defaults to MaxDirectMemorySize.

    • For versions after 2020/08/04, the default read memory is 2 GB, write memory is 1 GB, and cache memory is 1 GB (does not occupy actual memory), which means that FineIO defaults to using 3 GB off-heap memory.

    Other

    minuser server memory/8, 6 GB

    Note: 

    1. When configuring parameters, you should end the BI process first, save the modified parameters, and then restart the FineBI project.

    2. It is strongly recommended that the physical memory of the physical/cloud host be at least 16 GB. Insufficient physical memory will severely affect FineBI's computing performance and system stability.

    Modifying Xmx Parameter

    It means to modify the maximum on-heap memory to ensure stable project performance.

    It is strongly recommended to manually configure the Xmx parameter, and modify the memory to 8 GB ≤ Xmx < 32 GB (must be < 32 GB) or 40 GB <= Xmx <= 64 GB.

    Note: Less than 8 GB poses a risk of server downtime, 32 GB to 40 GB will cause severe performance issues, and more than 64 GB will result in poor performance.

    Modifying Xmx Parameter for Direct Deployment

    If you install FineBI directly from the installation package, the memory size can be modified by editing the finebi.vmoptions file in the %FineBI%/bin directory. This file can be modified on both Windows and Linux/Unix systems (measured in MB).

    1. Windows System

    a. Go to the %FineBI%/bin directory and select finebi.vmoptions.

    b. The content of the file is the default memory size of 4018 MB, which can be directly modified to the required size, and the -XX:PerBytecodeRecompilationCutoff=-1 and -XX:PerMethodRecompilationCutoff=-1 parameters should be added.

    Note: 1. There should be no space between Xmx and the number.

    2. Adding the -XX:PerBytecodeRecompilationCutoff=-1 and -XX:PerMethodRecompilationCutoff=-1 parameters is to avoid a JVM bug where the JIT's Deoptimization mechanism may cause slow performance.


    c. After modification, restart FineBI.

    2. Linux System

    Note: You should set the minimum JVM memory to 2048 (2 GB) in order for FineBI to run properly.

    a. Go to the %FineBI%/bin directory and select finebi.vmoptions. Edit the file and save it. To open the file, use the following command:

    cd %FineBI%/bin
    vi finebi.vmoptions

    b. Edit the document and save it.The value of -Xmx represents the maximum memory that JVM can use, with the unit defaulting to MB. It can be directly changed to a value with the unit of GB, such as -Xmx8G. Also, add the parameters -XX:PerBytecodeRecompilationCutoff=-1 and -XX:PerMethodRecompilationCutoff=-1.

    c. Restart FineBI. For details, see Starting FineBI in Linux.

    d. Enter ps -ef|grep tomcat to view the process and check if the parameters have been configured successfully. If the process information appears with relevant parameter information as shown below, it indicates that the configuration is successful:

    Modifying Parameters in Tomcat Deployment

    1. Method 1: Modifying catalina File

    a. Modify the catalina.bat file in the %Tomcat%/bin directory on a Windows system by adding the following command:

    set JAVA_OPTS=%JAVA_OPTS% -Xms4g -Xmx8g
    set  JAVA_OPTS=%JAVA_OPTS% -XX:PerBytecodeRecompilationCutoff=-1 
    set  JAVA_OPTS=%JAVA_OPTS% -XX:PerMethodRecompilationCutoff=-1

    Note: "%JAVA_OPTS%" is used to ensure that every added configuration parameter takes effect. If multiple parameters are added directly without using "%JAVA_OPTS%", they may not take effect due to configuration override. Users can also add all configurations in a single parameter, for example:

    set JAVA_OPTS=%JAVA_OPTS% -Xms4g -Xmx8g -XX:PerBytecodeRecompilationCutoff=-1 -XX:PerMethodRecompilationCutoff=-1

    Restart the project after completing modification. View catalina.log log in %Tomcat%/logs.

    b. Open the catalina.sh file in Linux/Unix system. Add the following command before the cygwin=false line in the file:

    JAVA_OPTS="$JAVA_OPTS -Xms4g -Xmx8g -XX:PerBytecodeRecompilationCutoff=-1 -XX:PerMethodRecompilationCutoff=-1"

    Note: "$JAVA_OPTS" is used to ensure that every added configuration parameter takes effect. If multiple parameters are added directly without using "$JAVA_OPTS", they may not take effect due to configuration override.

    c. Restart the project.

    d. Enter ps -ef|grep tomcat to view the process and check if the parameters have been configured successfully. If the process information appears with relevant parameter information as shown below, it indicates that the configuration is successful:

    2. Method 2: Modifying the Start File

    You can directly modify the start.bat file (Windows system) or start.sh file (Linux/Unix system), using the same method as in Method 1: Modifying catalina File.

    Modifying Parameters in WebLogic Deployment

    1. Method 1: Modifying the startWebLogic File

    Modify the startWebLogic file in the installation directory of Weblogic: %Weblogic%/domains/user_project_name/.

    a. On a Windows system, modify the startWebLogic.bat file by adding the following command:

    set MEM_ARGS= -Xms4096m–Xmx8192m -XX:PerBytecodeRecompilationCutoff=-1 -XX:PerMethodRecompilationCutoff=-1

    b. On a Linux/Unix system, modify the startWebLogic.sh file by adding the following command:

    MEM_ARGS=" -Xms4096m -Xmx8192m -XX:PerBytecodeRecompilationCutoff=-1 -XX:PerMethodRecompilationCutoff=-1"

    After modifying and restarting the project, you can view the process to see that the configuration has taken effect.


    2. Method 2: Modifying the commEnv File

    Modify the commEnv.bat or commEnv.sh file in the %Weblogic%/common/bin directory, using the same method as in Method 1: Modifying the startWebLogic File.

    Adding the MaxDirectMemorySize Parameter

    The MaxDirectMemorySize parameter is the maximum amount of NIO off-heap memory. Failure to configure this parameter can severely affect FineBI's computing performance and system stability. It is strongly recommended to manually configure this parameter and set it to at least 2 GB.

    Modifying Parameters for Direct Deployment

    If you install FineBI directly from the installation package, you can modify the FineBI.vmoptions file  in the %FineBI%/bin directory. This file should be modified for both the Windows and Linux/Unix systems (in this case, the unit is MB).

    Add the parameter as shown below:

    -XX:MaxDirectMemorySize=2g


    Restart the project after completing deployment.

    Modifying Parameters in Tomcat Deployment

    1. Configuration Method: Go to the %Tomcat%/bin directory, find and edit the configuration file catalina.

    For Windows, modify the catalina.bat file and add the following configuration:

    set JAVA_OPTS=%JAVA_OPTS% -XX:MaxDirectMemorySize=2g

    To set MaxDirectMemorySize to 2 GB.

    After completing the configuration, restart the project, and view the catalina.log log in %Tomcat%/logs to confirm that the configuration has taken effect.

    Modify the catalina.sh file in Linux/Unix and add the configuration:

    JAVA_OPTS="$JAVA_OPTS -XX:MaxDirectMemorySize=2g"

    2. Restart the project after completing the configuration.

    3. Check the process to verify whether the parameter configuration is successful. If the relevant parameter information appears in the process information as shown below, it indicates that the configuration is successful:


    Modifying Parameters in WebLogic Deployment

    Modify startWebLogic file.

    Modify the startWebLogic file in the installation directory %Weblogic%/domains/user project name/ of Weblogic, and add a configuration.

    1. Windows System

    Add the following parameter after the existing configuration parameters (in the startWebLogic.bat file) in section Method 1: Modifying the startWebLogic File: set MEM_ARGS= -Xms4096m -Xmx8192m -XX:PerBytecodeRecompilationCutoff=-1 -XX:PerMethodRecompilationCutoff=-1.

    -XX:MaxDirectMemorySize=2g     #Represent MaxDirectMemorySize = 2GB

    Restart the project after completing the configuration.

    2. Linux System

    Add the following parameter inside the quotes of the existing configuration parameter (in the startWebLogic.sh file) MEM_ARGS=" -Xms4096m -Xmx8192m -XX:PerBytecodeRecompilationCutoff=-1 -XX:PerMethodRecompilationCutoff=-1":

    -XX:MaxDirectMemorySize=2g      #Represent MaxDirectMemorySize = 2GB

    Note: If you have configured the Xmx parameter, you can directly add XX:MaxDirectMemorySize=2g in the configuration parameters in section Modifying Parameters in WebLogic Deployment.


    Restart the project after completing configuration.

    Configuring Other JVM Parameters

    headless Mode Parameter

    It is recommended to enable this parameter, which only needs to be modified in a Linux environment.

    1. Configuration Parameters for Local Single-machine Deployment

    a. Add the following parameters to the FineBI.vmoptions file in the %FineBI%/bin directory:

    -Djava.awt.headless=true

    b. Restart the project after completing the configuration.

    c. Enter ps -ef|grep tomcat to check the process and verify whether the parameter configuration is successful. If the relevant parameter information appears in the process information as shown below, it indicates that the configuration is successful:

    2. Configuration Parameters for Tomcat Deployment

    a. Configuration method: enter %Tomcat%/bin directory, find and edit the catalina.sh file to add the following parameters:

    JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

    b. Restart the project after completing the configuration.

    c. Enter ps -ef|grep tomcat to check the process and verify whether the parameter configuration is successful. If the relevant parameter information appears in the process information as shown below, it indicates that the configuration is successful:

    3. Configuration Parameters for WebLogic Deployment

    Add corresponding JVM parameters in the startWebLogic file.

    Edit the startWebLogic.sh file and add -Djava.awt.headless=true configuration.

    JAVA_OPT="${JAVA_OPT} -Djava.awt.headless=true"

    Restart the project after completing the configuration.

    Garbage Collector

    It is recommended to use only the default Parallel Scavenge collector.

    If the CMS (-XX:+UseConcMarkSweepGC) / G1 (-XX:+UseG1GC) collector is used, the Full GC of this collector is single-threaded, which may cause the system to be unresponsive for a long time. If not necessary, it is recommended to remove the UseConcMarkSweepGC / UseG1GC parameter and use the default Parallel Scavenge collector. The current garbage collector in use can be viewed using the following method:

    1. Viewing in Windows System

    Enter cmd by pressing win+R, as shown in the following command:

    java -XX:+PrintCommandLineFlags -version

    2. Viewing in Linux System

    Enter the following command:

    java -XX:+PrintCommandLineFlags -version


    Modifying the vm.max_map_count Parameter in the Linux System

    The max_map_count file contains the limit on the number of virtual memory areas (VMA) that a process can have. A virtual memory area is a contiguous virtual address space region. Throughout the lifetime of a process, these areas are created whenever a program attempts to map a file in memory, link to a shared memory segment, or allocate heap space.

    Tuning this value will limit the number of VMAs that a process can have. Limiting the total number of VMAs that a process can have may cause application errors. Because the operating system might throw an out of memory error when the process reaches the VMA limit and can only release a small amount of memory for other kernel processes to use.

    It is recommended to adjust the value of the vm.max_map_count parameter to 262144 to prevent the number of VMAs from reaching the default upper limit and causing the JVM process to crash.

    Viewing Current Value

    sysctl -a|grep vm.max_map_count

    Modifying Parameter Value

    1. Temporary Modification

    sysctl -w vm.max_map_count=262144
    sysctl -a|grep vm.max_map_count

    2. Permanent Modification

    Edit the sysctl.conf file, add vm.max_map_count=262144, save the file, and use sysctl -p to make the parameter take effect.

    vim /etc/sysctl.conf  #Editsysctl.conf文件
    vm.max_map_count=262144  #Add code
    sysctl -p  #Make the parameter take effect

    附件列表


    主题: Deployment and Integration
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy