FAQ  •  Register  •  Login

Set reasonable TOS bits for streaming

<<

stephendhill

Serviio lover

Posts: 72

Joined: Sat Jan 30, 2010 9:59 am

Location: UK

Post Sun Feb 16, 2014 9:21 pm

Set reasonable TOS bits for streaming

The Linux default packet scheduler (http://linux-ip.net/articles/Traffic-Co ... pfifo_fast) can prioritize packets if the application sets the packet header appropriately. Java has this ability using setTrafficClass() function. It would seem a good idea for the streaming socket to be set to IPTOS_THROUGHPUT.
Avid Serviio user
Pure Flow One | Samsung LE40B650 | Samsung UE40F6320 | Sony PS3 | Ubuntu 14.04
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Feb 16, 2014 11:39 pm

Re: Set reasonable TOS bits for streaming

Done, let's see if there is a difference.
<<

stephendhill

Serviio lover

Posts: 72

Joined: Sat Jan 30, 2010 9:59 am

Location: UK

Post Mon Feb 17, 2014 3:01 pm

Re: Set reasonable TOS bits for streaming

P.S. Effectively this should make streaming more reliable when the Serviio Linux machine is sending other lower priority traffic at the same time; if there is no other traffic then the result will be the same. I am unsure whether OS-X or Win32 supports this function (or whether it actually does anything on those operating systems).
Avid Serviio user
Pure Flow One | Samsung LE40B650 | Samsung UE40F6320 | Sony PS3 | Ubuntu 14.04
<<

stephendhill

Serviio lover

Posts: 72

Joined: Sat Jan 30, 2010 9:59 am

Location: UK

Post Sun Feb 23, 2014 1:31 pm

Re: Set reasonable TOS bits for streaming

Ah, I believe I have given you the wrong define; after reading http://lartc.org/howto/lartc.qdisc.classless.html, it looks like IPTOS_THROUGHPUT has the lowest priority. IPTOS_RELIABILITY (band 1) is probably the most reasonable setting for Serviio.
pfifo_fast has 3 bands starting from zero, where zero is the highest priority which is reserved for things like gaming (lowest latency).
Avid Serviio user
Pure Flow One | Samsung LE40B650 | Samsung UE40F6320 | Sony PS3 | Ubuntu 14.04
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Feb 24, 2014 1:17 pm

Re: Set reasonable TOS bits for streaming

I hink you can set a compination of many, so I set RELIABILITY for the UPnP multicast traffic and THROUGHPUT / LATENCY for streaming. Let's see how it pans out.
<<

stephendhill

Serviio lover

Posts: 72

Joined: Sat Jan 30, 2010 9:59 am

Location: UK

Post Mon Feb 24, 2014 4:06 pm

Re: Set reasonable TOS bits for streaming

Yes, you are correct, you can set multiple bits. For THROUGHPUT + MIN LATENCY, you should get band 1, and those bits do sound correct for streaming too.
Avid Serviio user
Pure Flow One | Samsung LE40B650 | Samsung UE40F6320 | Sony PS3 | Ubuntu 14.04
<<

stephendhill

Serviio lover

Posts: 72

Joined: Sat Jan 30, 2010 9:59 am

Location: UK

Post Wed Mar 12, 2014 12:56 pm

Re: Set reasonable TOS bits for streaming

Does Serviio v1.4.1 have this change?
Avid Serviio user
Pure Flow One | Samsung LE40B650 | Samsung UE40F6320 | Sony PS3 | Ubuntu 14.04
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Mar 12, 2014 1:16 pm

Re: Set reasonable TOS bits for streaming

yes
<<

stephendhill

Serviio lover

Posts: 72

Joined: Sat Jan 30, 2010 9:59 am

Location: UK

Post Fri Mar 14, 2014 12:37 pm

Re: Set reasonable TOS bits for streaming

Using MediaMonkey as a DLNA client and using Wireshark to sniff the packets, I can see TOS 0x18 (low delay / high throughput) used for HTTP (UPnP Serviio) traffic. So looks like it's working!
Avid Serviio user
Pure Flow One | Samsung LE40B650 | Samsung UE40F6320 | Sony PS3 | Ubuntu 14.04
<<

npuser

DLNA master

Posts: 172

Joined: Mon Feb 06, 2012 3:44 am

Location: Michigan

Post Fri Mar 14, 2014 1:12 pm

Re: Set reasonable TOS bits for streaming

This needs to be closely monitored because it has big consequence in a home network. Serviio traffics could overrun important like VoIP packets causing VoIP calls to crackle during a serviio streaming.

Also, I see this could cause an issue during serviio online streaming or transcoding a media which resides in a network NAS( media located local to the serviio server may not run into this as they don't go to serviio transcoding engine via network). This setting seemed to send serviio traffics as a high priority from the serviio server to renders but same setting does not have any effect on media packets serviio receiving (online streams or media located in a network device to serviio server) for streaming, which could cause choppy or stop-go streaming experience.

Online or NAS located medias [normal priority] -> Serviio -> renders [high priority ] [Problem: Serviio sending to renders is a high priority but not so with serviio receiving]


note: I do not have a proof but just a thought.

Npuser
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Mar 14, 2014 4:57 pm

Re: Set reasonable TOS bits for streaming

I agree. We can start with this: viewtopic.php?f=5&t=16171
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Fri Mar 14, 2014 9:47 pm

Re: Set reasonable TOS bits for streaming

Would it be easy to include a Serviio property switch to disable this feature? This would enable testing if TOS changes are causing any issue.

<edit> Maybe this as well: viewtopic.php?f=20&t=9216&view=unread#p88947
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Mar 17, 2014 6:48 pm

Re: Set reasonable TOS bits for streaming

I've added serviio.useNetworkTOS system property for 1.4.1.1 (false by default), so that we can have some time to test this in anger, before turning on for everyone
<<

stephendhill

Serviio lover

Posts: 72

Joined: Sat Jan 30, 2010 9:59 am

Location: UK

Post Thu Mar 20, 2014 9:24 pm

Re: Set reasonable TOS bits for streaming

npuser wrote:This needs to be closely monitored because it has big consequence in a home network. Serviio traffics could overrun important like VoIP packets causing VoIP calls to crackle during a serviio streaming.

Note that VOIP packets should be using the highest priority TOS bits, whereas Serviio is using a priority below this.
Avid Serviio user
Pure Flow One | Samsung LE40B650 | Samsung UE40F6320 | Sony PS3 | Ubuntu 14.04

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 38 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.