FAQ  •  Register  •  Login

Serviio Limiting bandwidth

<<

MikeL

Serviio lover

Posts: 59

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Thu Mar 26, 2015 1:13 am

Re: Serviio Limiting bandwidth

Dan

the only way that I know of to change the TCP settings is either netsh or download a program called TCPip Optimizer from speedguide.net.

netsh int tcp show global

will give you the current settings

netsh int tcp show heuristics

will give you your current settings for heuristics. The link I sent for the netsh options is a great place to start. netsh is one of the capabilities I was aware of but have not thought or needed it for ages so that site was a great reference.

I just had my son run a test on that .mpg file that wouldn't play before and it worked perfectly. Network resource monitor showed 12Mbs throughput which is the max my ISP supports (they advertise 10Mbs) - so I think I declare victory.
<<

MikeL

Serviio lover

Posts: 59

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Thu Mar 26, 2015 12:28 pm

Re: Serviio Limiting bandwidth

On post with test results - for test 2 after tweaks I saw only 90Mbs throughput which surprised me. Turns out I have a defective Ethernet cable that links 2 routers in my network. The Win 7 server and Win 8 systems are connected to 1 router and the second Win 7 system, that was a client in test 2, is on the other. So in that test the maximum throughput would have been 100Mbs and I was getting a little over 90Mbs so I'm happy.

Will be a while before I can replace that cable as it runs through my basement and up through a wall behind built in bookcases !
<<

snowflake7

User avatar

DLNA master

Posts: 120

Joined: Fri Nov 30, 2012 9:19 pm

Location: South Dakota USA

Post Thu Mar 26, 2015 5:28 pm

Re: Serviio Limiting bandwidth

Great work.

I had some issues during beta and worked through some cabling and NIC configuration issues and got it working, but I have siginificant bandwidth. Had forgotten completely the Win7/Server2003 builtin internet throttling. Hadn't had a need to do the netsh configuration in a long time.

I can stream full bluRay rips remotely without any stutter. (not that I would do that regularly!!!)

Zip with a little clean up this should be pinned to the support tab or included in the wiki.

Again thanks!
Sony XBR55X850A | Synology DS412+ DS214Play DS918+| QNAP TS-451 | Buffalo TS3400D | VM 6.5 ESXi | Server 2016, Server 2012 | Samsung Note 9
Samsung s9 | Samsung Tablets | Onkyo TX-NR656 | Sony BDP-S3700 | Multiple Harmony Hubs | Multiple Echo Devices | Firesticks | Toshiba FireTV | Sling/AirTV
Lutron Lighting and Honeywell Environmental Bridges | Amcrest 1080p Cameras
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Fri Mar 27, 2015 7:13 am

Re: Serviio Limiting bandwidth

Agreed - the wiki would be the better place though.

The wiki is a user knowledge base, so I would encourage you/MikeL to create an article for the wiki.
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.
<<

MikeL

Serviio lover

Posts: 59

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Fri Mar 27, 2015 12:19 pm

Re: Serviio Limiting bandwidth

I will do a write up next week. Want to give things a few days to make sure there are no detrimental effects of the changes.

Can anyone confirm that this fix works with Win 7 Ultimate, Professional and Enterprise - also any 32 bit versions?

Not sure why it wouldn't but I have no way of checking myself
<<

snowflake7

User avatar

DLNA master

Posts: 120

Joined: Fri Nov 30, 2012 9:19 pm

Location: South Dakota USA

Post Fri Mar 27, 2015 5:22 pm

Re: Serviio Limiting bandwidth

I can confirm that it works on Win 7 Pro (stand alone and running under VMware) and Ultimate stand alone.

Further research suggests that an appropriate number for the DefaultSend and DefaultReceive reg hack can be optimized using the formula as follows:

upload speed/8 *1024

No real explanation as to how this was derived so take it for what it is.

Not sure where you came up with the 131K number, but it worked fine for me. For what it's worth, Using the research formula my number would be 499200. Testing I don't see any appreciable difference between the two values.
Sony XBR55X850A | Synology DS412+ DS214Play DS918+| QNAP TS-451 | Buffalo TS3400D | VM 6.5 ESXi | Server 2016, Server 2012 | Samsung Note 9
Samsung s9 | Samsung Tablets | Onkyo TX-NR656 | Sony BDP-S3700 | Multiple Harmony Hubs | Multiple Echo Devices | Firesticks | Toshiba FireTV | Sling/AirTV
Lutron Lighting and Honeywell Environmental Bridges | Amcrest 1080p Cameras
<<

MikeL

Serviio lover

Posts: 59

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Sun Mar 29, 2015 9:18 pm

