Network Deployment (Distributed operating systems), v8.0 > Tune performance > Tune SIP applications


Tune SIP servlets for Linux

This page describes preliminary SIP servlet tuning for Linux 2.6 kernel. A SIP servlet under load might retransmit messages or drop calls. The UDP socket queues might fill. A review of the verbose garbage collection output might show that there are fairly long garbage collection times, for example, 0.5 to 1.5 seconds. The cause of this problem is that the Ethernet driver, Linux operating system, WAS, or any combination of the items are not tuned for SIP applications. We can apply the following levels of tuning.

The following recommendations have been tested on Red Hat Enterprise Linux 4 only and are provided as is without any implied warranty.

Linux Ethernet driver

Linux Ethernet driver tuning begins by selecting the best Ethernet driver. For example, the HS20 blades recommended driver is the tg3-3.43b driver (or later), which can be found at the website for Broadcom Ethernet NIC Driver Downloads. The following shell commands have been used to tune the Linux kernel Ethernet driver:

/sbin/ifconfig eth0 txqueuelen 2000
/sbin/ifconfig eth1 txqueuelen 2000
ethtool -s eth0 autoneg off speed 1000 duplex full
ethtool -A eth0 autoneg off rx on tx on ethtool -C eth0 adaptive-rx off adaptive-tx off rx-
usecs 20 rx-frames 5 tx-usecs 60 tx-frames 11
ethtool -G eth0 rx 511 rx-jumbo 255 tx 511

Depending upon the Ethernet driver that is installed, some of these options might need to change.

Linux kernel

Linux kernel tuning uses the following commands:

echo 16777216 > /proc/sys/net/core/rmem_max
echo 2097152 > /proc/sys/net/core/rmem_default
echo 16777216 > /proc/sys/net/core/wmem_max
echo 2097152 > /proc/sys/net/core/wmem_default
echo 10000000 > /proc/sys/net/core/optmem_max
echo 4096 87380 16777216 > /proc/sys/net/ipv4/tcp_rmem
echo 4096 87380 16777216 > /proc/sys/net/ipv4/tcp_wmem
echo 8388608 8388608 8388608 > /proc/sys/net/ipv4/tcp_mem
echo 400 > /proc/sys/net/unix/max_dgram_qlen
echo 400 > /proc/sys/net/core/message_burst
echo 2800 > /proc/sys/net/core/mod_cong
echo 1000 > /proc/sys/net/core/lo_cong
echo 200 > /proc/sys/net/core/no_cong
echo 2900 > /proc/sys/net/core/no_cong_thresh
echo 3000 > /proc/sys/net/core/netdev_max_backlog

This configuration might not be optimum for a given application and you might need to adjust the configuration to achieve the best performance. However, you might use these values as a starting point.

SIP for WAS

SIP tuning for WAS is completed using the following steps:

  1. Create a separate thread pool for the SIP servlet container. Follow this path in the admin console:

    1. Click Servers > Server Types > WebSphere application servers > server_name

    2. Under Additional properties, click Thread Pools > New.

    3. In the Name field, enter SipContainer.

    4. In the Minimum Size and Maximum Size fields, enter 15. These values should be adequate for most applications.

    5. Click OK.

  2. Create custom properties for the SIP Servlet container. Follow this path in the admin console:

    1. Click Servers > Server Types > WebSphere application servers > server_name

    2. Click SIP container .

    3. Under Additional properties , click Custom Properties > New.

    4. In the Name field, enter javax.sip.max.object.pool.size.

    5. In the Value field, enter 1000.

    6. Click OK.

    7. In the Name field, enter max.tu.pool.size.

    8. In the Value field, enter 1000.

    9. Click OK.

    10. In the Name field, enter com.ibm.sip.sm.lnm.size.

    11. In the Value field, enter 8.

    12. Click OK.

  3. Create custom properties for the SIPUDP channel if User Datagram Protocol (UDP) is the primary transport for SIP traffic. Follow this path in the admin console:

    1. Click Servers > Server Types > WebSphere application servers > server_name

    2. Click SIP container > Transport Chain > SIPCInboundDefaultUDP > UDP Inbound channel (UDP1) .

    3. Under Additonal Properties , click Custom Properties > New.

    4. In the Name field, enter receiveBufferSizeSocket.

    5. In the Value field, enter 3000000.

    6. Click OK.

    7. In the Name field, enter sendBufferSizeSocket.

    8. In the Value field, enter 3000000.

  4. Specify the SIP servlet container general properties. Follow this path in the admin console:

    1. Click Servers > Server Types > WebSphere application servers > server_name

    2. Enter the Maximum application sessions value. The Maximum application sessions value can be calculated as: Maximum call hold time or session timeout x Call rate x Safety factor.

    3. Enter the Maximum messages per averaging period value. The Maximum messages per averaging period value can be calculated as: Maximum call hold time or session timeout x Maximum rate of SIP messages x Safety factor.

    4. Enter the Maximum dispatch queue size value. The Maximum dispatch queue size value can be calculated as: Maximum rate of SIP messages x Maximum latency in SIP processing x Safety factor.

    5. Set the thread pool to the newly created SIP container thread pool (to the drop down name "SipContainer").

  5. Tune the JVM garbage collection policy. Follow this path in the admin console:

    1. Click Servers > Server Types > WebSphere application servers > server_name

    2. Under Server Infrastructure, click Java and Process Management > Process Definition.

    3. Under Additional Properties , click Java Virtual Machine .

    4. In the Generic JVM arguments field, enter the following value as one continuous line: "-Xmn150m -Xgcpolicy:gencon -Xgc:scvNoAdaptiveTenure,scvTenureAge=1,stdGlobalCompactToSatisfyAllocate -Xcompactexplicitgc -XX:MaxDirectMemorySize=256000000".

bprac
Tune Linux systems
Java Diagnostics Guide 6

+

Search Tips   |   Advanced Search