The following sub-sections discuss the various performance tuning recommendations that need to be applied for WSO2 EMM, and the configurations that need to take place:
OS Level Settings
This section describes some recommended performance tuning configurations to optimize WSO2 EMM. It assumes that you have set up WSO2 EMM on Unix/Linux, which is recommended for a production deployment.
To optimize OS performance, increase the file descriptor count as follows in the
/etc/sysctl.conffile of Linux. For more information, see Setting the file descriptor count.
fs.file-max = 2097152
To alter the number of allowed open files for system users, configure the following settings in the
limits.confLinux file, which is in the
/etc/security/directory. For more information see, Setting maximum open file descriptor limits.
Optimal values for these parameters depend on the environment.
To alter the maximum number of processes your user is allowed to run at a given time, configure the following settings in the
/etc/security/limits.conffile of Linux (be sure to include the leading * character). Each carbon server instance you run would require upto 1024 threads (with default thread pool configuration). Therefore, you need to increase the nproc value by 1024 for each carbon server (both hard and soft).
If one or more worker nodes in a clustered deployment require access to the management console, you would need to increase the entity expansion limit as follows in the
<EMM_HOME>/bin/wso2server.bat file (for windows) or the
<EMM_HOME>/bin/wso2server.sh file (for Linux/Solaris). The default entity expansion limit is 64000.
WSO2 EMM Settings
- Memory allocated for WSO2 EMM can be changed by modifying the
wso2server.shfile, which is in the
<EMM_HOME>/bin/directory. For more information see, Setting JVM memory allocation limits for WSO2 EMM.
- Increase the pool size of the database connections. We recommend having 200 connections per datasource in production instances. This can be changed by setting the
<maxActive>property to 200 in the relevant datasources
master-datasources.xmlfile, which is in the
Setting the file descriptor count
The maximum file descriptor limit should be 2097152. If you wish to check the file descriptor count, execute the following command:
The above command will return counts of file descriptors in the following format:
<in_use> <unused_but_allocated> <maximum>
Follow the instructions below to increase the file descriptor count:
- Log in as a
sysctl.conffile, which is in the
Add or edit the following line in the file as follows and reboot the system.
fs.file-max = 2097152
Setting maximum open file descriptor limits
Follow the instructions below to set the maximum open file descriptor limits in Linux:
- Log in as a
- Open the
limits.conffile, which is in the
Add or edit the following two lines in the file.
An asterisk * has been added at the start of the entry to set the maximum open file descriptor limit for all the users. However, if you wish to set the open file descriptor limit only for a specific user, enter that respective user's username instead of an asterisk.
- The soft limit defines the minimum number of file handles or open files that the users will have after they log in.
The hard limit defines the maximum number of file handles or open files that the users will have after they log in.
If you encounter an error message about running out of file handles, then the hard limit can be increased.
Setting JVM memory allocation limits for WSO2 EMM
Follow the instruction below to change the JVM memory allocation limits for WSO2 EMM:
- Navigate to the
<EMM_HOME>/bin/directory and open the
- Locate the following entry:
-Xms256m -Xmx1024m -XX:MaxPermSize=256m
- Update the above entry as follows and save the
-Xms2048m -Xmx2048m -XX:MaxPermSize=1024m
The Java Virtual Machine (JVM) memory allocation pool limits have been described as follows:
-This specifies the initial memory allocation pool for a JVM.
-This specifies the maximum memory allocation pool for a JVM.
-The permanent space is where the classes, methods, internalized strings, and similar objects used by the VM are stored and never deallocated. This defines the maximum space that will be allocated as permanent space.
The default JDK value is assigned to XX:MaxPermSize from JDK 8 and above. Therefore you need not use the
XX:MaxPermSizeif you are running WSO2 EMM on JDK 8 and above.