Project

General

Profile

DVR: Cache scheme: Different modes

Added by Raymond Paulsen over 10 years ago

HI

iam looking into the dvr of the tvheadend server. i see there are some new settings there rearding cache scheme:

unknown
system
do not keep
sync
sync + do not keep

what is the difference is this modes?


Replies (2)

RE: DVR: Cache scheme: Different modes - Added by Adam Sutton over 10 years ago

Raymond,

Bit of background, in case you were not familiar...

In Linux whenever you access (read/write) data to the filesystems it gets cached in the file cache (in memory). This means that for files your accessing regularly the access is quick and also when writing there is typically a disconnect between the request from the app and the actual write to disk (meaning stuff doesn't block so much, but of course this can lead to corruption in a power failure scenario, but that's not too relevant).

The options that have been added here control exactly how this caching is done:

unknown - place holder meaning config not properly set
system - do nothing, just leave it to the system to do as it normally would
do not keep - tell the OS that you're not expecting to re-use the data, so don't keep in the file cache (doesn't affect buffering of writes)
sync - require that the data is written to the disk before the write() operation returns (doesn't affect caching for future access)
sync + dnk - combination of the last two.

Generally speaking most people should stick to "system". The options have really been added for special cases, "sync" could be used I guess if you're particularly paranoid about loss of data (due to delayed write). "dnk" is userful for RAM limited systems (like the rpi), given most people don't watch what they're recording until much later (so no point wasting RAM caching it here and now).

Adam

RE: DVR: Cache scheme: Different modes - Added by Raymond Paulsen over 10 years ago

Thanks.. good description.

    (1-2/2)