Re: Kernel hang on 6.x



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!

---
Brad Chisholm
blc@xxxxxxxxxxx
_______________________________________________
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' ... a multiple of 288), so I'd use a value of at least 153405792. ... RAM just to hold metadata for your swap. ... the kernel printf you added ...
    (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: System crashing when swap hits 25%
    ... If you want to set something with sysctl, ... swap file and performance is amazing. ... rather than the usual 2 or 3 apps with a few browser tabs open ... when things hang, at the moment I have: ...
    (Fedora)
  • Re: [opensuse] swap not available
    ... Given one of the goals of RAID is to keep the system running when a ... Your available swap space would be reduced, ... Drives do fail occasionally, ... If you swap over multiple partitions the data is automatically striped, it usually copes OK if a drive blobs Linux is fairly stable these days when it comes to read/write errors. ...
    (SuSE)
  • Re: [opensuse] swap not available
    ... Your available swap space would be reduced, ... Drives do fail occasionally, ... If you swap over multiple partitions the data is automatically striped, ...
    (SuSE)