From owner-freebsd-stable@FreeBSD.ORG Thu Dec 4 21:28:43 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE6DB1065677 for ; Thu, 4 Dec 2008 21:28:43 +0000 (UTC) (envelope-from korvus@comcast.net) Received: from QMTA01.westchester.pa.mail.comcast.net (qmta01.westchester.pa.mail.comcast.net [76.96.62.16]) by mx1.freebsd.org (Postfix) with ESMTP id 6A4F98FC22 for ; Thu, 4 Dec 2008 21:28:43 +0000 (UTC) (envelope-from korvus@comcast.net) Received: from OMTA05.westchester.pa.mail.comcast.net ([76.96.62.43]) by QMTA01.westchester.pa.mail.comcast.net with comcast id n7ge1a0310vyq2s519FUKL; Thu, 04 Dec 2008 21:15:28 +0000 Received: from [192.168.2.164] ([206.210.89.202]) by OMTA05.westchester.pa.mail.comcast.net with comcast id n9FF1a00c4Mx3R23R9FJrg; Thu, 04 Dec 2008 21:15:26 +0000 X-Authority-Analysis: v=1.0 c=1 a=6I5d2MoRAAAA:8 a=d_4LvegynDpHsueOYS0A:9 a=FaA_p-e2MH80nz0pW00A:7 a=znMLVyXIlFKoWgWtbaPD9sZbD0kA:4 a=MSl-tDqOz04A:10 a=SV7veod9ZcQA:10 a=qm7f-9QL9LsA:10 a=ZKlmZI38X7UA:10 Message-ID: <49384863.9040807@comcast.net> Date: Thu, 04 Dec 2008 16:15:15 -0500 From: Steve Polyack User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Kevin Oberman References: <20081204204803.EB8D34500F@ptavv.es.net> In-Reply-To: <20081204204803.EB8D34500F@ptavv.es.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Mike Tancsa , Alexandr Pakhomov Subject: Re: repeatable crash on RELENG7 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2008 21:28:43 -0000 Kevin Oberman wrote: >> Date: Tue, 2 Dec 2008 19:33:00 +0300 >> From: "Alexandr Pakhomov" >> Sender: owner-freebsd-stable@freebsd.org >> >> On Tue, Dec 2, 2008 at 5:12 PM, Mike Tancsa 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@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >>> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@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.