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

Michael T. Dean mtdean at thirdcontact.com
Thu Mar 1 19:41:59 UTC 2012


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


More information about the mythtv-users mailing list