[mythtv-users] Mythtv 24.1 - MythFillDatabase filling the database

Trevor Burns mythtv at teklord.com
Thu Mar 1 21:51:44 UTC 2012


Mike

So I changed the mount point of vg_pvr2-lv_root mount point to
defaults,barrier=0.  I launched mythweb and it has been running like a demon
-- the database is populating and took about 4 minutes to post 2 weeks of
data.

Is EXT4 the ideal (most efficient/reliable) file system for MythTV?  My PVR
is for recording TV it is not a mission critical system so I don't have a
UPS (or "battery backed up storage") on the system. 

Trevor Burns
-----Original Message-----
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Michael T. Dean
Sent: Thursday, March 01, 2012 1:42 PM
To: Discussion about MythTV
Subject: Re: [mythtv-users] Mythtv 24.1 - MythFillDatabase filling the
database

On 03/01/2012 09:48 AM, Trevor Burns wrote:
> The database is currently on an EXT4 file system.  Looking at fstab 
> (see below), I am not seeing any indication of barriers for the 
> mounts.  One item I forgot to include, the two 500G drives are "linked" as
a LVM volume group.
>
> /dev/mapper/vg_pvr2-lv_root /                       ext4    defaults
> 1 1
> UUID=3a613e91-3559-4f4e-8344-0a5115b08c4b /boot                   ext4
> defaults        1 2
> /dev/mapper/vg_pvr2-lv_swap swap                    swap    defaults
> 0 0
> tmpfs                   /dev/shm                tmpfs   defaults        0
0
> devpts                  /dev/pts                devpts  gid=5,mode=620  0
0
> sysfs                   /sys                    sysfs   defaults        0
0
> proc                    /proc                   proc    defaults        0
0

Since barriers are enabled by default on ext4, and yours is set to defaults,
you have them enabled.

You can change this by specifying a mount option of barrier=0.

I would say it's worth testing with barrier=0 set.  If mythfilldatabase
works without barriers enabled, you can then choose whether the benefits
outweigh the danger of running without barriers enabled.

As a quick summary, barriers cause sync operations (something MySQL--and any
other database--requests relatively frequently) to block until the data is
actually on the HDD platter (=safe on non-volatile storage).  
Without barriers, a sync operation will return (allowing the program, MySQL,
to continue doing its job) as soon as the data being written is in the HDD
cache (volatile RAM buffer in the HDD)--meaning that if you lose power, you
could lose data(/will lose all data in the cache), potentially even critical
file system data that could corrupt the file system.  These losses are even
possible with ext3 and ext4--which are journaling file systems--if barriers
aren't enabled.  This is why the default for ext4 (and, at least in some
distros, the default for ext3 on new kernels/configurations) was changed to
enable barriers.

Again, I'm not recommending running without barriers enabled.  I'm only
recommending a quick test without barriers enabled to see if the slowness is
causing the issue for mythfilldatabase.  If so, you will have to decide what
to do to mitigate the issue.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users




More information about the mythtv-users mailing list