From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,df7cbbce6020d741 X-Google-Attributes: gidfee84,public From: mogul@pa.dec.com (Jeffrey Mogul) Subject: Re: Half-open TCP connections under high load Date: 1995/09/12 Message-ID: <432lel$3a4@usenet.pa.dec.com>#1/1 X-Deja-AN: 109907452 references: <42q4fn$r8o@geraldo.cc.utexas.edu> organization: DEC Western Research newsgroups: comp.unix.osf.osf1 In article <42q4fn$r8o@geraldo.cc.utexas.edu> jah@mojo.ots.utexas.edu (Jeff Hayward) writes: >We have a 3000/700 running DU 3.2 which handles a lot of incoming >SMTP connections. At times, when there's a high rate of incoming >connections (say, just after MCInet comes back from a long outage) >we see connection attempts 'stall' in a half-open state. > >I'm assuming that this is because the TCP accept queue in the kernel >is being overflowed by the rate of incoming SYNs. > >Has anyone else seen this problem, and is there some way I can give >the kernel more resources to handle our load? There's a kernel global, somaxconn, that controls the queue limit. I think the default value is "8". You should set it to be much larger. I would imagine that setting it to 1000 wouldn't hurt, unless you have almost no RAM on the system. I think this has to be done using dbx, but there might be another way. This will have no effect, however, unless you ALSO change the second argument of the listen() system call (done in your SMTP listener) to be equally large, or larger. I'd try something huge, since the kernel does min(backlog, somaxconn) and so whatever you do here can't hurt. No guarantees, of course. This is not an official statement by Digital Equipment Corp. -Jeff