From owner-freebsd-embedded@FreeBSD.ORG Sun Jul 15 12:39:39 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EFC41065672 for ; Sun, 15 Jul 2012 12:39:39 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta01.emeryville.ca.mail.comcast.net (qmta01.emeryville.ca.mail.comcast.net [76.96.30.16]) by mx1.freebsd.org (Postfix) with ESMTP id 575A38FC1E for ; Sun, 15 Jul 2012 12:39:39 +0000 (UTC) Received: from omta10.emeryville.ca.mail.comcast.net ([76.96.30.28]) by qmta01.emeryville.ca.mail.comcast.net with comcast id acdC1j0040cQ2SLA1cfZGe; Sun, 15 Jul 2012 12:39:33 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta10.emeryville.ca.mail.comcast.net with comcast id acfX1j00f4NgCEG8WcfYoV; Sun, 15 Jul 2012 12:39:33 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q6FCdU5X018736; Sun, 15 Jul 2012 06:39:30 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Adrian Chadd In-Reply-To: References: <1341745590.2740.17.camel@manbearpig.dynamic.weites.net> <201207081805.33574.bschmidt@freebsd.org> <1341841445.2540.10.camel@manbearpig.dynamic.weites.net> <1341849727.2540.11.camel@manbearpig.dynamic.weites.net> <1342195983.2336.35.camel@manbearpig.dynamic.weites.net> <4B538596-937B-46F3-AF8F-17F34BE0C92D@bsdimp.com> Content-Type: text/plain; charset="us-ascii" Date: Sun, 15 Jul 2012 06:39:29 -0600 Message-ID: <1342355969.5473.6.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Harm Weites , freebsd-embedded@freebsd.org, Bernhard Schmidt Subject: Re: TP-Link wr1043nd out of swap space X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 12:39:39 -0000 On Sun, 2012-07-15 at 03:31 -0700, Adrian Chadd wrote: > Hi, > > I would really appreciate it if people (read; not me) would be able to > do the digging needed to get to the bottom of user/kernel memory > usage. > > I really need to focus on just the net80211/wifi stack side of things. > I'm going to focus on getting the ath(4) memory usage down over the > next few months so it remains feasible to run on 32MB platforms, as > those still ship. But I can't keep the rest of the kernel and userland > in check. > > Thanks, > > > Adrian I had to chase down "out of swap space" aborts on an ARM platform with 64MB not long ago, and I discovered that the kernel by default allocates 1/4 of available ram for vfs buffers (up to some limit, then it's 1/10 after that). I added "option NBUF=128" to our kernel config and that limited wired vfs buffer space to about 2MB, which seems much more reasonable for an embedded platform that does relatively little disk IO. I suspect the NBUF value could go even lower, but I'm also afraid that making it too low will lead to other problems; I don't really know enough to make an informed decision. So far the 128 value is working well in testing, but we haven't actually put any units in the field with that setting (I think we will pretty soon). -- Ian