MPD Buffering on BDP-1

0 Members and 1 Guest are viewing this topic. Read 1467 times.

Krutsch

  • Full Member
  • Posts: 568
MPD Buffering on BDP-1
« on: 16 Mar 2017, 09:27 pm »
I've been encountering some stuttering issues at the very beginning of audio tracks that are large (i.e. 192/24).

I host my library on a pair of Corsair GTX flash/thumb drives that test quite well, speed-wise, from the command shell on the BDP-1:

time dd if=/dev/zero of=/media/MUSIC-256/test_file bs=8192 count=331541

331541+0 records in
331541+0 records out
2715983872 bytes (2.7 GB) copied, 195.432 s, 13.9 MB/s

After some trial and error, I discovered that I could completely eliminate any stuttering by slightly bumping up MPD's default setting for playback buffering.

I did this as follows:

1. Mount BDP-1’s USER share via SMB
2. Edit: MPDCONF.SET
3. Add: buffer_before_play;20%
4. Reboot BDP-1

This will add the line below to /etc/mpd.conf to increase playback buffering which seems to remove stuttering at the beginning of 192/24 tracks (this was universal across all of my larger, high-res tracks). Playing back an album would be smooth, but tapping on a specific track would result in a stutter at the very start of the track.

buffer_before_play   "20%"

Would be super-cool if this setting was available in the Manic Moose MPD configuration page, along with the ability to toggle REPLAY_GAIN playback.

CanadianMaestro

  • Restricted
  • Posts: 1760
  • Skepticism is the engine of progress
    • Hearing Everything That Nothing Can Measure
Re: MPD Buffering on BDP-1
« Reply #1 on: 17 Mar 2017, 12:30 am »
How long's your playlist? I generally find that if my list is very long (say > 300), I get stalls and have to reboot, occasionally. Not often.

Did this 192/24 issue just crop up? Do you see it happen with 96/88?


unincognito

  • Industry Participant
  • Posts: 2067
    • bryston.com
Re: MPD Buffering on BDP-1
« Reply #2 on: 17 Mar 2017, 12:51 am »
Granted I havn't tested that feature since loony loon days but I recall MPD's seek feature would become unstable.  This is why the mpdconf.set and mpd.append files exist. 

Also I don't feel /dev/zero can give an accurate read of the bandwidth available, granted your options on a BDP-1 are limited.  I would dd as much of /lib/live/medium/mount/live/filesystem.squashfs (I might have medium and mount backwards) into a file in /dev/shm and repeat using what you did but with the portion of filesystem.squashfs that you copied.

Cheers
Chris

Krutsch

  • Full Member
  • Posts: 568
Re: MPD Buffering on BDP-1
« Reply #3 on: 17 Mar 2017, 03:28 pm »
How long's your playlist? I generally find that if my list is very long (say > 300), I get stalls and have to reboot, occasionally. Not often.

Did this 192/24 issue just crop up? Do you see it happen with 96/88?

In my tests the playback queue only contained a single album. Again, it didn't matter which album - only the sample rate / bit-depth.

This issue has been relatively recent, but not sure which version started this behavior.

This was ONLY happening with 192/24 tracks - 88.2, 96 and 44.1/48 tracks were just fine.

Since making this change, I've not heard a single stutter (played a lot of music last night) and the change in start-up delay was very minor, so I'm leaving this change in place.

Krutsch

  • Full Member
  • Posts: 568
Re: MPD Buffering on BDP-1
« Reply #4 on: 17 Mar 2017, 03:32 pm »
Granted I havn't tested that feature since loony loon days but I recall MPD's seek feature would become unstable.  This is why the mpdconf.set and mpd.append files exist. 

Also I don't feel /dev/zero can give an accurate read of the bandwidth available, granted your options on a BDP-1 are limited. I would dd as much of /lib/live/medium/mount/live/filesystem.squashfs (I might have medium and mount backwards) into a file in /dev/shm and repeat using what you did but with the portion of filesystem.squashfs that you copied.

Cheers
Chris

Fair enough. Here's the same thumb drive tested with Manic Moose "Bench" feature:

Benchmark Results
14.1MB/s

...number is actually a little higher than what dd reports.

As for seeking, I did quite a bit of that last night, re-listening to guitar riffs on a 192/24 album. No issues on my system with seek and playback.

CanadianMaestro

  • Restricted
  • Posts: 1760
  • Skepticism is the engine of progress
    • Hearing Everything That Nothing Can Measure
Re: MPD Buffering on BDP-1
« Reply #5 on: 17 Mar 2017, 10:14 pm »

Since making this change, I've not heard a single stutter (played a lot of music last night) and the change in start-up delay was very minor, so I'm leaving this change in place.

Glad it's all good now.  :thumb:

Krutsch

  • Full Member
  • Posts: 568
Re: MPD Buffering on BDP-1
« Reply #6 on: 21 Apr 2017, 01:56 pm »
I've been encountering some stuttering issues at the very beginning of audio tracks that are large (i.e. 192/24).

...

buffer_before_play   "20%"


UPDATE: with the latest BETA release, S2.33 2017-04-07, I am now experiencing stuttering at the end of a track, presumably from when MPD is trying to load the next track in advance of playback.

So, I tried some different values and changed from 20% to 15%. Now I can reliably play 192/24 gapless tracks w/o stuttering at the beginning or end.

This drive is pretty fast even in USB 2.0 Hi-Speed mode, but it's not as fast as my Samsung EVO 1TB. I may need to consider going back to that drive if I still have problems.

Probably time to consider upgrading the BDP-1 to something with USB 3.0 and/or GigE ports and enough RAM to not be running at 98.5% utilization all of the time...