Openfire 3.3.2 - Win2k3

Hello,

I am curious what the normally operating memory usage is for # of users. Is there a generic template that shows roughly what the usage should be somewhere?

I am experiencing some very high java memory usage with the 1700 users I have defined. It normally runs in the 300mb range with about 300-400 users on at any one time.

Its now running in the 800-900mb memory usage with the same amount of users. It does appear to be stable, but I’‘d rather keep the memory usage down where it should be. Here’'s a snippet of the settings page.

*-----

Server Properties*

Server Uptime:

4 days, 8 hours, 40 minutes – started Jul 16, 2007 8:08:31 AM

Version:

Openfire 3.3.2

Server Home:

D:\Openfire

Server Name:

xxxx.xxxxx.xxx

Environment

JVM Version and Vendor:

1.6.0_01 Sun Microsystems Inc. – Java HotSpot™ Server VM

Appserver:

jetty-6.1.x

OS / Hardware:

Windows 2003 / x86

Locale / Timezone:

en / Pacific Standard Time (-8 GMT)

Java Memory! http://xxx.xxx.xxxx:9090/images/blank.gif!

898.29 MB of 986.12 MB (91.1%) used -


Cache Name

Max Size

Current Size

Percent Used

Effectiveness*

Favicon Hits

0.12 MB

0.00 MB

0.0%

N/A

Favicon Misses

0.12 MB

0.00 MB

0.0%

N/A

Group

1.00 MB

0.10 MB

10.1%

100.0%

Group Metadata Cache

0.50 MB

0.00 MB

1.0%

33.2%

Last Activity Cache

0.12 MB

0.01 MB

5.1%

N/A

Multicast Service

0.12 MB

0.00 MB

0.0%

N/A

Offline Message Size

0.10 MB

0.00 MB

0.0%

100.0%

Offline Presence Cache

0.50 MB

0.01 MB

2.4%

92.0%

Privacy Lists

0.50 MB

0.00 MB

0.0%

0.0%

Remote Users Existence

0.50 MB

0.00 MB

0.0%

N/A

Roster

7.72 MB

7.08 MB

91.7%

50.5%

User

0.50 MB

0.18 MB

35.1%

98.1%

VCard

0.50 MB

0.14 MB

28.2%

66.2% -


The only thing I have defined to modify the cache values is for the roster size because of the sheer number of users I have which is the following value.

cache.username2roster.size 16192000

Since I’'ve defined this, but not the timeout value, should I do that also? I have not yet rebooted from the 8mb size I set previously.

Thoughts?

Message was edited by: ldove

Message was edited by: ldove

Update:

A short time after I posted this, the memory dropped back to its normal operating range of 200-300mb java memory. I’'ve updated the memory allocation to minimum 1024m and 1536m in the java vmoptions configuration file.

It now reads.

Java Memory

251.09 MB of 1479.12 MB (17.0%) used

So its looking pretty good. Are there processes that ramp the memory up to the maximum, and then back down? Is there something that would cause this?

Also, what is the max I can allocate to the java memory? I have 4GB of memory total in this box.

Thanks,

-Lyle

Java uses a garbage collection mechanism to free memory. If enough memory is free, Java simply allocates new memory, without running the garbage collection.

Maybe its possible to write a plugin which runs the garbage collection explicitly every n minutes. (See System.gc() method)

To compare:

I’'am running a Server with 770 Users (100-150 online). I limited memory to min. 128 Mb and max. 128 Mb, runs perfectly. Running with 64 Mb is possible to, but memory usage is always near 100%.

Coolcat

Hi,

with 300-400 users online I’'d set Xms to 150 MB and Xmx to 500 MB. If you set Xms to 1 GB the JVM will allocate 1 GB even if it does not need it. (Full) Garbage Collections will run longer as more memory must be scanned. Try to add these two line to your openfired.vmoptions file:

-XX:+PrintGCDetails

-Xloggc:…/logs/gc.log

gc.log will then contain all garbage collections so you can check if it may help a little bit to set -XX:PermSize=32m or other JVM parameters.

LG