Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Sound Tweak Rpi4
(07-24-2020, 06:15 PM)kit1cat Wrote: How do I turn the cache off?

How did you turn it on ?

Using Tim's command (has to be set after each boot) http://moodeaudio.org/forum/showthread.p...9#pid22699


Or Kent's  (permanent) http://moodeaudio.org/forum/showthread.p...7#pid22767

If Tim's then just restart.  (Caching does not happen unless you rerun the commands each boot)
If Kent's then remove the additions and restart.
----------
bob
Reply
(07-24-2020, 06:38 PM)DRONE7 Wrote:
(07-24-2020, 06:15 PM)kit1cat Wrote: How do I turn the cache off?

How did you turn it on ?

Using Tim's command (has to be set after each boot) http://moodeaudio.org/forum/showthread.p...9#pid22699


Or Kent's  (permanent)  http://moodeaudio.org/forum/showthread.p...7#pid22767

If Tim's then just restart.  (Caching does not happen unless you rerun the commands each boot)
If Kent's then remove the additions and restart.

Thanks, will give it ago in the morning.

Just tried another quick test,

Base memory 18%
Added 4 tracks 19%
play track 1 26%
play track 2 28%
play track 3 32%
play track 4 47%

play tracks 1,2,3 & 4 again 47%

add track 5 47%
play track 5 54%

memory usage seems to increase in line with the length of the track, track 4 is 24 minutes.
Reply
That all looks as it should. With a large playlist, once you reach the cache limit then tracks are removed from the first added onward as needed.

Then track 1 would show an increase in cache if it was replayed as it was removed by the caching management and needs to be re-added but any tracks currently cached won't change the cache size if they're replayed.

Interestingly, if you remove a number of recent tracks from the MoOde playlist in the UI this does not reduce the cached memory size...:-)
Mpd must still have them in cache ?
----------
bob
Reply
To purge the cache send MPD a SIGHUP signal.

sudo kill -s SIGHUP `pidof mpd`
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
Is there a link to MPD 0.22~git download? I can only find mpd-0.21.25 download. Is that it? Thanks.
Reply
(07-25-2020, 12:30 AM)hifinet Wrote: Is there a link to MPD 0.22~git download? I can only find mpd-0.21.25 download. Is that it? Thanks.

Up to the point that the first mpd-0.22.0 is released, you'll find that any build of the current repo will be identified as mpd-0.22~git (and further identified by the last git commit hash for the source code downloaded.

Regards,
Kent
Reply
MPD 0.22~git is compiled from the MPD repo branch named Master
https://github.com/MusicPlayerDaemon/MPD

You can see how many commits have been made to the Master branch since the tagged release by viewing the tag
https://github.com/MusicPlayerDaemon/MPD...g/v0.21.25

The most recent MPD 0.22~git that was included in moOde was in the 6.6.0 release and it was from the sources at commit 4d88bddfe223776d893f86beb33e62994acc848e.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
(07-24-2020, 06:09 PM)DRONE7 Wrote: Cache vs buffers ?
Turn cache off and restart then monitor memory use...does it increase by the audio buffer size as a track begins to play ?  (I'm guessing as I've not tried this and I am away from the Pi)
My tests have been with a playlist of 70+ tracks.  Cache grows slowly until track 63 where the large tracks (mentioned in my last post) load and then jumps accordingly.

I'm not sure that entering tracks to the playlist one by one is a valid test ? In your example no change after adding the second track seems correct as there was only one existing track so nothing to cache once the first lone track started playing.

bob

Quick test with cache off

Base memory 19%
Added 4 tracks 19%
play track 1 20%
play track 2 20%
play track 3 20%
play track 4 20%

play tracks 1,2,3 & 4 again 20%

add track 5 20%
play track 5 20%

No extra memory usage with cache off.
Reply
(07-24-2020, 06:47 PM)kit1cat Wrote:
(07-24-2020, 06:38 PM)DRONE7 Wrote:
(07-24-2020, 06:15 PM)kit1cat Wrote: How do I turn the cache off?

How did you turn it on ?

Using Tim's command (has to be set after each boot) http://moodeaudio.org/forum/showthread.p...9#pid22699


Or Kent's  (permanent)  http://moodeaudio.org/forum/showthread.p...7#pid22767

If Tim's then just restart.  (Caching does not happen unless you rerun the commands each boot)
If Kent's then remove the additions and restart.

Thanks, will give it ago in the morning.

Just tried another quick test,

Base memory 18%
Added 4 tracks 19%
play track 1 26%
play track 2 28%
play track 3 32%
play track 4 47%

play tracks 1,2,3 & 4 again 47%

add track 5 47%
play track 5 54%

memory usage seems to increase in line with the length of the track, track 4 is 24 minutes.

I'm not sure I understand this, is memory usage considered a bad thing?  I have always been under the impression that unused RAM was wasted RAM as loading from RAM is faster than from HD or SD card?
As long as other processes are not starved of RAM & RAM is released allowing future tracks to cache, what is the problem?
I have not tried any of these cache settings being discussed, but if I saw my RAM usage at 90% I wouldn't be concerned.
Reply
(07-25-2020, 09:46 AM)grasshopper Wrote: I'm not sure I understand this, is memory usage considered a bad thing?  I have always been under the impression that unused RAM was wasted RAM as loading from RAM is faster than from HD or SD card?
As long as other processes are not starved of RAM & RAM is released allowing future tracks to cache, what is the problem?
I have not tried any of these cache settings being discussed, but if I saw my RAM usage at 90% I wouldn't be concerned.

In general, the memory use isn't an issue you are right, but what it seems to be used for here is to keep data that has already been played for no benefit whatever. I was expecting that the cache would be used to preload data that has yet to be played so that when it came time to decode the data it would be already in memory. This would have conferred a (slight) benefit. So the way this cache seems to have been implemented simply uses up memory for no good reason.

I've completed a few tests that leave me satisfied that the behaviour is the same from SDCARD as it is from NAS. I've gone back to the default version of MPD now since I can't make productive use of all that idle memory I have.
----------------
Robert
Reply


Forum Jump: