From owner-freebsd-net@FreeBSD.ORG Thu Apr 24 18:44:18 2008 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99B2A106566C; Thu, 24 Apr 2008 18:44:18 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.freebsd.org (Postfix) with ESMTP id 6820E8FC1E; Thu, 24 Apr 2008 18:44:18 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from localhost (is1.park.rambler.ru [81.19.64.121]) by relay0.rambler.ru (Postfix) with ESMTP id 8AFFE5C7E; Thu, 24 Apr 2008 22:44:06 +0400 (MSD) Date: Thu, 24 Apr 2008 22:43:25 +0400 From: Igor Sysoev To: gnn@freebsd.org Message-ID: <20080424184325.GA48394@rambler-co.ru> References: <20080420102827.U67663@fledge.watson.org> <20080421112753.GD44915@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20080421112753.GD44915@rambler-co.ru> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: Robert Watson , net@freebsd.org Subject: Re: zonelimit issues... 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, 24 Apr 2008 18:44:18 -0000 On Mon, Apr 21, 2008 at 03:27:53PM +0400, Igor Sysoev wrote: > The problem that FreeBSD has small KVA space: only 2G even on amd64 32G > machines. > > So with > > vm.kmem_size=1G > # 64M KVA > kern.maxbcache=64M > # 4M KVA > kern.ipc.maxpipekva=4M > > > I can use something like this: > > # 256M KVA/KVM > kern.ipc.nmbjumbop=64000 > # 216M KVA/KVM > kern.ipc.nmbclusters=98304 > # 162M KVA/KVM > kern.ipc.maxsockets=163840 > # 8M KVA/KVM > net.inet.tcp.maxtcptw=163840 > # 24M KVA/KVM > kern.maxfiles=204800 Actually, on amd64 it is possible to increase KVM up to 1.8G without boot time panic: vm.kmem_size=1844M # 64M KVA kern.maxbcache=64M # 4M KVA kern.ipc.maxpipekva=4M Without descreasing kern.maxbcache (200M by default) and kern.ipc.maxpipekva (~40M by default) you can get only about 1.5G. So with 1.8G KVM I able to set # 4G phys, 2G KVA, 1.8G KVM # # 750M KVA/KVM kern.ipc.nmbjumbop=192000 # 504M KVA/KVM kern.ipc.nmbclusters=229376 # 334M KVA/KVM kern.ipc.maxsockets=204800 # 8M KVA/KVM net.inet.tcp.maxtcptw=163840 # 24M KVA/KVM kern.maxfiles=204800 Now KVA is split as kernel code 8M kmem_map 1844M buffer_map 64M pager_map 32M exec_map 4.2M pipe_map 4M ??? 60M vm.kvm_free 32M I leave unused spare 32M free KVA (vm.kvm_free) because some map (unknown for me) after pipe_map may grow slightly. If vm.kvm_free will become 0, kernel will panic. -- Igor Sysoev http://sysoev.ru/en/