[mythtv-users] Mythfilldatabase is REALLY slow.

Keith Pyle kpyle at austin.rr.com
Sun Oct 9 22:23:42 UTC 2011


On 10/09/11 14:40, Tim Draper wrote:
> On 9 October 2011 20:31, Richard Morton <richard.e.morton at gmail.com> wrote:
>> > Hi tim,
>> >
>> > I disagree with your analysis (sorry).
>> >
> no problem - i dont claim to know everything, so if im wrong then it's good
> to be corrected or advised down a better route :)
>> > It seems that due to safer defaults ext4 is slower and returning to ext3
>> > would be risky on power failure. The appropriate response I believe is to
>> > use performance options (such as those that I have implemented and wish
>> > confirmation that are safe) to recover the performance lost with the
>> > additional data integrity measures.
>> >
> i'll hold out on implementing those ext4 parameters - if they work then
> great (i'll shoot off to google once i've written this to research more),
> and it would certain save around an hour reinstalling mythtv as i'd backup
> existing DB first, and simply restore it on the new build.
> power tends to be fairly stable where i live, so that tends not to be much
> of a concern.
>
> thanks for the input - it's appreciated :)
I always find the (recurring) discussions about which filesystem is
faster to be interesting, but they often miss the point.  X may be
faster than Y which is faster than Z, and that comparison is interesting
but not necessarily pertinent.  The question should be: which
filesystems are fast enough for the given task given reasonable
supporting hardware?  Unfortunately, the comparisons are often further
confounded due to filesystem options settings that affect performance,
layout of partitions on physical drives, types of drives used, number of
drives, etc.

I believe there are some general principles that apply to improve
database performance: (1) put the DB on a physical drive separate from
other major functions (e.g., don't put it on a Myth data drive) and that
has a relatively low I/O load from other tasks using this drive,
(2) use a drive with reasonable seek performance,
(3) higher on-drive cache will probably be desirable,
(4) make sure you have your partitions laid out to align to the drive's
natural block size boundary (e.g., if the drive used 4K blocks, allocate
partitions to start on 4K boundaries).

I find ext4 to be a very suitable filesystem for a Myth database (and
ext3 wasn't a problem before it).  I have the DB partition on the OS
drive since the OS I/O workload isn't that high and the Myth storage
directories are on other disks.  I presently use a SSD for the OS/DB
drive, although the 7200 RPM hard disk that preceded it worked well
too.  DB operations are noticeably faster with the SSD.  I have recorded
up to four SD streams while watching a previously recorded program and
have zero logged errors related to drive performance.

My ext4 mount options for the DB partition are: noatime, commit=120,
barrier=1, data=ordered.

If you're worried about the potential for power failure to affect data
integrity, use a UPS.

Keith


More information about the mythtv-users mailing list