Re: Serviio Limiting bandwidth

After further thinking about this I would like it if someone on the Serviio team could check and let us know if the code in the 1.4.x version used to set the socket send buffer size and if the code was modified in 1.5.1 to use the default (8K). From what I understand the value that I have updated in the registry can be overwritten on a per socket basis by setting SO_SNDBUF. so if the code were modified in a future release we could lose the benefit of making this setting in the registry (depending on what vale it was set to in the code).

So could I ask that if the code is going to be changed to make the value user settable in one of the config files. This would also negate the need for any kind of write up.

As to why I chose 131072 bytes.

I didn't want to make the value too big since my guess is that being a default value the OS will attempt to allocate that much memory on every socket that is opened (unless the app opening it is setting SO_SNDBUF). This could become a problem in systems that have limited memory and lots of network activity.
In most home computers most of the emphasis is on receiving large amounts of data as opposed to sending it so there could be lots of wasted memory allocation. (Does this make sense? I'm not sure if it is a valid assumption).

Also the value chosen is going to be a compromise as its effect will vary depending on your posted upload speed from your ISP and the RTT to the remote system that is trying to stream from MB. There is also limited value in setting it to a high value if the receiving system limits its TCP receive window.

For example watching a Wireshark trace of the traffic between a local ipad streaming from my Win 7 server the receive window advertised by TCP on the ipad does not go much above 131072.

I've never tried using Wireshark before today. I made 2 traces of the TCP traffic. One with the modified registry and one without (local access only). And basically the behaviour without the registry mod showed the sending system (Win 7 server) limited to sending 2 4K segments before waiting for an ACK. The receiving system (ipad) doesn't send the ACK immediately on receipt of the second 4K packet since it has advertised a receive window of 64K so the ACK is delayed until there is some timeout threshold on the ipad. So the transmission of the data is being throttled.

By comparison the trace after the registry mod is made and the TCP connection has worked its way through the TCP slow start and has reached a steady state. You see a steady stream of data packets with interspersed ACKs from the client - all in all a much more efficient use of the "pipe".

If my calculations are correct a window of 128K (131072 bytes) in my home network with a 1ms delay (RTT) should utilize the 1Gb network

131072 *8/0.001 = 1048576000b/s

over a remote link with a 30ms RTT I would need an upload bandwidth of approx. 35Mb/s. Since I have a 3rd of that I am not utilizing the send buffer to its max. As I said its all a compromise.

Hope this makes sense and my calculations and assumptions are correct.

Would really appreciate some feedback from one of the Serviio guys (preferably the guy who is programming with the Winsock API).

Cheers
Mike
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17147

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Mar 30, 2015 7:00 pm

Re: Serviio Limiting bandwidth

We are now using a new library which doesn't allow setting the buffer out of the box, so yes, your theory is right. I will see if it can be easily added back.
<<

MikeL

Serviio lover

Posts: 59

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Mon Mar 30, 2015 9:56 pm

Re: Serviio Limiting bandwidth

Thanks Zip.

If it is to be added back then please consider making the value user settable in some way as the resultant behaviour is very dependant on a person's available upload bandwidth and the average RTT of any of their remote users.

Mike
<<

doctor_who12

User avatar

Serviio newbie

Posts: 9

Joined: Sat Sep 14, 2013 5:23 pm

Post Sat Apr 04, 2015 10:45 pm

Re: Serviio Limiting bandwidth

Great thanks for that! It now works perfectly. :D
<<

charlesmoore899

Serviio newbie

Posts: 5

Joined: Tue Nov 20, 2018 7:09 am

Post Thu Dec 05, 2019 11:45 am

Re: Serviio Limiting bandwidth

Since few days, my streaming speed was decreasing and I was unable to do torrenting. It means, my ISP is throttling my IP address. So, I bought a VPN because I read on this guide that by using a VPN you can defeat ISP throttling activities and enjoy fast internet speed. :)
<<

atc98092

User avatar

DLNA master

Posts: 4023

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Thu Dec 05, 2019 1:14 pm

Re: Serviio Limiting bandwidth

charlesmoore899 wrote:Since few days, my streaming speed was decreasing and I was unable to do torrenting. It means, my ISP is throttling my IP address. So, I bought a VPN because I read on this guide that by using a VPN you can defeat ISP throttling activities and enjoy fast internet speed. :)


This topic had nothing to do with Internet speeds. It's also too old to be applicable to the latest versions of both Serviio and Windows.
Dan

Samsung NU7100 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 8 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
Previous

Return to Serviio Support & Help

Who is online

Users browsing this forum: atc98092 and 10 guests

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