The following sub-sections explain how the recommended performance tuning values can be set:
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: sysctl fs.file-nr
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
root
user. Open the
sysctl.conf
file, which is in the/etc/
directory.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
root
user. - Open the
limits.conf
file, which is in the/etc/security/
directory. Add or edit the following two lines in the file.
* soft nofile 4096 * hard nofile 65535
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 thewso2server.sh
file. - Locate the following entry:
-Xms256m -Xmx1024m -XX:MaxPermSize=256m
- Update the above entry as follows and save the
wso2server.sh
file.
-Xms2048m -Xmx2048m -XX:MaxPermSize=1024m
The Java Virtual Machine (JVM) memory allocation pool limits have been described as follows:
-
-Xms
-
-
-Xmx
-
-XX:MaxPermSize
-
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 the value you assign to
XX:MaxPermSize
will not be taken only if you are running EMM on JDK 8 and above.
-