[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: ext4 and extremely slow filesystem traversal



* Vincent Caron <vcaron bearstech com> hat geschrieben:

> On 14/03/2013 21:57, Peter Grandi wrote:
> >> This filesystem has no file owned by root and won't have
> >> > any. I thought in this case -m0 would be a good idea.
> > Why does it matter here that "no file owned by root"?
> > 
> > What has that got to do with the much greater difficulty to find
> > contiguous space the fuller the filetree is?
> 
>   Because the man page says that reserved blocks are used to protect
> root-level daemons from misbehaving would unprivileged programs try to
> fill the disk. And uh, to avoid fragmentation, I missed that part.
> 
>   OTOH I monitor disk space and never let go past 95% block usage
> without specific action (freeing inodes or enlarging filesystem). Would
> I use -m5 and oversize my filesystems (because I sell the capacity, say
> I sell 100GB then I need a 105GB blockdev), I would still monitor the
> disk usage and take action before it's 100% filled up. But I'd end up
> reserving more blocks without more guarantees that the -m0 case.
> 
> So technically it looks wrong, but politically I'm not sure it's
> stupid. Or is it ?

Using -m technically makes the file system driver report ENOSPC when
there is in fact still free space available.

So, as long as you make sure, that you have at least 5% free space at any
given time, it doesn't matter whether you have -m0 or -m5. However, tools
like df show the available capacity to user space, so 100GB with 95GB used
will show 100% used with -m5 and 95% used with -m0. Effectively, that
means, when you go with -m5 and make sure, df shows at least 5% free space,
you end up with about 10% free all the time - this way reducing
fragmentation - in theory. Since you're missusing your file system as
data bank management system with many small files anyways,
inter file fragmentation is the least of your problems. So, it's totally
safe for you to stay with -m0.

Regards, Bodo


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]