From owner-freebsd-current Fri Jan 22 02:20:56 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA21211 for freebsd-current-outgoing; Fri, 22 Jan 1999 02:20:56 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from server.noc.demon.net (server.noc.demon.net [193.195.224.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA21203 for ; Fri, 22 Jan 1999 02:20:52 -0800 (PST) (envelope-from geoffb@gti.noc.demon.net) Received: by server.noc.demon.net; id KAA15427; Fri, 22 Jan 1999 10:20:43 GMT Received: from gti.noc.demon.net(195.11.55.101) by inside.noc.demon.net via smap (3.2) id xmae15421; Fri, 22 Jan 99 10:20:42 GMT Received: (from geoffb@localhost) by gti.noc.demon.net (8.8.8/8.8.8) id KAA06441; Fri, 22 Jan 1999 10:20:41 GMT Message-ID: <19990122102040.H19395@gti.noc.demon.net> Date: Fri, 22 Jan 1999 10:20:40 +0000 From: Geoff Buckingham To: Mike Smith Cc: freebsd-current@FreeBSD.ORG Subject: Re: KVA/KVM shortages Reply-To: Geoff Buckingham References: <19990121180941.G19395@gti.noc.demon.net> <199901212153.NAA11404@dingo.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <199901212153.NAA11404@dingo.cdrom.com>; from Mike Smith on Thu, Jan 21, 1999 at 01:53:44PM -0800 Organisation: Demon Internet Ltd Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Previously on Thu, Jan 21, 1999 at 01:53:44PM -0800, Mike Smith wrote: : > On tuesday I crashed a machine after it ran out of kvm. (dual PII 400 with : > 768MB RAM) poking about in the code adding: : > : > options "VM_KMEM_SIZE=(24*1024*1024)" : > options "VM_KMEM_SIZE_MAX=(128*1024*1024)" : > : > seems like a good way foward. Is it? : : >From what I can see, you shouldn't need to set VM_KMEM_SIZE_MAX unless : you're also setting VM_KMEM_SIZE_SCALE. : My understanding was VM_KMEM_SIZE_SCALE picks up a default of value of 3 from vmparam.h, which if I understand the following from kern-malloc.c vm_kmem_size = VM_KMEM_SIZE; mem_size = cnt.v_page_count * PAGE_SIZE; #if defined(VM_KMEM_SIZE_SCALE) if ((mem_size / VM_KMEM_SIZE_SCALE) > vm_kmem_size) vm_kmem_size = mem_size / VM_KMEM_SIZE_SCALE; #endif #if defined(VM_KMEM_SIZE_MAX) if (vm_kmem_size >= VM_KMEM_SIZE_MAX) vm_kmem_size = VM_KMEM_SIZE_MAX; #endif combined with the apparent defaults of VM_KMEM_SIZE 12M VM_KMEM_SIZE_SCALE 3 VM_KMEM_SIZE_MAX 80M means vm_kmem_size never gets bigger than 80M without VM_KMEM_SIZE_MAX being defined >80M (This is all from a mid december 3.x box) : I just committed a tweak that allows you to say: : : set kern.vm.kmem.size= : : at the loader prompt or in /boot/loader.rc to override the default : VM_KMEM_SIZE value. : Unless I am being too literal or miss-understanding the above do you not need to set VM_KMEM_SIZE_MAX or have thing moved on since december? -- GeoffB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message