Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 2004 20:51:13 -0800 (PST)
From:      Doug Ambrisko <ambrisko@ambrisko.com>
To:        Bogdan TARU <bgd@icomag.de>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: 4.9 kernel panics on a poweredge 2650
Message-ID:  <200402110451.i1B4pDjD006864@ambrisko.com>
In-Reply-To: <20040201154143.GA7837@icomag.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Bogdan TARU writes:
| 
| 	Hi Hackers,
| 
|  Ok, now some more infos about my problem:
| 
| We have 3 identical webservers (as hw configuration), and the same
| kernel and applications running on all three. They get mostly the same
| traffic (dns round-robined). They all run 4.9-RELEASE. I have
| experienced repetable crashes on all three, so there is no problem
| with the hardware (or the possibility of such a thing is too small). 
| 
|  I have come to think that the problem is with the kernel memory
| space, which is too low. I have compiled the kernel from Generic, by
| performing the following modifications:
| 
| - maxusers set to 128
| - activated SMP (the cpus are HTT-compatible)
| - kva_pages set 256 (each box has 2GB of ram and 2Gb of swap)
| - PMAP_SHPGPERPROC=401 (for apache)
| - ACCEPT_FILTER_DATA and ACCEPT_FILTER_HTTP
| - removed unnecessary drivers from the kernel
| 
|  /etc/sysctl.conf looks like:
| 
| 
| net.inet.tcp.msl=100
| net.inet.tcp.blackhole=1
| # Hyperthreading
| machdep.cpu_idle_hlt=1
| 
| kern.ipc.somaxconn=4096
| kern.maxfiles=65535
| vfs.vmiodirenable=1
| kern.ipc.shm_use_phys=1
| net.inet.tcp.sendspace=16384
| 
| 
|  The boxes run w/o a problem for about 2-3 days, after which they
| panic with 'page not present' in different processes (sshd, httpd,
| etc). I guess the real reason for this is the low value for kvm_free:
| 
| 
| (web1)[~] sysctl -a | grep vm.kvm
| vm.kvm_size: 1069543424
| vm.kvm_free: 4190208

This isn't good you have about 4M of kernel memory left resulting in
your panic.  A quick fix to try is to bump up kva_pages to 384.  Just
recompile the kernel with that and install.  There are some undocumented/
poorly sysctl that can free up some memory.  I should put something together
but I'm working on some other issues right now.  For some hints
look at vmstat -z and look at how much memory you use.  Note that
the limit can be read as "allocated and gone from the system to be used only
by this zone".  Trim down some things that are huge but not used much.
Now the tuneable to do that via loader.conf can be a challenge to derive.

Doug A.



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