Bug 14117 - Sync streaming can consume lots of memory when one player connection slow
: Sync streaming can consume lots of memory when one player connection slow
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Streaming From SlimServer
: 7.1
: All All
: P3 normal (vote)
: 7.6.0
Assigned To: Alan Young
: TinySC
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-18 06:36 UTC by Alan Young
Modified: 2012-01-31 23:31 UTC (History)
0 users

See Also:
Category: Bug


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Young 2009-09-18 06:36:43 UTC
The logic in Slim::Player::Source::nextChunk() can cause many chunks of data to be queued up in memory for one player if it is slow, or the network connection to it is slow, and a different synced player is achieveing fast throughput. The maximum is given by the sum of the (fast) player's decode buffer and the network pipeline which is bounded by the TCP window and the kernel TCP stacks on either end.

In the case of a SliMP3 in the mix, its small buffer and the user-space UDP protocol pretty-much guarantee that this situation will arise.
Comment 1 SVN Bot 2011-01-13 07:27:30 UTC
 == Auto-comment from SVN commit #31739 to the slim repo by ayoung ==
 == http://svn.slimdevices.com/slim?view=revision&revision=31739 ==

Fixed bug 14117: Sync streaming can consume lots of memory when one player connection slow 
Use a high-water-mark (10) and low-water-mark (3) to ensure that the number of outstanding chunks of audio data to different synced players cannot get too out of step. This avoids the problem of lots of audio data buffered in SbS memory.
It has the secondary advantage that bandwidth to all the clients in a sync-group will be shared more fairly, especially at track startup, which should lead to less chance of one client causing stuttering.
Comment 2 trautigan 2012-01-31 04:43:18 UTC
Whilst this particular problem may have been fixed it has introduced a problem with sync'd players trying to listen to the BBC iPlayer stream. 

Should a new bug be opened or is someone going to go back and fix it? I'm just a user who has found that what worked fine previously doesn't now. So I'd be happy with a workround that let me use the service as I did before.
Comment 3 Alan Young 2012-01-31 23:31:21 UTC
Please open a new bug and reference this one.