[mythtv-users] Realtime commflagging....was: How many simultaneous recordings on one drive?

Brian J. Murrell brian at interlinx.bc.ca
Thu Sep 29 03:38:11 UTC 2011

On 11-09-28 11:29 PM, David Whyte wrote:
> Is this really how realtime commflagging works?

Effectively, if commflagging can keep up.

> If the data is being
> processed as it is received, I am assuming you mean the data is read
> off the tuner, buffered somewhere in memory and the commflagger
> processes it then writes it to disk.

Not in so many words.  The data is read from the card and written to the
disk through the VFS.  The VFS includes a page cache though that stores
frequently and recently read and written pages.

So, as long as the commflagger can keep up pace enough that the pages
don't get flushed out of the page cache before it wants to read them
from disk, when the commflagger reads the pages from disk, they actually
come from the page cache, eliminating the physical disk I/O.

> This raises two questions:
> 1) What if the commflagger can't keep up?

Well, there is nothing for it really to need to keep up to except the
page cache flushing out the recent pages, but only to keep disk I/O to a
minimum.  If it falls behind and pages are cached, they will end up
coming back from disk, incurring more disk I/O.

> How big is the buffer?

As you can see there is no (i.e. dedicated) buffer.  As for how big is
the page cache?  It's as big as you have unused memory.  The more memory
you have the longer those pages should stay in the cache.

> 2) What if the commfalgger 'crashes', would the data never get stored to disk.

Not relevant.

> I am pretty sure that realtime commflagging is just another job that
> is started at the same time as the recording starts (assuming there is
> a spare job slot) but if I am wrong, could someone confirm?

Yes, it is.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://www.mythtv.org/pipermail/mythtv-users/attachments/20110928/5a77d6ac/attachment.bin 

More information about the mythtv-users mailing list