From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01:46:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6ACA4710; Thu, 25 Oct 2012 01:46:21 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53A718FC0A; Thu, 25 Oct 2012 01:46:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9P1kLDE043706; Thu, 25 Oct 2012 01:46:21 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1kLi8043704; Thu, 25 Oct 2012 01:46:21 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201210250146.q9P1kLi8043704@svn.freebsd.org> From: Alfred Perlstein Date: Thu, 25 Oct 2012 01:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242029 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 01:46:21 -0000 Author: alfred Date: Thu Oct 25 01:46:20 2012 New Revision: 242029 URL: http://svn.freebsd.org/changeset/base/242029 Log: Allow autotune maxusers > 384 on 64 bit machines A default install on large memory machines with multiple 10gigE interfaces were not being given enough mbufs to do full bandwidth TCP or NFS traffic. To keep the value somewhat reasonable, we scale back the number of maxuers by 1/6 past the 384 point. This gives us enough mbufs for most of our pretty basic 10gigE line-speed tests to complete. Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Thu Oct 25 01:27:01 2012 (r242028) +++ head/sys/kern/subr_param.c Thu Oct 25 01:46:20 2012 (r242029) @@ -278,8 +278,16 @@ init_param2(long physpages) maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE); if (maxusers < 32) maxusers = 32; - if (maxusers > 384) - maxusers = 384; + /* + * Clips maxusers to 384 on machines with <= 4GB RAM or 32bit. + * Scales it down 6x for large memory machines. + */ + if (maxusers > 384) { + if (sizeof(void *) <= 4) + maxusers = 384; + else + maxusers = 384 + ((maxusers - 384) / 6); + } } /*