[mythtv-users] Howto prevent MythTV flushing/Syncing disk writes (LiveTV/Recordings) [ SOLVED ]

Albert Graham agraham at g-b.net
Thu Mar 20 11:46:53 UTC 2008


Allan Stirling wrote:
> Albert Graham wrote:
>   
>> When reviewing the source I could see why things are done the way they 
>> are, 
>>     
>
> You appear to be missing one reason.
>
> When a slave backend is NFS mounted, as far as I understand
> it, a recording won't appear on the server (and thus other
> frontends) until it's synced.
>
> This means that mounted (non-streaming) live TV would not
> work very well, which as far as I can tell was the original
> intent of this piece of code.
>
> Cheers,
>
> Allan.
>   
Hi Allan,

This a good point, in my case I only have 1 master backend and 1 
frontend (ATM) however, a slave backend would write it's files via 
normal NFS on the master backend and not via the master backend's 
"ThreadedFileWriter" function, in other words the slave backend, so my 
"patch" would only be enabled on the master backend where the actual 
disk writes occur, i.e. it would not apply to slaves.

I assume you're referring to these notes:

/** \fn ThreadedFileWriter::Sync(void)
 *  \brief flush data written to the file descriptor to disk.
 *
 *   NOTE: This doesn't even try flush our queue of data.
 *   This only ensures that data which has already been sent
 *   to the kernel for this file is written to disk. This
 *   means that if this backend is writing the data over a
 *   network filesystem like NFS, then the data will be visible
 *   to the NFS server after this is called. It is also useful
 *   in preventing the kernel from buffering up so many writes
 *   that they steal the CPU for a long time when the write
 *   to disk actually occurs.
 */

So would should not confuse the term "writing" with "syncing" ?

Albert.




More information about the mythtv-users mailing list