From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-135717-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1S2fsd-0004X2-RL
	for garchives@archives.gentoo.org; Wed, 29 Feb 2012 09:31:28 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BCB72E0905;
	Wed, 29 Feb 2012 09:31:11 +0000 (UTC)
Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181])
	by pigeon.gentoo.org (Postfix) with ESMTP id DDC9CE0905
	for <gentoo-user@lists.gentoo.org>; Wed, 29 Feb 2012 09:30:05 +0000 (UTC)
Received: by wibhi8 with SMTP id hi8so4675126wib.40
        for <gentoo-user@lists.gentoo.org>; Wed, 29 Feb 2012 01:30:05 -0800 (PST)
Received-SPF: pass (google.com: domain of alan.mckinnon@gmail.com designates 10.180.107.169 as permitted sender) client-ip=10.180.107.169;
Authentication-Results: mr.google.com; spf=pass (google.com: domain of alan.mckinnon@gmail.com designates 10.180.107.169 as permitted sender) smtp.mail=alan.mckinnon@gmail.com; dkim=pass header.i=alan.mckinnon@gmail.com
Received: from mr.google.com ([10.180.107.169])
        by 10.180.107.169 with SMTP id hd9mr36843823wib.0.1330507805228 (num_hops = 1);
        Wed, 29 Feb 2012 01:30:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=date:from:to:subject:message-id:in-reply-to:references:organization
         :x-mailer:mime-version:content-type:content-transfer-encoding;
        bh=TrzrmU2EL97OH6J4TI47cDc4YfJPQdnwMwziflEtSbI=;
        b=DXWiXHQsifJy/uutRhgA52U94pPblBsF1d4VOuJiDuWrRa+wlFNorVeJh7Cd49Xnzu
         YHQYy9BwP65rOgIqEcuTKLg6U8bK+u7k4enSwamUl4YrHvESo5ZlEFfEcEmhEnEjqUez
         NqtWUt9Z6ynSijrUzlmHD8ZZ2ZB90KfCMLdYg=
Received: by 10.180.107.169 with SMTP id hd9mr29164119wib.0.1330507805163;
        Wed, 29 Feb 2012 01:30:05 -0800 (PST)
Received: from khamul.example.com (dustpuppy.is.co.za. [196.14.169.11])
        by mx.google.com with ESMTPS id dw7sm34104681wib.4.2012.02.29.01.30.02
        (version=SSLv3 cipher=OTHER);
        Wed, 29 Feb 2012 01:30:04 -0800 (PST)
Date: Wed, 29 Feb 2012 11:29:45 +0200
From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Freeing up disk space problem!!
Message-ID: <20120229112945.73867e57@khamul.example.com>
In-Reply-To: <20120229002500.6d2ab8a9@weird.wonkology.org>
References: <CALMtN6wNY5K4350=Sd3UyPsPmnf64tjHpTJsrz+28cgJ2pXyeA@mail.gmail.com>
	<20120228140150.2b35b864@weird.wonkology.org>
	<20120228132712.6df1ca07@digimed.co.uk>
	<20120229002500.6d2ab8a9@weird.wonkology.org>
Organization: Internet Solutions
X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Archives-Salt: 187fc118-98e6-4f4f-8d3e-29e54a31e7ff
X-Archives-Hash: b5cebe9223369d38b9815f32af3d963f

On Wed, 29 Feb 2012 00:25:00 +0100
Alex Schuster <wonko@wonkology.org> wrote:

> Neil Bothwick writes:
> 
> > On Tue, 28 Feb 2012 14:01:50 +0100, Alex Schuster wrote:
> > 
> > > If you instantly need more space, reduce the amount of reserved
> > > space for the superuser, which is 5% as default:
> > > tune2fs -m 2 /dev/your/partition
> > > Don't reduce it to 0, the lower this value is, the more
> > > fragmentation you will get.
> > 
> > Why is that? I would have expected more usable space to reduce the
> > need for fragmentation. I routinely use 0 on non-system filesystems.
> 
> I read this often, and to me it seems to make sense. When a file
> system is nearly full, writing a last big file will make the file
> being cluttered along all those tiny places where some free space is
> still left. And this probably already happens to some extent before
> the filesystem is completely full. 
> 
> Now, which values for reserved percentage are good, I don't know.

The 5% figure is completely arbitrary and dates back many years. There
was no good reason then for it to be exactly 5%, it just happened to
mostly work fine. Remember that was a time when 250M was a BIG drive. 5%
is 2.5K and that is about the size of the largest single file people
realistically were using.

So 5% wiggle room for root lets you manipulate the last single file
you were using when the drive filled up, and hence save the day. These
days 2TB file systems are common and 5% means 20G.

How many 20G files do you routinely have on a single file system? Media
drives aside, a few meg is still about the broad average file size. It
is just not realistic to reserve emergency wiggle room for root that
amounts to 20,000 average files.

It means there's no single sane default anymore. On my servers I set
reserved space to 100M or so as that's what I need. I reckon the
average person should keep it to somewhat larger than the biggest
single file you expect to store on that file system.


 
> This probably depends much on the typical size of files on that
> partition, and usage patterns. For large movies on your data
> partition, it probably does not matter, but for my system partitions
> (/root, /usr, /var, /tmp, portage stuff) I just keep it at 5%.
> 
> With the benefit that I can instantly free some space in /var when
> it's just become full, without needing to decide what to delete.
> Okay, in practice this does not matter much because resizing the LVM
> and resizing the FS is also a matter of seconds only.
> 
> 	Wonko
> 



-- 
Alan McKinnnon
alan.mckinnon@gmail.com