Re: Problems tuning kmem_map on 5.1-REL box.

2003-06-19 Thread Peter Losher
On Wed, 18 Jun 2003, David Schultz wrote:

 To allow the kmem_map to exceed 200 MB, you'll also need to tweak
 VM_KMEM_SIZE_MAX to (for example) '(1024 * 1024 * 1024)'.  BTW,
 the formula, which I stole from vmparam.h, is:

 min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX)

Looks like I may have found some kind of error, adding this to my kernel
config:

# KVM
options VM_KMEM_SIZE_SCALE=4
options VM_KMEM_SIZE_MAX=(1024 * 1024 * 1024)

(1024MB of KVM, 4096MB/4, 1024MB MAX KVM size)

Cause the following warning and compile bomb:

% config KVM_FIX
WARNING: unknown option `*' removed from ../compile/KVM_FIX/opt_vm.h
Kernel build directory is ../compile/KVM_FIX
Don't forget to do a ``make depend''

-=-
cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline
-Wcast-qual  -fformat-extensions -std=c99  -nostdinc -I-  -I. -I../../..
-I../../../dev -I../../../contrib/dev/acpica -I../../../contrib/ipfilter
-D_KERNEL -include opt_global.h -fno-common  -mno-align-long-strings
-mpreferred-stack-boundary=2 -ffreestanding -Werror
../../../kern/kern_malloc.c
../../../kern/kern_malloc.c: In function `kmeminit':
../../../kern/kern_malloc.c:430: syntax error before vm_kmem_size
cc1: warnings being treated as errors
../../../kern/kern_malloc.c: At top level:
../../../kern/kern_malloc.c:480: warning: function declaration isn't a
prototype
../../../kern/kern_malloc.c:502: warning: function declaration isn't a
prototype
../../../kern/kern_malloc.c:607: storage class specified for parameter
`sysctl___kern_malloc'
../../../kern/kern_malloc.c:607: parameter `sysctl___kern_malloc' is
initialized
../../../kern/kern_malloc.c:607: storage class specified for parameter
`__set_sysctl_set_sym_sysctl___kern_malloc'
../../../kern/kern_malloc.c:607: parameter
`__set_sysctl_set_sym_sysctl___kern_malloc' is initialized
../../../kern/kern_malloc.c:607: section attribute not allowed for
`__set_sysctl_set_sym_sysctl___kern_malloc'
../../../kern/kern_malloc.c:136: warning: `sysctl_kern_malloc' declared
`static' but never defined
*** Error code 1

Stop in /usr/src/sys/i386/compile/KVM_FIX.
%
-=-

Changing the options to:

# KVM
options VM_KMEM_SIZE_SCALE=4
options VM_KMEM_SIZE_MAX=(1024*1024*1024)

Configs and compiles cleanly, but panics when rebooting with the new
kernel:

kmem_suballoc: bad status return of 3.
panic: kmem_suballoc
cpuid = 0; lapic.id = 
Uptime: 1s

So is there some sort of syntax error I am running over, or is this a bug?
(in either case)

Best Wishes - Peter
-- 
[EMAIL PROTECTED] | ISC | OpenPGP 0xE8048D08 | The bits must flow
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problems tuning kmem_map on 5.1-REL box.

2003-06-19 Thread David Schultz
On Thu, Jun 19, 2003, Peter Losher wrote:
 On Wed, 18 Jun 2003, David Schultz wrote:
 
  To allow the kmem_map to exceed 200 MB, you'll also need to tweak
  VM_KMEM_SIZE_MAX to (for example) '(1024 * 1024 * 1024)'.  BTW,
  the formula, which I stole from vmparam.h, is:
 
  min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX)
 
 Looks like I may have found some kind of error, adding this to my kernel
 config:
 
 # KVM
 options VM_KMEM_SIZE_SCALE=4
 options VM_KMEM_SIZE_MAX=(1024 * 1024 * 1024)
 
 (1024MB of KVM, 4096MB/4, 1024MB MAX KVM size)
 
 Cause the following warning and compile bomb:
 
 % config KVM_FIX
 WARNING: unknown option `*' removed from ../compile/KVM_FIX/opt_vm.h

This looks like a limitation of config(8).

 Changing the options to:
 
 # KVM
 options VM_KMEM_SIZE_SCALE=4
 options VM_KMEM_SIZE_MAX=(1024*1024*1024)
 
 Configs and compiles cleanly, but panics when rebooting with the new
 kernel:
 
 kmem_suballoc: bad status return of 3.
 panic: kmem_suballoc

That means there wasn't a large enough contiguous region for the
kmem_map.  I guess I forgot to tell you that you also need to
adjust KVA_PAGES upwards so that the kernel has enough virtual
address space to fit the map.  The following should do:

options KVA_PAGES=512
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problems tuning kmem_map on 5.1-REL box.

2003-06-18 Thread David Schultz
On Tue, Jun 17, 2003, Peter Losher wrote:
 Hi -
 
 If this sort of question is better asked on a more specialized list
 @freebsd.org, please let me know. (Since 5.1 is still considered a
 developmental release, one doesn't know if either -current or -stable
 would be more appropriate.  So I am sending it to -current.
 
 So, I recently put a Quad-Xeon server (w/ 4GB of RAM) into production as
 primarily as a master FTP server for ISC as well as for FreeBSD (US/IPv6
 side of ftp.freebsd.org).  All has been going well for the past couple of
 weeks until 5.1 was released. Traffic spiked, and the server started
 panicking every 12 hours:
 
  panic: kmem_malloc(4096): kmem_map too small: 377487360 total allocated
 
 So after looking at the archives, I read that FreeBSD had issues with
 installed memory above 2GB, so I set the sysctl kern.maxvnodes=13, but
 to no effect:
 
  panic: kmem_malloc(16384): kmem_map too small: 293519360 total allocated
 
 I have since removed my NMBCLUSTER setting in the kernel, so it would be
 set automatically, I have even set VM_KMEM_SIZE_SCALE=2 (I haven't messed
 with the other KMEM kernel options, as I was hoping to avoid it)  And a
 couple of hours ago I updated the kernel with the latest kern_malloc.c file
 in the RELENG_5_1 branch.

To allow the kmem_map to exceed 200 MB, you'll also need to tweak
VM_KMEM_SIZE_MAX to (for example) '(1024 * 1024 * 1024)'.  BTW,
the formula, which I stole from vmparam.h, is:

min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX)
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]