[mythtv-users] ramfs for mysql

Ian Clark mrrooster at gmail.com
Thu Dec 22 09:54:07 UTC 2011


On 21 December 2011 19:56, Dan Wilga
<mythtv-users2 at dwilga-linux1.amherst.edu> wrote:
> On 12/21/11 2:04 PM, Josu Lazkano wrote:
>> Hello all. I am having some playback problems on LiveTV
>> (mythpreviewgen). I try to change the recordings file system (XFS,
>> EXT3, EXT4...), but I got little stops.
>>
>> I read about to move the mysql files to ramfs, I have 3GB of memory
>> (2x2GB, 1GB for nvidia card).
>>
Just out of interest, is this a bios limitation, or are you using a
32bit system? If you BIOS supports mapping periferals above the 4GB
memory boundry and you have 4 gig of memory it may be worth moving to
a 64bit linux, so you can take full advantage of it.

>> Before start to break my system I want to know if this will help to
>> the playback problems. I have problem on program guide change watching
>> LiveTV.
>>
>> Anyone using ramfs for mysql? Any recomendation?
>>
> IMHO, if you have RAM to spare, it makes more sense to throw it at MySQL
> directly by tuning the parameters in mysql.conf.

This is good advice, you can probably make MySQL do most of the heavy
lifiting cache wise, without having to worry about data on volotile
storage. This is well worth running after the system's been up for a
few hours...

http://mysqltuner.com/

> Using ramfs or tmpfs,
> you have to worry about data loss during an unexpected reboot, unless
> you also do MySQL replication to non-volatile storage.
>
...which means you'll probably also be writing to a binary log file on
non volotile storage, which probably negates a lot of the advantages?

You also say you backup your database every 4 hours, do you run any of
the optimisation routines? It may just be your tables could do with a
spring clean?

Aside: If someone is going to do this, or has done this, do you move
the files onto a ramdisk, or do you rename a table and have a
startup/shutdown scripts that SELECT INTOs a ram backed table?

Cheers,

Ian


More information about the mythtv-users mailing list