Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262263AbVEYDoo (ORCPT ); Tue, 24 May 2005 23:44:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262255AbVEYDoo (ORCPT ); Tue, 24 May 2005 23:44:44 -0400 Received: from ylpvm29-ext.prodigy.net ([207.115.57.60]:976 "EHLO ylpvm29.prodigy.net") by vger.kernel.org with ESMTP id S262263AbVEYDoY (ORCPT ); Tue, 24 May 2005 23:44:24 -0400 X-ORBL: [63.202.173.158] Date: Tue, 24 May 2005 20:44:18 -0700 From: Chris Wedgwood To: "Clifford T. Matthews" Cc: linux-kernel@vger.kernel.org Subject: Re: surprisingly slow accept/connect cycle time Message-ID: <6ddc8bfa62357b6b3813facf21b223f9.ANY@taniwha.stupidest.org> References: <17043.37997.993745.877259@newbie.ardi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17043.37997.993745.877259@newbie.ardi.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 761 Lines: 26 On Tue, May 24, 2005 at 02:54:05PM -0600, Clifford T. Matthews wrote: > static void > listen_or_die (int fd, int backlog) > { > DIE_IF (listen (fd, backlog) != 0); > > } [...] > listen_or_die (accept_fd, 10); the backlog is 10, so my guess is that the parent does 10+ connection attempts before the child can accept them so some SYN packets get dropped --- and you have to wait for TCP to retry hence the delay you see a larger backlog would make things seem to go faster, as would tweaking the TCP timers - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/