反馈已提交

网络繁忙

You are viewing 5.1 help doc. More details are displayed in the latest help doc.

Modify FineBI Configuration Parameters

  • Recent Updates: August 25, 2022
  • Ⅰ. Overview

    FineBI is a pure B/S-side business intelligence analysis service platform; it supports deploying it on the server through a web application server, providing enterprise cloud server. Therefore, there are certain configuration requirements for the server. When the server cannot meet the use of BI, there will be a risk of downtime.

    FineBI needs to modify the used memory and other parameters after deployment to ensure the stable operation of the server.

    Ⅱ. Description of physical memory classification

    The physical memory used by BI is divided into Heap Memory and Direct Physical Memory, as shown in the following figure:

    Physical memory used by FineBI BIMax Requirements: BIMax = Xmx + MaxDirectMemorySize + FineIO + Other. To ensure host stability, BIMax <= user server memory * 7/8 is required. The specific introduction is shown in the following table:

    parametervalue
    Xmx

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

    Note: < 8GB has the risk of downtime, 32GB ~ 40GB  will cause serious performance problems, > 64GB has poor performance

    MaxDirectMemorySize

    The minimum is 2 GB, and the maximum value is not limited, but the size of the user server memory needs to be considered, FineBI Memory used (BIMax)<= User server memory * 7/8

    Note: The recommended parameter value is 2~4G

    FineIO
    • Before 2020-01-15, FineIO value is the same as MaxDirectMemorySize

    • From 2020-01-15 to 2020-08-04, if the  -Dfineio.direct_mem_limit parameter is configured, the FineIO value is the same; if not configured, the default is the same as  MaxDirectMemorySize

    • 2020-08-04 and later versions, read memory defaults to 2G, write memory defaults to 1G, and cache memory defaults to 1G (does not occupy actual memory), that is to say, FineIO occupies 3G off-heap memory by default

    Othermin (user server memory/8, 6GB)

    Note 1: When configuring parameters, please end the BI process first, and then restart the BI server after modifying the parameters and saving them.

    Note 2: It is strongly recommended that the physical machine/cloud host has at least 16GB of memory. If the physical memory is too small, it will seriously affect the computing performance and system stability of FineBI.

    Ⅲ. Modify Xmx parameters

    That is, modify the maximum heap memory to ensure stable engineering performance.

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

    Note: < 8GB has the risk of downtime, 32GB ~ 40GB  will cause serious performance problems, > 64GB has poor performance.

    1.Modify parameters when deploying directly

    If FineBI is installed directly from the installation package, you can directly modify the memory size in the finebi.vmoptions file in the %FineBI%/bin directory.

    This file is modified for both Windows and Linux/Unix systems (here in  M  units).

    1)  Windows system

    Go to the %FineBI%/bin directory and select finebi.vmoptions , as shown below:


    The content of this file is the system default memory size of 4018m, you can directly modify the value to the size you need, and add -XX:PerBytecodeRecompilationCutoff=-1 and -XX:PerMethodRecompilationCutoff=-1 parameters, as shown in the following figure:

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

    Note 2: Adding the -XX:PerBytecodeRecompilationCutoff=-1  and  -XX:PerMethodRecompilationCutoff=-1 parameters is to avoid JVM bugs, and the JIT Deoptimization mechanism may cause slowness.

    2)  Linux system

    Note: The minimum JVM memory setting is 2048, which is 2G, otherwise FineBI will not run normally.

    ① Go to the  %FineBI%/bin directory, select finebi.vmoptions, and edit the file. The command to open the file is as follows:

    cd %FineBI%/bin
    vi finebi.vmoptions

    image.png

    ② Edit the document and save it. The -Xmx value represents the maximum occupied memory of the JVM. The default unit of this value is M, which can be directly changed to the value of G unit. Such as -Xmx8G, and add -XX:PerBytecodeRecompilationCutoff=-1 and -XX:PerMethodRecompilationCutoff=-1 parameters. As shown below:

    image.png

    ③ Restart the server, see for details: Start FineBI in Linux

    ④ Enter  ps -ef|grep tomcat to view the process and check whether the parameters are configured successfully. 

    If parameter-related information appears in the process information as shown below, the configuration is successful:

    image.png

    2. Modify parameters when deploying in Tomcat

    1)  Method 1: Modify catalina file

    ① Under Windows system, modify the catalina.bat file in the %Tomcat%/bin directory and add 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% means that each added configuration parameter will take effect. If you do not use %JAVA_OPTS% to directly add multiple parameters, it will not take effect because the configuration is overwritten and read. Users can also add all configurations in one parameter, for example:

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

    After the modification is completed, restart the Tomcat server, and view the catalina.log log under %Tomcat%/logs, as shown in the following figure:

    ② Linux/Unix modify the catalina.sh file and add the following commands:

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

    Note: $JAVA_OPTS means that each added configuration parameter will take effect. If you do not use $JAVA_OPTS to directly add multiple parameters, it will not take effect because the configuration is overwritten and read.

    ③ Restart the BI server.

    ④ Enter ps -ef|grep tomcat  to view the process and check whether the parameters are configured successfully. If the parameter-related information appears in the process information as shown below, the configuration is successful:

    image.png

    2) Method 2: Modify the Start file

    You can directly modify  start.bat (Windows system) or  start.sh (Linux/Unix system), and the modification method is the same as Section 3.2.1.

    3. Modify parameters when deploying in Weblogic

    1) Method 1: Modify the startWebLogic file

    Modify the  startWebLogic file under the Weblogic installation directory %Weblogic%/domains/user project name/.

    ① In Windows system, modify the  startWebLogic.bat  file and add the following commands:

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

    ② Linux/Unix Modify the  startWebLogic.sh  file and add the following commands:

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

    After the modification, restart the server and check the process to see that the configuration takes effect, as shown below:

    image.png

    2) Method 2: Modify the commEnv file

    Modify the commEnv.bat or commEnv.sh file in the %Weblogic%/common/bin directory, the method is the same as section 3.3.1.

    4. Modify parameters when deploying in Websphere

    In the console, select "Server > Application Server > Process Definition > Java Virtual Machine for Settings", select sever1;

    Click "java and process management > process definition > java virtual machine";

    Set "JVM parameters", confirm and save after setting.

    Add "-PerMethodRecompilationCutoff=-1" and "-XX:PerMethodRecompilationCutoff=-1" to "General JVM Parameters", as shown in the following figure:

    Note 1: If you encounter an exception such as java.lang.OutOfMemoryError: PermGen space, you can add a command statement to all the places where the memory is modified: -XX:MaxPermSize=256m limit.

    Note 2: All the numbers for adjusting the memory should be adjusted according to the amount of your own data.

    Ⅳ. Add MaxDirectMemorySize parameter

    The MaxDirectMemorySize parameter is NIO's maximum off-heap memory. If not configured, it will seriously affect FineBI's computing performance and system stability. It is strongly recommended to manually configure this parameter, and At least 2GB.

    1. Modify parameters when deploying directly

    If the installation package directly installs FineBI , you can directly modify it in the FineBI.vmoptions file in the %FineBI%/bin directory . Windows and Linux/Unix systems both modify this file (here in  M  units), as shown below:

    Add parameters as shown below:

    -XX:MaxDirectMemorySize=2g

    1596504913975067.png

    Restart the project after the configuration is complete.

    2. Modify parameters when deploying in Tomcat

    ① Configuration method: enter the %Tomcat%/bin directory, find and edit the configuration file catalina,

    Windows Modify the catalina.bat file and add configuration:

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

    Indicates  MaxDirectMemorySize = 2GB, as shown in the following figure:

    After the modification is completed, restart the Tomcat server, and check the catalina.log log under %Tomcat%/logs , indicating that the configuration takes effect, as shown in the following figure:

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

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

    ② Restart the BI server.

    ③ View the process and check whether the parameters are configured successfully. If parameter-related information appears in the process information as shown below, the configuration is successful:

    image.png

    3. Modify parameters when deploying in Weblogic

    Modify the startWebLogic file;

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

    1) Windows system

    After the existing configuration parameters (startWebLogic.bat file) in section 3.3.1,

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

    Add a parameter: 

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

    Restart the project after the configuration is complete.

    2) Linux system

    Within quotation marks of the existing configuration parameters (start WebLogic.sh file) in section 3.3.1

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

    Add a parameter: 

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

    Note: If Xmx and other parameters have been configured, you can directly add -XX:MaxDirectMemorySize=2g to the configuration parameters in Section 3.3.

    As shown below:

    1598430089327280.png

    Restart the server after the configuration is complete.

    4. Modify parameters when deploying in Websphere

    1) Method 1: Console Editing (Recommended)

    Access the Websphere console, enter the JAVA virtual machine configuration interface, and add JVM parameters in the input box as described in Section 3.3.1 of this article:

    -MaxDirectMemorySize=2096

    As shown below:

    2)  Method 2: Modify the configuration file

    Modify the configuration file server.xml in the Websphere installation directory, and add JVM parameters to it:

    MaxDirectMemorySize="2096"

    As shown below:

    1598432040392617.png

    Restart the server after the configuration is complete.

    Ⅴ. Configure other JVM parameters

    1. headless mode parameters

    It is recommended to open, this parameter only needs to be modified under the Linux environment.

    1) Single-machine local deployment configuration parameters

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

    -Djava.awt.headless=true

    As shown below:

    1590576346814487.png

    ② Restart the BI server.

    ③ Enter  ps -ef|grep tomcat  to view the process and check whether the parameters are configured successfully. If the parameter-related information appears in the process information as shown below, it means the configuration is successful. :

    image.png

    2) Configuration parameters when Deploying in Tomcat

    ① Configuration method: Enter the %Tomcat%/bin directory, find and edit the configuration catalina.sh file, and add the following parameters:

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

    As shown below:

    1590576653894604.png

    ② Restart the BI server.

    ③ Enter  ps -ef|grep tomcat  to view the process and check whether the parameters are configured successfully. If the parameter-related information appears in the process information as shown below, it means the configuration is successful. :

    image.png

    3) Configuration parameters when Deploying in Weblogic

    Just add the corresponding JVM parameter configuration in the startWebLogic file.

    Modify the startWebLogic.sh file and add the -Djava.awt.headless=true configuration as follows:

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

    Restart the server after the configuration is complete.

    4) Configuration parameters when Deploying in Websphere

    Method 1: Console editing (recommended)

    Access the Websphere console, enter the JAVA virtual machine configuration interface, and add JVM parameters in the input box as described in Section 3.3.1 of this article:

    -Djava.awt.headless=true

    As shown below:

    Method 2: Modify the configuration file

    Modify the configuration file server.xml in the Websphere installation directory, and add JVM parameters to it:

    Djava.awt.headless="true"

    As shown below:

    1598433610889933.png

    Restart the server after the configuration is complete.

    2. Garbage collector

    Only the default Parallel Scavenge collector is recommended.

    If the  CMS(-XX:+UseConcMarkSweepGC) /G1(-XX:+UseG1GC)  collector is used, the Full GC of the collector is single-threaded, which may cause the system to be unresponsive for a long time, such as If not necessary, it is recommended to remove the "UseConcMarkSweepGC / UseG1GC" parameter to use the default Parallel Scavenge collector.

    The currently used garbage collector can be viewed by:

    1) View under Windows system

    Win+R to enter cmd, the command is as follows:

    java -XX:+PrintCommandLineFlags -version

    As shown below:

    2) View under Linux system

    Enter the following command

    java -XX:+PrintCommandLineFlags -version

    As shown below:

    image.png

    Ⅵ. Modify the vm.max_map_count  parameter in Linux system

    The max_map_count  file contains a limit to the number of VMAs (virtual memory areas) a process can have. A virtual memory area is a contiguous area of virtual address space. During the lifetime of the process, these areas will be created whenever the 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 a process can have. Limiting the total number of VMAs a process can have can lead to application errors, because the operating system throws out of memory errors when a process reaches the VMA online but only frees 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 , so as to avoid the number of VMAs reaching the default upper limit, causing the JVM process to crash.

    1. View current value

    sysctl -a|grep vm.max_map_count

    3.png

    2. Modify parameter value

    1) Temporary modification

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

    6.png

    2) Permanent modification

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

    vim /etc/sysctl.conf          #Edit the sysctl.conf file
    vm.max_map_count=262144         #Add code
    sysctl -p                #make the parameter take effect

    8.png

    Attachment List


    Theme: Deployment Integration
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    售前咨询电话

    400-811-8890转1

    在线技术支持

    在线QQ:800049425

    热线电话:400-811-8890转2

    总裁办24H投诉

    热线电话:173-1278-1526

    文 档反 馈

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