Thank you for your donation!


MPD Input Cache - is it working?
#1
I've been playing with the MPD input cache feature simply because my RPi was cruising along with about 10% memory used and I thought I might as well make use of the spare capacity.  Reading the entry for the cache in the MPD User's Manual I would expect that when I hit play on a playlist, the whole list would be pre-fetched into memory, up to the limit of the cache size I selected.  The 2GB I have at hand would mean I could easily have entire albums loaded into memory.

If the cache is working as described by the MPD manual, I'd expect to see memory use jump a large amount at the start of playback, then remain constant as tracks play.  What I actually observe however is that the memory increments a small amount at the commencement of each track.  It looks for all the world as if tracks are still read from disc at the start of each track and loaded into the memory and then simply remain there after they have been played.  No 'pre-fetching' seems to be happening.  I can't see any benefit to this behaviour.

Do other folk observe the same as me?  Have I misunderstood what this is supposed to do?  Is the behaviour without the input cache actually reading the source file as continuous stream, meaning the cache is only really need to be just larger than the largest file one has?

This is purely a question for my own education, I don't have a problem that needs solving.  I just wish to understand better how this little player actually works.
Reply
#2
I think its still a WIP
https://github.com/MusicPlayerDaemon/MPD/pull/1047
Enjoy the Music!
moodeaudio.org | Twitter Feed | Git Repo
Reply
#3
@the_bertrum

I've never tried using this feature so these are just some random thoughts. 


-How are you enabling the input cache? Anything you write directly to /etc/mpd.conf will be overwritten by moOde. Did I miss a memo about the input cache setting being a developer option?

ETA - Oh, duh. What year is this?

-Wouldn't enabling a 1GB cache mean you'd expect to see 1GB more memory allocated to MPD than is the case without the cache? Otherwise the scheduler would have to be allocating/freeing blocks as tracks are loaded and played.

-(added 'cuz I just saw Tim's reply) Maybe a WIP but this option is in the official docs so I'd expect there to be some basic functionality present.

Regards,
Kent
Reply
#4
Did we not discuss this back in July 2020, it don't look like any thing has changed?

http://moodeaudio.org/forum/showthread.p...74&page=12
Reply
#5
(02-16-2021, 07:09 PM)kit1cat Wrote: Did we not discuss this back in July 2020, it don't look like any thing has changed?

http://moodeaudio.org/forum/showthread.p...74&page=12

And I thought it was just my short-term memory that is shot Sad
Reply
#6
I remember the talk back in July. I thought that since it is now exposed as an option in the moOde configuration screens that perhaps it was better implemented (by MPD) or understood (by moOde) now and that I was interpreting things incorrectly.

If it is still as it was then, which it would seem to be, I think I'll ignore the feature for now. It saves a little when one repeats a track or playlist, but does not appear to offer any benefit beyond that.
Reply


Forum Jump: