On Thursday 11 January 2007 02:04, Brad L. Chisholm wrote:
> On Wed, Jan 10, 2007 at 10:11:38PM -0500, John Baldwin wrote:
> > On Wednesday 10 January 2007 19:15, Brad L. Chisholm wrote:
> > >
> > > I notice the following in the vm.zone output captured just prior to 
> > > a hang.  Does this value correspond to the swap_zone you were referring
> > > to?  This looks like a limit may have been reached.
> > > 
> > > SWAPMETA:        288,   116519, 116519,      0,   116543
> > 
> > yep, that's exactly the issue you are hitting.
> >  
> > > I don't seem to be able to query kern.maxswzone on our 6.2-BETA2 image:
> > > 
> > > # sysctl kern.maxswzone
> > > sysctl: unknown oid 'kern.maxswzone'
> > > 
> > > Is it available in 6.x, or is it something newer?
> > 
> > It's only a tunable, not available as a sysctl.  You can figure out the
> > current size from the vmstat output above, then do some math to figure
> > out a good guess to use based on how much swap it had in use when it
> > locked up.  For example, right now you have 116519 objects of size 288, so
> > 33557472 bytes allocated.  You said you die when 14 GB out of 64 total is
> > used, so you should probably try taking that value and multiplying it by
> > 64 / 14.  That gives a result of 153405586.  However, you really want to
> > round this up to a multiple of 288 (because the kernel rounds it down to
> > a multiple of 288), so I'd use a value of at least 153405792.  And yes,
> > that means you are setting aside a little over 146 MB of wired, physical
> > RAM just to hold metadata for your swap. :)
> > 
> 
> Excellent!  Increasing kern.maxswzone has indeed fixed the problem.  Can
> this value be auto-tuned better based upon the size of swap, or is it the
> particular swapping pattern caused by our environment that caused the
> default size to be insufficient?  In any case, the kernel printf you added
> recently should help make this much easier to diagnose in the future.
> 
> Thanks for your help!

The kernel does do a guess, but it doesn't always get the guess right, and I 
think there might be a bug where it always guesses wrong for > 32GB of 
swap. :)

-- 
John Baldwin
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to