OpenFire/server

[Configure] How to configure Openfire's caches

Dev_Kyle 2015. 12. 21. 09:47


[https://community.igniterealtime.org/docs/DOC-1673]


How to configure Openfire's caches         

    Openfire uses caches to improve performance. Caches can be configured to hold more or less objects in memory and also the amount of time an object will be kept in memory. Big caches can improve performance but very big caches may decrease it since more memory will be used and Java may have to work hard to make room for other objects in memory. In summary, the proper size of the cache should be estimated for each installation based on the number of concurrent users, the roster size, vCard size, number of groups, etc.

     

    Openfire does not provide the option to configure cache properties from the admin console in an easy way. For now you have to create new system properties in the admin console and set the required value. After changing a cache property you will need to restart the server so that the change is actually used.

     

    These are the names of the properties that you can define and configure. The *.size properties define the max size in bytes the cache may be. The *.maxLifetime defines the default max lifetime of the cache, in milliseconds.?

    More caches are defined in http://www.igniterealtime.org/fisheye/browse/svn-org/openfire/trunk/src/java/org /jivesoftware/util/cache/CacheFactory.java?r=trunk

     

    Cache
    Size
    Expiration
    vCard cache.vcardCache.size cache.vcardCache.maxLifetime
    User cache.userCache.size cache.userCache.maxLifetime
    Existence of remote users cache.remoteUsersCache.size cache.remoteUsersCache.maxLifetime
    Roster cache.username2roster.size cache.username2roster.maxLifetime
    Group cache.group.size cache.group.maxLifetime
    Group Users cache.userGroup.size cache.userGroup.maxLifetime
    Privacy List cache.listsCache.size cache.listsCache.maxLifetime
    Support of XEP-133 by remote servers cache.multicast.size cache.multicast.maxLifetime
    Offline Message cache.offlinemessage.size cache.offlinemessage.maxLifetime
    POP3 auth users cache.pop3.size cache.pop3.maxLifetime
    File Transfer cache.fileTransfer.size cache.fileTransfer.maxLifetime
    LDAP cache.ldap.size cache.ldap.maxLifetime

     

    Some values are set in http://fisheye.igniterealtime.org/browse/openfire/trunk/src/java/org/jivesoftwar e/util/cache/DefaultLocalCacheStrategy.java?hb=true

     

    The information below contains the settings for Openfire 3.7.1.

     

    Default values for size is 256 KB and lifetime 6 hours.

     

    cache.fileTransfer.size 128 * 1024
    cache.fileTransfer.maxLifetime 1000 * 60 * 10
    cache.multicast.size 128 * 1024
    cache.multicast.maxLifetime JiveConstants.DAY
    cache.offlinemessage.size 100 * 1024
    cache.offlinemessage.maxLifetime JiveConstants.HOUR * 12
    cache.pop3.size 512 * 1024
    cache.pop3.maxLifetime JiveConstants.HOUR
    cache.transferProxy.size -1
    cache.transferProxy.maxLifetime 1000 * 60 * 10
    cache.group.size 1024 * 1024
    cache.group.maxLifetime JiveConstants.MINUTE *  15
    cache.groupMeta.size 512 * 1024
    cache.groupMeta.maxLifetime JiveConstants.MINUTE *  15
    cache.javascript.size 128 * 1024
    cache.javascript.maxLifetime 3600 * 24 * 10
    cache.ldap.size 512 * 1024
    cache.ldap.maxLifetime JiveConstants.HOUR * 2
    cache.listsCache.size 512 * 1024
    cache.offlinePresence.size 512 * 1024
    cache.lastActivity.size 128 * 1024
    cache.userCache.size 512 * 1024
    cache.userCache.maxLifetime JiveConstants.MINUTE *  30
    cache.remoteUsersCache.size 512 * 1024
    cache.remoteUsersCache.maxLifetime JiveConstants.MINUTE *  30
    cache.vcardCache.size 512 * 1024
    cache.faviconHits.size 128 * 1024
    cache.faviconMisses.size 128 * 1024
    cache.routeServer.size -1
    cache.routeServer.maxLifetime -1
    cache.routeComponent.size -1
    cache.routeComponent.maxLifetime -1
    cache.routeUser.size -1
    cache.routeUser.maxLifetime -1
    cache.routeAnonymousUser.size -1
    cache.routeAnonymousUser.maxLifetime -1
    cache.routeUserSessions.size -1
    cache.routeUserSessions.maxLifetime -1
    cache.componentsSessions.size -1
    cache.componentsSessions.maxLifetime -1
    cache.connManagerSessions.size -1
    cache.connManagerSessions.maxLifetime -1
    cache.incServerSessions.size -1
    cache.incServerSessions.maxLifetime -1
    cache.sessionsHostname.size -1
    cache.sessionsHostname.maxLifetime -1
    cache.secretKeys.size -1
    cache.secretKeys.maxLifetime -1
    cache.validatedDomains.size -1
    cache.validatedDomains.maxLifetime -1
    cache.directedPresences.size -1
    cache.directedPresences.maxLifetime -1
    cache.serverFeatures.size -1
    cache.serverFeatures.maxLifetime -1
    cache.serverItems.size -1
    cache.serverItems.maxLifetime -1
    cache.serversConfigurations.size 128 * 1024
    cache.serversConfigurations.maxLifetime JiveConstants.MINUTE *  30