repeatable crash on RELENG7
Steve Polyack
korvus at comcast.net
Thu Dec 4 13:28:43 PST 2008
Kevin Oberman wrote:
>> Date: Tue, 2 Dec 2008 19:33:00 +0300
>> From: "Alexandr Pakhomov" <pahom.rt at gmail.com>
>> Sender: owner-freebsd-stable at freebsd.org
>>
>> On Tue, Dec 2, 2008 at 5:12 PM, Mike Tancsa <mike at sentex.net> wrote:
>>
>>
>>> At 08:38 AM 12/2/2008, Kostik Belousov wrote:
>>>
>>>
>>>>> mdconfig -a -t malloc -s 1800M
>>>>>
>>>> You cannot have ~ 2Gb of kernel memory allocated for md, at least not on
>>>> i386.
>>>>
>>>>
>>> Thanks, how do I find out what the limit is on a machine ? Is it
>>> vm.kvm_size ?
>>>
>>>
>>> ---Mike
>>> _______________________________________________
>>> freebsd-stable at freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
>>> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
>>>
>>>
>> Try tune both vm.kmem_size and vm.kmem_size_max via /boot/loader.conf. They
>> are equal to 330M by default.
>>
>
> Mike,
>
> Let me second Kris's suggestion. I can think of very few cases where
> malloc backed is in any way better than swap backed. Many people assume
> that swap-backed performance is better, but this is only the case if you
> run out of memory (and that is full memory, not kvm).
>
> md is still RAM based and very fast. The current mdconfig should be
> defaulting to swap-backed devices, but I don't see any indication of
> that in the man page, so I may be wrong.
>
I agree here. Using mdconfig(8) in malloc-backed mode may lead to
unpredictable results when attempting to use large amounts of memory.
mdconfig(8) seems to allow you to "reserve" more kernel memory than may
be appropriate, and as in Mike's experience, causes a kernel panic upon
writing enough data to the malloc'd md(4) device.
It seems that the term "swap-backed" is misleading for some people. It
does NOT mean your md(4) device will be constantly swapping to disk (and
the man page does an alright job of relaying this). It simply means
that generally available memory will be used, and so will swap iff
available memory happens to drop low enough.
The bottom line in my experience with md(4) devices greater than ~100MB
is that "swap-backed" is always reliable, while malloc'd md(4) devices
will cause unpredictable kernel panics.
More information about the freebsd-stable
mailing list