From owner-freebsd-arm@FreeBSD.ORG Wed Jul 2 11:21:18 2014 Return-Path: Delivered-To: freebsd-arm@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 929F74D8 for ; Wed, 2 Jul 2014 11:21:18 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2757828F5 for ; Wed, 2 Jul 2014 11:21:18 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id hi2so8817727wib.2 for ; Wed, 02 Jul 2014 04:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=KOVVO6XiLZws8cHU+qqv/VzGUx+gXZb7BH7kZZ3EVqo=; b=SlxE91eAxqABwzQbnmfCYX5C0C6KQE6lVHKn5AKcoQ2hRkYT+mTh4mbsNEf4rEfeVM lYEyo/6k9r99m7R3aLyrUHlbdpbtt8J0b83xcxGYoVhRMi2bZ2US8HEVZQDEvp33aDOW fq1k4ZPaY+jso4FZkcKhNYf47sc/4Bo/Oyg8giKSjX2RLiP+sXJkHhUBeiGWCwknZ7cG gS6qB2J6dTKpmuF0kR6NMfWNq6E/iezJASaDUjLubPFn2MuV8oB8lTAN4JQ5juGhXclC V6XnD/2V9jBK65uEyKyHphnujZ+pKC7q435KB3Na3unm1CGlH+Lm4/V9XHtyZGFUdRxL wb8A== X-Received: by 10.194.185.238 with SMTP id ff14mr36180151wjc.9.1404300074489; Wed, 02 Jul 2014 04:21:14 -0700 (PDT) Received: from ?IPv6:2001:1620:ff0:c51:511:badc:418a:8c96? ([2001:1620:ff0:c51:511:badc:418a:8c96]) by mx.google.com with ESMTPSA id fn1sm54156326wib.18.2014.07.02.04.21.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Jul 2014 04:21:13 -0700 (PDT) Message-ID: <53B3EB29.4030908@gmail.com> Date: Wed, 02 Jul 2014 13:21:13 +0200 From: Mattia Rossi User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-arm@FreeBSD.org Subject: Re: /tmp, /var/log, /var/tmp as /dev/md - why? References: <201407010925.s619PHeT006679@mech-cluster241.men.bris.ac.uk> <44a6e8a451a.810fa8f@mail.schwarzes.net> In-Reply-To: <44a6e8a451a.810fa8f@mail.schwarzes.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 11:21:18 -0000 Am 01.07.2014 21:27, schrieb Andreas Schwarz: > Speed and speed, but I can't understand why using md here, there is already tmpfs, > which optimzed for such cases (dynamic allocation, etc.). > > root@pizelot:~ # df > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/mmcsd0s2a 983680 57252 847736 6% / > devfs 1 1 0 100% /dev > /dev/mmcsd0s2d 8106716 3068708 4389472 41% /usr > /dev/mmcsd0s2e 8106716 155976 7302204 2% /var > /dev/mmcsd0s2f 8106716236 7457944 0% /home > tmpfs 1097160 4 1097156 0% /tmp > tmpfs 1097160 4 1097156 0% /var/tmp > On an embedded systems with little memory I prefer to limit the partitions to a certain size, like 32M, so dynamic allocation is no advantage. What other differences are there between tmpfs and a simple md device? I'd be interested in knowing any tricks, that can make the system faster :-) So yes, it's about speed. Especially mounting /var/log on development systems, where some errors can result in massive logging it's better to have that on a ramdisk rather than on the slow SD card. Cheers, Mat