From owner-freebsd-current@FreeBSD.ORG Wed Apr 4 12:13:46 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22A0B106564A for ; Wed, 4 Apr 2012 12:13:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id EB2878FC0C for ; Wed, 4 Apr 2012 12:13:45 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 56BACB941; Wed, 4 Apr 2012 08:13:45 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Tue, 3 Apr 2012 09:42:06 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <4F746F1E.6090702@mail.zedat.fu-berlin.de> <20120402132659.GF1420@albert.catwhisker.org> <20120402210326.GA6364@reks> In-Reply-To: <20120402210326.GA6364@reks> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201204030942.06788.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 04 Apr 2012 08:13:45 -0400 (EDT) Cc: Gleb Kurtsou Subject: Re: Using TMPFS for /tmp and /var/run? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2012 12:13:46 -0000 On Monday, April 02, 2012 5:03:26 pm Gleb Kurtsou wrote: > On (02/04/2012 06:26), David Wolfskill wrote: > > On Mon, Apr 02, 2012 at 01:31:19PM +0300, Gleb Kurtsou wrote: > > > ... > > > You could try the patch attached. It adds support for size option suffixes > > > (like 1g) and introduces swap limit (part of the older patch, not sure > > > if it's any use). > > > > > > Patch is against 10-CURRENT. > > > Older version: https://github.com/glk/freebsd-head/commit/3bd8f7d > > > .... > > > > OK; here's a summary of what I found so far, now running: > > > > FreeBSD g1-227.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0 233772M: Mon Apr 2 05:42:48 PDT 2012 root@g1-227.catwhisker.org:/usr/obj/usr/src/sys/CANARY i386 > > > > * First, the patch applied cleanly (via "patch -p1"). > > > > * Resulting sources build with no issues. > > > > * Prior specification I had in /etc/fstab: > > > > tmpfs /tmp tmpfs rw,size=2147483648 0 0 > > > > worked same as before the patch; "df -h /tmp" reported a size of 2.0G. > > > > * Changing the above to read: > > > > tmpfs /tmp tmpfs rw,size=2g 0 0 > > > > also provided the same result, so the unit-specification code looks > > as if it's working as expected. > > > > * I have 20G specified for swap, and 4G RAM (and, as above, I'm running > > i386). Changing the above tmpfs line in /etc/fstab to > > > > tmpfs /tmp tmpfs rw,size=8g 0 0 > > > > (still) yields: > > > > g1-227(10.0-C)[3] df -h /tmp > > Filesystem Size Used Avail Capacity Mounted on > > tmpfs 23G 12k 23G 0% /tmp > > g1-227(10.0-C)[4] > > tmpfs-32bit-size_max.patch.txt should fix the problem. I don't have i386 > installations to test it myself. > > Do you run PAE kernel? Could you try filling up /tmp at least to 10g. Hmm, is UINT64_MAX really the right type? Should it be something like OFF_MAX instead? -- John Baldwin