[mythtv-users] Mythfilldatabase is REALLY slow.

Gavin Hurlbut gjhurlbu at gmail.com
Sun Oct 9 08:03:38 UTC 2011


On Sat, Oct 8, 2011 at 9:59 PM, Raymond Wagner <raymond at wagnerrp.com> wrote:

> The SQLite benchmark is especially telling of the situation.
>
> http://www.phoronix.com/scan.php?page=article&item=ext4_btrfs_nilfs2&num=2
>
>
This is getting way above the heads of most people.  Mounting ext4 with
barrier=0 will make it act the same way as ext3 did (with barriers
disabled), however, this is at the cost of massive filesystem damage should
the power fail.  In ext3, they were off by default, in ext4, they are on by
default.  Adding a "journal_async_commit" should significantly help (like
twice as fast with barriers on as without it).  I also use "noatime,
nodiratime" on my mysql data mount (which is ext4 with barriers ON).
 Reducing the pointless metadata spew is useful too.

The problem is not ext4.  It is with applications that use fsync() too much,
which triggers the barriers (as it should!).  When you do fsync(), you are
telling the OS to flush the data to disk.  This triggers a barrier in the
filesystem, causing the data AND the filesystem metadata to be flushed to
disk.  This is inherently slow.  If you don't care that your data actually
gets to disk, feel free to let it trash your data fast, or let the power
failure brutalize your filesystem :)

Unfortunately, mythtv uses fsync() in the recording path too, but I think we
have it spaced out to be less abusive of the I/O subsystem, but not sure how
recently it has been looked at in detail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20111009/8039dfbb/attachment.html 


More information about the mythtv-users mailing list