read JVM Settings and Debugging and enable at least the GC log. When things tend to get slow you should look at the gc log and make sure that the garbage collections are not the reason for the slowdown.
You may even want to take some stacktraces / javacores and monitor the whole server. Is it idle or busy when Openfire gets slow?
I did add some strings on openfire file ( INSTALL4J_ADD_VM_PARAMS="-Xms32m -Xmx2048m -Xss128k -Xoss128k -XX:ThreadStackSize=128 -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true" )
I has worked for 4 days with 1% of memory usage. Since yesterday it has become to slowdown again . Like 99% of memory usage.
My server is 90% of hardisk space usage FREE and I got a 2GB ram server
Openfires up to and including version 3.6.4 suffer from a memory leak in its PEP component. If your Openfire domain is crashing with OutOfMemoryExceptions, you might be having this problem.
As a workaround, you can disable PEP, by setting the Openfire property xmpp.pep.enabled to false.
More information can be found in this discussion: Openfire 3.6.4 memory leak with Empathy
Maybe it help. In any case you should enable the gc log which shows the memory usage and the time for gcs. With 1% memory usage you should be able to set Xmx to 100 MB or less.