[mythtv-users] ext4 mkfs largefile4 option

f-myth-users at media.mit.edu f-myth-users at media.mit.edu
Fri Mar 8 04:36:27 UTC 2013


    > Date: Thu, 07 Mar 2013 22:50:36 -0500
    > From: "Michael T. Dean" <mtdean at thirdcontact.com>

    > On 03/07/2013 01:36 PM, Gary Buhrmaster wrote:
    > > But back to the original question, another tuning option for
    > > large recording file systems is to reduce the reserved space
    > > (often 5%) of a dedicated recording file system to a much
    > > smaller number.

    > Isn't 0% appropriate for any but "critical" file systems (i.e. those 
    > used for system functionality--such as the root file system)?  I have 5% 
    > on my root and 0% on all others, figuring since root user doesn't use 
    > any of the others, having a root reserve makes little sense.

ext (and many other) filesystems get exponentially slower to allocate
blocks as the filesystem passes a critical knee in its fullness.

I usually use 0% myself on media filesystems, but be aware that you
shouldn't use these as places to do -realtime- writes if you let
ext (at least) get past 97-98% or so, and preallocation may change
this too, of course.  The "5% for root" isn't -only- to keep the
system from losing the ability to write as root; it's also to keep
your filesystem's write performance from going to hell.  [I've also
noticed this when writing to NTFS filesystems from Linux, only it's
far worse there and various widely based on how recent the distro,
with more-recent ones paradoxically appearing to do far worse.]

It would be easy enough to benchmark this for your particular
configuration by doing something like this untested experiment:

  pv -r < /dev/zero > /some/where/ZERO

while simultaneously doing

  watch -n 1 df /some/where

in another window and seeing if the rate counter starts dropping
precipitously as the filesystem utilization passes the high 90's.

In many use cases, even the endgame may be "fast enough", but it's
useful to verify that before filling it all the way up, if you're
depending on a certain minimum throughput to disk.


More information about the mythtv-users mailing list