From owner-freebsd-net@FreeBSD.ORG Thu May 12 10:19:06 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B7431065670 for ; Thu, 12 May 2011 10:19:06 +0000 (UTC) (envelope-from michael@gameservice.ru) Received: from mail.mzlab.net (mail.mzlab.net [66.197.153.197]) by mx1.freebsd.org (Postfix) with ESMTP id 461678FC14 for ; Thu, 12 May 2011 10:19:05 +0000 (UTC) Date: Thu, 12 May 2011 13:01:23 +0300 From: Michael X-Priority: 3 (Normal) Message-ID: <17710363528.20110512130123@gameservice.ru> To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit Subject: Random TCP 3 second delay X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2011 10:19:06 -0000 Hello. I'm running nginx in load balancing mode for java application with around 400 requests/second. For every request, nginx is doing a HTTP/1.0 connection without keep alive to jetty. Several times per minute this connection takes 3 seconds complete. I don't see 2 or 1 seconds response from upstream, only 3 seconds. Listen backlog is not overflowed. I searched for this delay in google, and found similar problem in Linux: http://kerneltrap.org/mailarchive/linux-net/2008/3/26/1264734/thread http://kerneltrap.org/mailarchive/linux-net/2008/2/4/713224/thread And Windows: http://stackoverflow.com/questions/1875151/delay-in-multiple-tcp-connections-from-java-to-the-same-machine/1927486#1927486 Can you advice what should i tune in FreeBSD to fix this problem? Michael