[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-user
Subject:    Re: [gentoo-user] Freeing up disk space problem!!
From:       Alan McKinnon <alan.mckinnon () gmail ! com>
Date:       2012-02-29 9:29:45
Message-ID: 20120229112945.73867e57 () khamul ! example ! com
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic