From owner-freebsd-net@FreeBSD.ORG Mon Nov 12 18:48:02 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BFE8556F; Mon, 12 Nov 2012 18:48:02 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 9F04F8FC13; Mon, 12 Nov 2012 18:48:02 +0000 (UTC) Received: from Alfreds-MacBook-Pro-5.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id C33021A3C6B; Mon, 12 Nov 2012 10:48:01 -0800 (PST) Message-ID: <50A14460.9020504@mu.org> Date: Mon, 12 Nov 2012 10:48:00 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: auto tuning tcp References: <50A0A0EF.3020109@mu.org> <50A0A502.1030306@networx.ch> <50A0B8DA.9090409@mu.org> <50A0C0F4.8010706@networx.ch> <50A13961.1030909@networx.ch> In-Reply-To: <50A13961.1030909@networx.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-net@freebsd.org" , Adrian Chadd , Peter Wemm X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 18:48:02 -0000 On 11/12/12 10:01 AM, Andre Oppermann wrote: > On 12.11.2012 18:43, Alfred Perlstein wrote: >> >> >> On Nov 12, 2012, at 1:27 AM, Andre Oppermann >> wrote: >> >>> On 12.11.2012 09:52, Alfred Perlstein wrote: >>>> On 11/11/12 11:28 PM, Andre Oppermann wrote: >>>>> On 12.11.2012 08:10, Alfred Perlstein wrote: >>>>>> I noticed that TCBHASHSIZE does not autotune. >>>>>> >>>>>> What do you think of the following algorithm? >>>>>> >>>>>> Basically round down to next power of two based on nmbclusters / 64. >>>>> >>>>> Please wait out for a real fix of the various mbuf-whatever tuning >>>>> issue I'll propose shortly. This approach may become inapproriate. >>>>> Also the mbuf limits can be changed at runtime by sysctl. >>>>> >>>> What is the timeline you are asking for to wait? >>> >>> http://svnweb.freebsd.org/changeset/base/242910 >> >> Very cool! >> >> So instead of nmbclusters, will maxsockets work? Ideas/suggestions? > > I've already added the tunable "kern.maxmbufmem" which is in pages. > That's probably not very convenient to work with. I can change it > to a percentage of phymem/kva. Would that make you happy? > It really makes sense to have the hash table be some relation to sockets rather than buffers. If you are hashing "foo-objects" you want the hash to be some relation to the max amount of "foo-objects" you'll see, not backwards derived from the number of "bar-objects" that "foo-objects" contain, right? Because we are hashing the sockets, right? not clusters. Maybe I'm wrong? I'm open to ideas. -Alfred