Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2008 22:43:25 +0400
From:      Igor Sysoev <is@rambler-co.ru>
To:        gnn@freebsd.org
Cc:        Robert Watson <rwatson@freebsd.org>, net@freebsd.org
Subject:   Re: zonelimit issues...
Message-ID:  <20080424184325.GA48394@rambler-co.ru>
In-Reply-To: <20080421112753.GD44915@rambler-co.ru>
References:  <m2hcdztsx2.wl%gnn@neville-neil.com> <20080420102827.U67663@fledge.watson.org> <m2od834pmv.wl%gnn@neville-neil.com> <m2mynn4o83.wl%gnn@neville-neil.com> <20080421112753.GD44915@rambler-co.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080424184325.GA48394>