[mythtv-users] SSD disk for DB

Yeechang Lee ylee at pobox.com
Mon Oct 8 19:53:40 UTC 2012


Ronald Frazier <ron at ronfrazier.net> says:
> The only thing I found to be causing significant wear were the mysql
> temporary tables created by the myth scheduler running several times
> an hour. I solved this my moving /tmp to memory, but other's said it
> could just as well be solved by configuring mysql to put temp tables
> in memory by altering some settings in my.cnf

Be careful with this. I found that mysql would sometimes create
temporary files of up to 3.5GB in size when running certain functions,
such as if a SQL statement in Custom Edit is accidentally made too
broad[1] or the "Time" search from Schedule Recordings. As my systems
do not have more than 2GB of RAM, I had to move away from mounting
/tmp in memory in /etc/fstab with tmpfs to back to disk.

[1] An example is

    program.title = ('Family Guy') OR program.title = ('The Simpsons')

If the above is incorrectly written as

    program.title = ('Family Guy' OR 'The Simpsons')

mythbackend essentially writes its entire scheduling data to disk as
it searches through it. mythfrontend itself has a 10,000-line limit on
search returns (<URL:http://code.mythtv.org/trac/ticket/4626>), which
is more than sufficient for any sane query but not in this case.


More information about the mythtv-users mailing list