From owner-cvs-all@FreeBSD.ORG Mon Sep 11 14:27:06 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B64EF16A601; Mon, 11 Sep 2006 14:27:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9E5143D53; Mon, 11 Sep 2006 14:27:05 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.4/8.13.3) with ESMTP id k8BER3dI046992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Sep 2006 18:27:04 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id k8BER3uF046991; Mon, 11 Sep 2006 18:27:03 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 11 Sep 2006 18:27:03 +0400 From: Gleb Smirnoff To: Mike Silbersack Message-ID: <20060911142703.GF27667@FreeBSD.org> References: <200609061356.k86DuZ0w016069@repoman.freebsd.org> <20060906091204.B6691@odysseus.silby.com> <20060906143204.GQ40020@FreeBSD.org> <20060906093553.L6691@odysseus.silby.com> <20060906150506.GA7069@rambler-co.ru> <20060911005435.A23530@odysseus.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20060911005435.A23530@odysseus.silby.com> User-Agent: Mutt/1.5.6i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Ruslan Ermilov , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet in_pcb.c tcp_subr.c tcp_timer.c tcp_var.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 14:27:06 -0000 On Mon, Sep 11, 2006 at 01:21:14AM -0500, Mike Silbersack wrote: M> Ok, I started looking through the mess that is in_pcb.c, and I came up M> with a simpler idea than trying to improve upon my old heuristic. M> M> What if we just build upon what Gleb did in revision 1.256, and change the M> size of the tcptw zone? Instead of scaling it to maxsockets / 5, let's M> scale it to max((ipport_lastauto - ipport_firstauto)/2, 500). We'll have M> to rescale it whenever the port ranges are changed, but those sysctls are M> already handled by a function, so it'll be easy. The UMA zone can't be made smaller than it is, while IP port ranges can vary in both directions. M> This means that we'll be keeping around fewer time_wait sockets than we do M> at present, but I don't think that's a big problem for anyone. On the M> positive side, it means that time_wait sockets can't starve out ephemeral M> ports unless you have more than 50% active connections. M> M> One slightly more complex solution would be to use one tcptw bucket for M> connections with local ports >= 1024 and a seperate bucket for connections M> with local ports < 1024. Assuming that our front end web proxy answers on M> ports < 1024, that would ensure that we keep one pool of time_wait sockets M> for our connections from clients and another pool for our connections to M> the backend web servers. I guess that would be slightly more "correct". M> M> What do you guys think? I think that your original commit should be rethought. It should free one tcptw entry, in a case of absolute match, and return NULL. Do not jump up and go on into cycle again. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE