[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problems handling a large number of TCP/IP connections



We have a server that is designed to maintain a large number of TCP/IP
connections.  I have been running tests that try to open and maintain >
20000 connections to the server on a Linux box.  To accommodate this
large number of connection I adjusted a select set of kernel
parameters.  Here are the settings I have tried:

echo "32768" > /proc/sys/fs/file-max                      
echo "65536" > /proc/sys/fs/inode-max
echo "30768 65000" >/proc/sys/net/ipv4/ip_local_port_range
echo "512     512     768" > /proc/sys/vm/freepages
echo "200000000" >/proc/sys/kernel/shmmax

When I ran the 20000 connection test, the server and kernel did fine
until the number of connections to the server reached 16383.  At this
point /proc/kmsg started reporting a whole slew of '<3>kmalloc: Size
(131088) too large' messages.  According to the kmalloc man page
(http://man.he.net/man9/kmalloc), kmalloc can only be called with a size
argument that is less <= 131048.  Is this a kernel bug?   Do I need to
boost some other kernel resource limit?

Since 16383 is really close to 2^14, I am guessing there is some other
limit that I need to boost.

I have been looking at the kernel code to try and figure out where the 
problem is occurring, but have not had any success (This is my first 
time looking into the kernel code).  Is there a way to get a stack 
trace out of the printk() function?

I am using the 2.2.13-0.13smp Linux kernel on a 2 processor intel PIII
smp machine with 1Gb of ram.

Any ideas would be appreciated.

Curt-
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/