From owner-freebsd-questions@FreeBSD.ORG Mon Sep 3 08:26:17 2007 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 993D916A419 for ; Mon, 3 Sep 2007 08:26:17 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx1.freebsd.org (Postfix) with ESMTP id 2CCC213C481; Mon, 3 Sep 2007 08:26:13 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <46DBC523.3040707@FreeBSD.org> Date: Mon, 03 Sep 2007 10:26:11 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Ian Smith References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@FreeBSD.org Subject: Re: g_vfs write error = 28, bad memory? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2007 08:26:17 -0000 Ian Smith wrote: > On Sun, 2 Sep 2007, Kris Kennaway wrote: > > Ian Smith wrote: > > > On Sat, 01 Sep 2007 19:34:41 +0200 Kris Kennaway wrote: > > > > Per olof Ljungmark wrote: > [..] > > > > > amavisd_enable="YES" > > > > > amavisd_ram="512m" > > > > > > > > > > and the line in rc.d/amavisd > > > > > mdmfs -M -s ${amavisd_ram} -w vscan:vscan md /var/amavis/tmp || true > > > > > for some reason creates a malloc based mfs > > > > > > > > > > Perhaps I should check this with the maintainer... > > > > > > > > > > > > > > > > > > Yes, malloc backing for md should be used in almost no situations. > > > > > > Am I right in thinking such situations would then be limited to diskless > > > / flashdisk / embedded systems having no swap? Seems obvious, but .. > > > > Sort of. Swap backing will still work when you have no swap, and it's > > still faster than malloc backing. The problem is that I think backing > > store reservation ("-o reserve") doesn't work unless you have actual > > swap to back everything, whereas with malloc backing it reserves in > > memory. This means that it is easy to overcommit memory and the system > > will probably panic when it suddenly finds no free memory for the md (as > > in the original email). > > Ah. Swap backing with no swap configured sounded oxymoronic, and I was > confused and left guessing by md(4) on 5.5-STABLE (March) till checking: > http://www.freebsd.org/cgi/man.cgi?query=md&apropos=0&sektion=0&manpath=FreeBSD+7-current&format=html > which explains swap backed operation in one short but crucial sentence. > > But is running out of memory with swap-backed md (with no swap) likely > to be any prettier than the panics from (unreserved) malloc backing? Probably not. No worse though. > > Ideally if no swap was configured, swap backing would also reserve the > > space in memory, and then I am not aware of any other reasons to > > continue using malloc backing. > > By 'ideally' I guess you mean that it doesn't, yet? I hope to get a > Soekris 4801 before too long, which will provide a chance to experiment > (though I'll likely run it from one of my old 4GB laptop drives anyway). Correct. > Also noted in passing: the 'auto' parameter to bsdlabel(8) used by one > mdconfig(8) example is undocumented, though supported in bsdlabel.c OK, you should submit a PR. Kris