I have installed Openfire server I want to increase the Java memory size how I can do this
please help
Have a look at this tutorial: http://www.igniterealtime.org/community/docs/DOC-1033
You're probably interested in the section that is called 'heap settings'.
In the openfire/bin directory, add a vmoptions file. The first part of the name of the vmoptions file should be the same as the executable running the Openfire service. For example, on Windows running as a service, you'd create a file named openfire-service.vmoptions. Among other things in this file, you can define the minimum and maximum memory to allocate to the process in the Java VM.
For example:
-Xms512m
-Xmx1024m
It's worth noting that you're bound to the 32 bit 2 GB limit on memory size for the Java VM. While the process may need a certain amount of memory, Java also needs a certain amount. It's all taken out of the same 2 GB space for the Java VM. Giving the process all the available memory space (2 GB) leaves nothing for Java. Allocating up to 1 GB for the process (see the above example) seems to be a good mark.
The vmoptions file is used to override the defaults used by Openfire and is not included with the installation. On Linux, create a plain text file /opt/openfire/bin/openfire.vmoptions and enter your memory options. My previous post has an example format.
Alternatively, you can add the options to the INSTALL4J_ADD_VM_PARAMS= line in ./bin/openfire
I use the following and it works well:
INSTALL4J_ADD_VM_PARAMS="-Djava.net.preferIPv4Stack=true -Xms32m -Xmx128m -Xss128k -Xoss128k -XX:ThreadStackSize=128"
Hi,
if the openfire.vmoptions file does not work you may really want to do what Ryan did post and modify the Openfire start script and add as line 6 something like this: INSTALL4J_ADD_VM_PARAMS="-Djava.net.preferIPv4Stack=true -Xms32m -Xmx128m -Xss128k -Xoss128k -XX:ThreadStackSize=128"
LG
Hi Richard,
where on Windows do you have an /opt/openfire/bin path?
openfire-service.vmoptions or openfired.vmoptions should help one on Windows to set JVM parameters.
LG
I have tried all the above things nothing works for me and facing lot of problem any bady here no the perfect solution on this
I am using centos and openfire 3.3.3
amol
in /etc/sysconfig/openfire
add:
OPENFIRE_OPTS="-Xms256m -Xmx512m"
or whatever settings you want.
Hi Amol,
do you mind posting the first 10 lines of the openfire start script which you did modify to set the Xmx value?
LG
Hi All
Following are the starting lines of my server please correct me If I am doing any misstake
OS specific support. $var must be set to either true or false.
#!/bin/sh
#
#
INSTALL4J_ADD_VM_PARAMS="-Djava.net.preferIPv4Stack=true -Xms512m -Xmx1200m -Xss128k -Xoss128k -XX:ThreadStackSize=128"
cygwin=false;
darwin=false;
linux=false;
case "`uname`" in
CYGWIN*) cygwin=true ;;
Darwin*) darwin=true
if ; then
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
fi
;;
Linux*) linux=true
jdks=`ls -r1d /usr/java/j*`
for jdk in $jdks; do
if ; then
JAVA_HOME="$jdk"
break
fi
done
;;
esac
Hi Amol,
are you using the rpm install? I never saw an Openfire script which starts like this so I wonder if this one accepts this parameter.
You may want to look for the line which starts with "nohup ... java ... startup.jar" and place your Xmx value after java. It should then look similar to
cd ${OPENFIRE_HOME}/logs
nohup ${JAVA_HOME}/bin/java -Xms64m -Xmx128m -jar ../lib/startup.jar >../logs/SDTOUT.log 2>../logs/SDTERR.log &
LG
if you used the /etc/sysconfig/openfire option you would need to restart openfire for the settings to be noticed. In fact for any of the solutions here you would need to restart openfire.
service openfire restart
(on Fedora + Redhat based systems)
I just ran into a problem where my Java VM memory was pegged. I increased it from 64mb to 256mb and all is well for now. My question is what should be an acceptable limit for 400 users? Also are switching to Spark as the client if that makes a difference for this?
Thanks
my observation it should be twice of the user size in your case I will suggest 800 to 1000MB
sbrissen <forums@jivesoftware.com> wrote: amolkel,
A new message was posted in the thread "Increasing Java Memory":
http://www.igniterealtime.org/community/message/164485
Author : sbrissen
Profile : http://www.igniterealtime.org/community/people/sbrissen
Message: