01-07-2023, 06:05 PM
I get the impression from the MPD documentation (https://mpd.readthedocs.io/en/stable/use...nput-cache) that a primary motivation for the input cache was to overcome delays imposed by slow hard drives.
I never bothered to read the C++ source code in MPD/src/input/cache in the MusicPlayerDaemon github repo, brrrr.
Regards,
Kent
Quote:The input cache prefetches queued song files before they are going to be played. This has several advantages:
- risk of buffer underruns during playback is reduced because this decouples playback from disk (or network) I/O
- bulk transfers may be faster and more energy efficient than loading small chunks on-the-fly
This comes at a cost:
- by prefetching several songs at a time, the hard disk can spin down for longer periods of time
- memory usage
- bulk transfers may reduce the performance of other applications which also want to access the disk (if the kernel’s I/O scheduler isn’t doing its job properly)
I never bothered to read the C++ source code in MPD/src/input/cache in the MusicPlayerDaemon github repo, brrrr.
Regards,
Kent