[mythtv-users] Mythfilldatabase taking FOREVER

Gary Buhrmaster gary.buhrmaster at gmail.com
Wed Jun 15 16:41:56 UTC 2022

On Tue, Jun 14, 2022 at 8:49 PM Larry Kennedy <lunchtimelarry at gmail.com> wrote:

> Peter, I looked into this, thinking it might be slow I/O.  I ran a test using dd to copy to a file on the same filesystem as mysql.
> sudo dd if=/dev/zero of=/var/lib/test.img bs=1G count=1 oflag=dsync
> I got ~36MB/sec which is about right for spinning disks.  I've not noticed any disk thrashing.

While that sequential write number is useful
for HDD benchmarking, that does not test
a HDD in a way that a database server typically
uses the underlying file system, which tends
to be smaller random blocks for which the
performance is limited to the HDD seek
and rotational delay times, and can result
in numbers more in the range of one block
every 16ms or so if they are all synchronous
(the HDD, if allowed, will typically buffer I/O,
but synchronous forced writes are going to
be slow).

Ideally one has enough ram to keep most
of the active indexes and data in cache
to avoid most HDD read delays.  Database
tuning can help there and is a place to
look first.

More information about the mythtv-users mailing list