How can I increase the number of connections that ZXTM can handle?

A limiting factor in the number of connections that can be made per second by ZXTM is the availability of 'ephemeral' network ports. To maximize this, you'll want to increase the range of local ports available, and decrease the length of time that old ports are kept in TIME_WAIT.

Note that the 'ephemeral port' limit dictates the number of different TCP connections that the ZXTM can make to an individual back-end node. ZXTM upgrades all HTTP connections to HTTP Keepalives to the back-end nodes, so several thousand HTTP requests-per-second may only use 10 or 20 TCP connections-per-second.

Linux

On Linux (2.4.x), the local port ranges are set by the file /proc/sys/net/ipv4/ip_local_port_range. This contains two numbers, the low and high end of the values to use for local ports. Older versions of Linux set these to 1024 and 4999, respectively. These values are too restrictive. To set a wider range, you can use a command such as the following:

# echo "1024 61000" > /proc/sys/net/ipv4/ip_local_port_range

The file /proc/sys/net/ipv4/tcp_fin_timeout (if it exists - older kernels do not have this option) contains the amount of time that old connections will be kept in the TIME_WAIT state. Older versions of Linux set this to 180 (seconds). A value of 30 should be fine.

# echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout

FreeBSD

You can adjust the portranges with the sysctl command. e.g.

# sysctl -w net.inet.ip.portrange.last=61000

Solaris

The system command 'ndd' can be used to tune the ephemeral port range. By default, the ephemeral port range on Sun machines is quite large, and can be viewed with the following command:

# ndd -get /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port
49152 65535

To increase the range, run the command:

# ndd -set /dev/tcp tcp_smallest_anon_port 8192

Owen Garrett [Zeus Dev Team] 01 July 2005  Permalink  
Leave a comment ...
Your email address will not be displayed.
Your URL will be displayed.
This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.
Options:
 
(Line breaks become <br />)
(Set cookies for name, email & url)
Download Free ZXTM Desktop Edition

Recent Articles

Other Resources



www.zeus.com