Sun GlassFish Communications Server 2.0 Performance Tuning Guide

SIP Service Settings

This section provides some tips for configuring the SIP container.

Communications Server Byte Buffers

This section provides some tips for configuring the SIP container. SIP message processing involves reading the message from the socket channel and parsing it to frame a valid SIP message.Communications Server receives traffic from Call Session Control Function (CSCF), which is spread across few TCP socket channels.

Communications Server uses the Grizzly socket connector, which associates a buffer with every thread.

Depending on the operating system you are using, you can configure these buffers appropriately, to ensure that they do not receive too little or too much traffic. On SUSE Linux, you can configure the size of the TCP buffer (to 67 MB, for example) by using the following command:

sysctl -w net.ipv4.tcp_mem="67108864 67108864 67108864"

Communications Server also provides the header-buffer-length-in-bytes attribute for setting the buffer size, which you can set using the following command:

asadmin set config.sip-service.request-processing.header-buffer-length-in-bytes=8192

The byte buffers that are used to send responses and new requests are picked up from a pool. You can configure the size of the byte buffers in this pool by using the send-buffer-size-in-bytes attribute, by using the following command:

asadmin set config.sip-service.connection-pool.send-buffer-size-in-bytes=8192

Tuning the Thread Pool

The Grizzly framework provides a thread pool from which threads are obtained to process a socket event. These thread pools can be configured for attributes such as, maximum queue size, minimum thread count, and maximum thread count.

Communications Server uses ServersThreadPool and ClientsThreadPool. The threads belonging to these thread pools can be identified in the server.log by looking for using the names, SipContainer-serversWorkerThread-sip_port–0 and SipContainer-clientssWorkerThread-sip_port–0.

You can use the following commands for these attributes.

asadmin set config.sip-service.request-processing.initial-thread-count=10

asadmin set config.sip-service.request-processing.thread-count=10

asadmin set config.sip-service.request-processing.thread-increment=10

Communications Server uses the different thread pools for client tasks and server tasks. You can use one thread pool for both server and client tasks by setting the sip.network.grizzly.useServerThreadPool system property to true.

The maximum number of requests that can be queued in the thread pool can be configured through the following property:

asadmin set config.sip-service.connection-pool queue-size-in-bytes=20

By default, this attribute is set a values less than 0, and the queue is unbounded. To control the number of requests in the queue, ensure that you set this property to a value greater than 0.

The org.jvnet.glassfish.comms.sip.timer.queues system property can be used to configure the number of timer queues. By default, only one timer queue is created. If the load is high, have more than one queue so that the timer load is distributed among them.