Re: Kernel hang on 6.x



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@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Kernel hang on 6.x
    ... sysctl: unknown oid 'kern.maxswzone' ... 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. ... RAM just to hold metadata for your swap. ...
    (freebsd-hackers)
  • Re: Kernel hang on 6.x
    ... How much swap do you have? ... swap did not seem to affect the hang. ... sysctl: unknown oid 'kern.maxswzone' ... a multiple of 288), so I'd use a value of at least 153405792. ...
    (freebsd-hackers)
  • Re: Simple script that locks up my box with recent kernels
    ... >> and just run the resulting kernel version for a day or two. ... then I'll restart bisection and give each ... The box has 2GB of RAM and 768MB swap. ...
    (Linux-Kernel)
  • Re: [SLE] compile 2.6.13 kernel SUSE 9.3 devices not recognized
    ... > menu.lst points to the kernel correctly. ... If /dev/hda6 is the swap partition, I've seen the same or similar ... Other kernels I assume boot without problems. ... types of hardware, so I prune my config to suit the hardware I have. ...
    (SuSE)
  • Re: DevFS vs. udev
    ... The main problem is documentation, ... Moving kernel functions into user space has always ... archiving and moving around /dev subdirectories, ... swap; swap every time ...
    (Linux-Kernel)

Loading