Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching #443

Open
christianreiss opened this issue Oct 14, 2016 · 1 comment
Open

Caching #443

christianreiss opened this issue Oct 14, 2016 · 1 comment
Labels

Comments

@christianreiss
Copy link

Hey folks,

Two suggestions, one topic: Caching.
I am using my CloudDrive (Amazon) as a store-backend for my linxu based sat receiver. The box records shows and rsyncs them in the night to the clouddrive. This works like a charm. During normal "Playback" the box connects via cifs to a server that has the clouddrive mounted with acd_cli's help.

The little box reads in 5 files per show (1 big data file, 4 metadata and information) so tons of small files. It would be awesome if...

  • The entirety of the clouddrives files (filenames, paths) could be locally caches in acd_cli.
  • An option to cache all files (data) that are smaller than X to a local directory.

I tried using a rsync --exclude $bigfiles and doing an unionfs (which worked great) but deleting a show only deletes the files in the local cache dir.

Think you could whack such features in?
-Chris.

@yadayada yadayada added the FUSE label Oct 15, 2016
@bgemmill
Copy link

@chrisidefix On your topic of caching, that's actually what the nodes.db in your ~/.cache folder contains after a sync. Are you seeing performance related issues querying it? I know there are a few PRs in that aim to improve that.

On the topic of data caching, that came up in discussion in my PR #374 , and it looks like the most straightforward way to do it would be to add a new table in nodes.db mapping node_id -> binary blob, and on a read with matching node_id, open up a WriteBuffer marked as non-dirty with the contents so it didn't upload again on close.

I'd be happy to look at patches there; I think the trick would be to cull this in some LRU fashion since lots of small files could overwhelm the local drive too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants