From owner-freebsd-questions@FreeBSD.ORG Sun Nov 18 03:15:21 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 568CCA79 for ; Sun, 18 Nov 2012 03:15:21 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (nightmare.dreamchaser.org [12.32.44.142]) by mx1.freebsd.org (Postfix) with ESMTP id DF0E18FC13 for ; Sun, 18 Nov 2012 03:15:20 +0000 (UTC) Received: from breakaway.dreamchaser.org (breakaway.dreamchaser.org. [12.32.36.73]) by nightmare.dreamchaser.org (8.13.6/8.13.6) with ESMTP id qAI3FDal045632; Sat, 17 Nov 2012 20:15:13 -0700 (MST) (envelope-from freebsd@dreamchaser.org) Message-ID: <50A852C1.4010004@dreamchaser.org> Date: Sat, 17 Nov 2012 20:15:13 -0700 From: Gary Aitken User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121116 Thunderbird/16.0.2 MIME-Version: 1.0 To: Warren Block Subject: Re: 9.0 crash, ssd or filesystem problem? References: <50A53FF1.7050806@dreamchaser.org> <50A602AB.2060307@dreamchaser.org> <50A66659.5040406@dreamchaser.org> <50A6FFC0.3050902@dreamchaser.org> <50A7EE9B.4070003@dreamchaser.org> <50A80DCB.7030500@dreamchaser.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (nightmare.dreamchaser.org [12.32.36.65]); Sat, 17 Nov 2012 20:15:13 -0700 (MST) Cc: FreeBSD Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd@dreamchaser.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Nov 2012 03:15:21 -0000 On 11/17/12 19:50, Warren Block wrote: > On Sat, 17 Nov 2012, Gary Aitken wrote: > >>> There was a nice Sun white paper by Peter Snyder on tmpfs. It's linked on the Wikipedia tmpfs page, but Oracle has broken the link. Google has a rendered version of a PostScript copy (long URL): >>> http://webcache.googleusercontent.com/search?q=cache:EXMeqvhFfrsJ:www.sun3arc.org/papers/OS/tmpfs_virtual_memory_filesystem.ps.gz+tmpfs+white+paper&cd=12&hl=en&ct=clnk&gl=us >> >> Thanks. >> Interesting, I would have thought swap space for something in a tmpfs was >> not allocated until it needed to be swapped out. As I read it, used tmpfs >> space reserves space in swap. > > It uses VM, so tmpfs is a memory disk until you run low on memory, then > it gets swapped out. But until then, it's a RAM disk, with the added > benefit of not eating a fixed chunk of RAM all the time. I understand that. What surprised me was that the swap space is *allocated* up front along with the memory allocation. It's not written, but it is allocated. Which would imply swap has to be at least as large as the largest tmp file actually written. So one can't have a memory tmp space larger than the swap file. If what the paper says still holds: para 4.4: "The location of swap space for an anonymous page is determined when the anonymous memory is allocated." While out chopping on the woodpile, I decided that was probably for deadlock prevention. > Oh, and unless you have a very recent -STABLE or -HEAD, see > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/168544 I'll try not to shutdown :-)