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

volspotconnect2 and caching #454

Open
fuerst opened this issue Jun 23, 2020 · 4 comments
Open

volspotconnect2 and caching #454

fuerst opened this issue Jun 23, 2020 · 4 comments

Comments

@fuerst
Copy link

fuerst commented Jun 23, 2020

What is the reason for disabling caching in /data/plugins/music_service/volspotconnect2/volspotify.toml? Is it because the cache size can not be limited?

I activated it anyway and caching seems to work. The files directory get's filled up with files as I play Spotify songs. Probably the cache needs to be moved to it's own size limited partition or volume so it will not fill up the whole SD card.

@ashthespy
Copy link
Contributor

Well, this is multifold:
-- There is indeed currently no measures in place to limit the size of the cache.
-- If cache is set to /tmp, then its on RAM, so a large cache would impact system performance at some point.
-- Directly writing onto the SD card is kept to a minimum to prevent SD card wear.

@balbuze
Copy link
Collaborator

balbuze commented Jun 25, 2020

In earlier version of the plugin, I had a cache handling with auto flush when a define size was reached. Maybe we can pull it from dust?
edit : balbuze@b0a2bbd#diff-5b9ed537612f83c3979f9b29076b6720

@fuerst
Copy link
Author

fuerst commented Jul 8, 2020

Thanks for your answers!

I think with durable SD cards like Samsung PRO Endurance available it would be okay to write directly to the SD card. Also using a big SD card rather than a small one would help because data will be written less often to the same cell.

So if you agree I think we need:

  1. Additional options in the UI which allows
  • activating caching
  • set the filesystem path for cache files with a default in the volumio user's home directory
  • set the cache size
  1. Use the script from b0a2bbd to monitor the cache size and remove oldest files if needed.

How does the the cleanup script get triggered - by using cron?

@balbuze
Copy link
Collaborator

balbuze commented Jul 8, 2020

It uses a system d timer as far I remember

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

No branches or pull requests

3 participants