From owner-freebsd-questions@FreeBSD.ORG Sat Sep 13 04:23:28 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 696A1A89 for ; Sat, 13 Sep 2014 04:23:28 +0000 (UTC) Received: from resqmta-po-04v.sys.comcast.net (resqmta-po-04v.sys.comcast.net [IPv6:2001:558:fe16:19:96:114:154:163]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "Bizanga Labs SMTP Client Certificate", Issuer "Bizanga Labs CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 37ABC7D3 for ; Sat, 13 Sep 2014 04:23:28 +0000 (UTC) Received: from omta08.emeryville.ca.mail.comcast.net ([76.96.30.12]) by resqmta-po-04v.sys.comcast.net with comcast id qUPP1o0010FhH2401UPSLQ; Sat, 13 Sep 2014 04:23:26 +0000 Received: from Curly-Sr.dbis.net ([50.183.226.175]) by omta08.emeryville.ca.mail.comcast.net with comcast id qUPR1o0043nhSLa8UUPR1G; Sat, 13 Sep 2014 04:23:26 +0000 Message-ID: <5413C6B9.3090700@comcast.net> Date: Fri, 12 Sep 2014 22:23:21 -0600 From: Dave Babb User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: tmpfs in /etc/fstab .... References: <5413C2DA.5040105@hiwaay.net> In-Reply-To: <5413C2DA.5040105@hiwaay.net> Content-Type: multipart/mixed; boundary="------------020400080600040402030809" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1410582206; bh=V6iMMvZ606KeIYrLTbL3TiyMsKv9Oy6rzqjo5DIHqiE=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=Ogr34PRDvIe57hT5dWTa+UaLaAH/zEgA8WbMN1SaHXMmb+mvBQ1jjNYmK5uf5ndmZ 4qGKl5V870RcjY2xdcr86jl+rE/MBKHKlSXubj/SSvRUEEuqpHzIwCMBH7un/MX4xq oAmKhtjWtUrjjq901/r2Z3W9aXQ7F4TvIixeEHK81J0N1oddF0EoZlB0duRb94sqJu UM3i9ZSky4tpNyeREhwH7v9actdIEuGBFI7C9DYq22ZrMEoEbLZue0dmIdzxfxr7yj SBrlNL6sGJyRljjTuntgvkCTGKobmfQSiVadRNilKgtjhsQ9RGrJmSejUcmkaw0XWJ ICE6hGT2M8Mug== X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 04:23:28 -0000 This is a multi-part message in MIME format. --------------020400080600040402030809 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit This should help you. I use tmpfs for /tmp, I use tmpfs for a RamDisk where I do a lot of small compilations, and I also use tmpfs for my /usr/obj tree. I have an SSD that I want to protect at all costs. tmpfs will use half of your ram before going to swap. In my case, I have 32Gb of ram and no swap. I just did a buildworld, followed by a portmaster -af. At the worst case...I was using 7% of my tmpfs ram, according to df -h....7 % of 16Gb is only 1.12 Gb. So I had no issue doing some heavy duty system rebuilding from ram......via tmpfs. I did this the long way because I needed the experience...I understand and have been told that there are easier and shorter ways.....But I did it to learn about rebuilding world which to date I had never done. Hope this helps! Dave On 09/12/14 22:06, William A. Mahaffey III wrote: > > > .... I would like to enable use of tmpfs on my FBSD 9.3 box for > performance. The box has 16 GB of both RAM & swap. I added > 'tmpfs_load="YES"' to my /boot/loader.conf, but I can't figure out > what to put in /etc/fstab to allow the process to happen automatically > upon reboot. Specifically, what is the device I should be using. The > man page gives the mount command, which looks like the device is > called 'tmpfs'. Is that correct ? Are there any issues w/ this > procedure ? TIA .... > > --------------020400080600040402030809 Content-Type: text/plain; charset=us-ascii; name="fstab" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fstab" # Daves customized fstab for FreeBSD # # # First Lines are for system required entries # # # # keep temporary files and in ram rather than wear out the SSD # # Device Mountpoint FStype Options Dump Pass# tmpfs /tmp tmpfs rw,mode=01777 0 0 tmpfs /usr/home/dcbdbis/RamDisk tmpfs rw 0 0 tmpfs /usr/obj tmpfs rw,mode=01777 0 0 # Keeps OpenJDK happy and some linux apps as well fdesc /dev/fd fdescfs rw 0 0 proc /proc procfs rw 0 0 # ------------------------------------------------------- # End of system level fstab entries, now on to the devices # ------------------------------------------------------- # Device Mountpoint FStype Options Dump Pass# # /dev/ada0p2 is the root drive /dev/ada0p2 / ufs rw,noatime 1 1 # /dev/ada1p1, Backup-1 /dev/gpt/Backup-1 /media/Backup-1 ufs rw,noatime 0 2 # /dev/ada2p1, Backup-2 /dev/gpt/Backup-2 /media/Backup-2 ufs rw,noatime 0 2 # /dev/ada3p3, Misc storage and VM's /dev/gpt/Misc /media/Misc ufs rw,noatime 0 2 --------------020400080600040402030809--