When I write this post, i really feel annoyed, why i always do the same “ugly” thing when upgrade the java virtual memory which openfire could use. So after i post this thing, i hope there’s no one do the same thing like me. Here is the step by step to increase the java virtual memory.
1. On the directory /opt/openfire/bin/ create a new file called “vmoptions”, and inside the file, write this script :
where NN means how much memory you would to assigned to openfire
2. Edit the /opt/openfire/bin/openfire file, add a script below this line :
add this :
INSTALL4J_ADD_VM_PARAMS=”-Djava.net.preferIPv4Stack=true -Xms2048m -Xmx2650m -Xss256k -Xoss256k -XX:ThreadStackSize=256″
The Xms and Xmx value must be same as the NN number
3. Restart your openfire server