This chapter describes how to enhance the tuning and performance of Oracle Communications Instant Messaging Server.
Use the most current version of Java suitable for your operating system and version of Instant Messaging Server. For information about Java versions, see the topic on installing Java in Unified Communication Suite Installation and Configuration Guide.
Instant Messaging Server uses the iim.jvm.maxmemorysize configuration property to set the maximum size of the Java Virtual Machine (JVM) heap to allocate. The default value of this property is 256 Mbytes. However, a large active deployment of Instant Messaging Server needs more memory. Determining the amount of memory to allocate for the Instant Messaging server depends on the number of concurrent active users that you must support.
Additional load per user, use of additional Instant Messaging Server services like news or file transfer, and use of features such as message filters, archiving, or TLS require more memory. You should perform load profiling of typical user activity before deploying Instant Messaging Server into a production environment. Contact Oracle Support Services for more information about load profiling an Instant Messaging Server deployment.
Table 7-1 describes the Java Virtual Machine (JVM) options that you should set on both the Instant Messaging Server and multiplexor.
Table 7-1 JVM Options for Instant Messaging Server and Multiplexor
JVM Option | Description |
---|---|
-XX:+DisableExplicitGC |
By default calls to System.gc() are enabled (-XX:-DisableExplicitGC). Use -XX:+DisableExplicitGC to disable calls to System.gc(). The JVM still performs garbage collection when necessary. |
-XX:+UseG1GC |
Use the Garbage First (G1) Collector. |
-XX:MaxGCPauseMillis=n |
Sets a target for the maximum garbage collection pause time. This is a soft goal, and the JVM makes its best effort to achieve it. |
-XX:GCPauseIntervalMillis |
Sets the time interval over which garbage collection pauses totaling up to MaxGCPauseMillis can take place. |
-XX:+PrintGCTimeStamps |
Prints timestamps at garbage collection. |
-XX:+PrintGCDetails |
Prints more details at garbage collection. |
-XX:+PrintGCDateStamps |
Prints date stamps at garbage collection events. |
-Xloggc:filename |
Logs garbage collection verbose output to specified file. The verbose output is controlled by the normal verbose garbage collection flags. |
Table 7-2 lists the set of properties that you configure to tailor the size and behavior of thread pools used to service client-to-server and server-to-server requests.
Table 7-2 Thread Pooling and Service Port Properties
Property | Description | Default Value |
---|---|---|
iim_server.maxthreads |
Maximum number of threads for the default thread pool. |
100 |
iim_server.threadpool.capacity |
Capacity of the default thread pool. |
-1 (no limit) |
iim_server.maxqueues.process |
Maximum number of threads for process queue. |
40 |
iim_ldap.groupchatstorage.maxpoolsize |
Maximum number of threads for group chat history. This property is required if group chat persistent is enabled. (iim_server.conference.history.persist). |
40 |
iim_ldap.groupchatstorage.queuesize |
Capacity of group chat thread pool queue. This property is required if group chat persistent is enabled. |
120000 |
You can configure thread pool size and behavior used to service client-to-server and server-to-server requests. If these thread pools are not configured, the server uses the default thread pool. These thread pools, combined with the associated service ports, can improve the throughput of an Instant Messaging server.
Table 7-3 shows the defined thread pools and service port configurations.
Table 7-3 Defined Thread Pools and Service Port Configurations
Service Port | Thread Pool ID | Use | Thread Pool Size | Buffer Size (Bytes) |
---|---|---|---|---|
c2s |
worker-in |
All multiplexor-to-server inbound communications. |
5 |
1024000 |
c2s |
worker-out |
All multiplexor-to-server outbound communications |
5 |
1024000 |
s2s |
worker-in |
All server-to-server inbound communications. If the port allows server-to-server inbound communications, Instant Messaging Server uses this thread pool. |
12 |
1024000 |
s2s |
worker-out |
All server-to-server outbound communications. If the port allows server-to-server outbound communications, Instant Messaging Server uses this thread pool. |
12 |
1024000 |
To create service port configurations:
Run the following commands to create defined thread pools.
The first two commands configure the thread pool for mux-to-server inbound and outbound communications, and the last two commands configure the thread pool for server-to-server inbound and outbound communications.
imconfutil -u add-server-threadpool -c InstantMessaging_home/config/iim.conf.xml id=muxin maxthreads=5 imconfutil -u add-server-threadpool -c InstantMessaging_home/config/iim.conf.xml id=muxout maxthreads=5 imconfutil -u add-server-threadpool -c InstantMessaging_home/config/iim.conf.xml id=serverin maxthreads=12 imconfutil -u add-server-threadpool -c InstantMessaging_home/config/iim.conf.xml id=serverout maxthreads=12
Run the following commands to configure the service port.
The first command configures the service port for mux-to-server communications, and the second command configures the service port for server-to-server communications.
imconfutil -u set-listener-prop -c InstantMessaging_home/config/iim.conf.xml c2s worker-in=muxin worker-out=muxout rcvbuf=1024000 sndbuf=1024000 imconfutil -u set-listener-prop -c InstantMessaging_home/config/iim.conf.xml s2s worker-in=serverin worker-out=serverout rcvbuf=1024000 sndbuf=1024000
Table 7-4 lists the properties that you configure to tailor the size and behavior of thread pools used by the multiplexor.
Table 7-4 Multiplexor Thread Pool Properties
Property | Description | Default Value |
---|---|---|
iim_mux.maxthreads |
Maximum number of threads for the default thread pool. |
10 |
iim_mux.threadpool.capacity |
Capacity of the default thread pool. |
-1 (no limit) |
iim_mux.close_worker |
Thread pool ID to clean up connections. |
NA |
You can configure thread pool size and behavior used to clean up socket connections. If this thread pool is not configured, the multiplexor uses the default thread pool. This thread pool, combined with the associated service ports, can improve multiplexor throughput.
To create multiplexor thread pools:
Run the following command to create the defined thread pool and to close sockets:
imconfutil -u -c InstantMessaging_home/config/iim.conf.xml add-mux-threadpool id=closechannel maxthreads=5
Run the following command to assign the thread pool:
imconfutil -u -c InstantMessaging_home/config/iim.conf.xml set-prop iim_mux.close_worker=closechannel
Table 7-5 shows a sample Instant Messaging Server load test on a server pool deployment.
Table 7-5 Sample Instant Messaging Server Load Test on a Server Pool Deployment
Platform Details | System Configuration | Server Heap Size | Number of Users | Number of Concurrent Sessions | User Cache | Load Per Second |
---|---|---|---|---|---|---|
|
Two servers and two multiplexors are installed on different hosts |
6 GByte for multiplexor 22 Gbyte for server |
110,000 |
110,000 |
256 count |
|
This sample uses the following configuration properties.
iim.jvm.maxmemorysize=22528 iim_mux.jvm.maxmemorysize=6144 iim_server.memory.user.cache_count=256 iim_ldap.maxconns=90 iim_server.maxthreads=100 iim_mux.maxthreads=15 iim_server.jvm.options=-d64 iim_mux.jvm.options=-d6 iim_mux.maxsessions=100000 iim_server.maxsessions=150000
where:
iim_server.memory.user.cache_count specifies the memory user cache size. In this sample, the value is set to 256 for a user base of 1,10,000. If the user base is more than 1,10,000, increase this value proportionately.
iim_server.scratch_directory specifies the directory where the user cache is written to the disk. Place the scratch directory on tempfs. For 1,10,000 user base, approximately 500 to 600 MBytes of space is required on a file system and approximately 4 to 5 GBytes of space is required on tempfs.
iim_ldap.maxconns specifies the LDAP context pool size. In case of more roster operations and in a server pool environment, increase this value appropriately.
iim_server.maxthreads specifies the size of the thread pool. If you do not have sufficient memory to keep user cache in tempfs, you can increase the value of the thread pool.
iim_server.jvm.options enables use of the 64-bit JVM and thus large heap sizes.
iim_mux.jvm.options enables you to start the multiplexor in 64-bit mode.
iim_mux.maxsessions specifies the maximum number of concurrent client connections that a multiplexor can accept.
iim_server.maxsessions specifies the number of sessions allowed through an instance of multiplexor connected to the server.
You can control (throttle) the rate of incoming connections to both the Instant Messaging server and multiplexor.
To control the rate of incoming connections to the Instant Messaging server, configure the iim_server.c2s.tls.tokens and iim_server.c2s.tls.token_timeout properties.
To control the rate of incoming connections to the multiplexor, configure the iim_mux.throttle.connections and iim_mux.throttle.timeout properties.
Table 7-6 describes the restricted properties you use to configure the rate of incoming connections to the Instant Messaging server and multiplexor:
Table 7-6 Incoming Connections Configuration Properties
Property | Default Value | Description |
---|---|---|
iim_server.c2s.tls.tokens |
0 |
Specifies the number of connections allowed per timeout period. Use 0 (or a negative number) to disable. |
iim_server.c2s.tls.token_timeout |
200 |
Specifies timeout period in milliseconds. |
iim_mux.throttle.connections |
0 |
Specifies the number of connections allowed per timeout period. Use 0 (or a negative number) to disable. |
iim_mux.throttle.timeout |
1000 |
Specifies timeout period in milliseconds. |
Table 7-7 describes the properties you use to tune the XMPP WebSocket Gateway and multiplexor:
Table 7-7 XMPP WebSocket Gateway and Multiplexor Tuning Configuration Properties
Property | Default Value | Description |
---|---|---|
iim_mux.close_worker |
NA |
Thread pool used by the multiplexor for processing the close commands. |
iim_mux.maxthreads |
10 |
Maximum threads spawned by the multiplexor. |
iim_mux.maxsessions |
5000 |
Maximum number of client sessions accepted by the multiplexor. |
iim_websocket.threads.outgoing.poolsize |
10 |
Size of thread pool that handles outgoing packets from the XMPP WebSocket Gateway. |
iim_websocket.threads.translator.poolsize |
10 |
Size of thread pool that handles translation of packets. |
To configure multiplexor thread pools:
Run the following command to create the defined thread pool and to close sockets:
imconfutil -u -c InstantMessaging_home/config/iim.conf.xml add-mux-threadpool id=closechannel maxthreads=5
Run the following command to assign the thread pool:
imconfutil -u -c InstantMessaging_home/config/iim.conf.xml set-prop iim_mux.close_worker=closechannel