FAQ  •  Register  •  Login

Serviio Limiting bandwidth

<<

doctor_who12

User avatar

Serviio newbie

Posts: 9

Joined: Sat Sep 14, 2013 5:23 pm

Post Mon Mar 09, 2015 12:29 pm

Serviio Limiting bandwidth

Hi
My Serviio server is limiting the bandwidth while using the mediabrowser to about 2Mbps. I know its not the computer/internet connection as I can FTP to the server and it works at about 10Mbps. Does anyone have any ideas why? I've tried reinstalling and everything is on default settings. I get the same problem when its on original, medium and low quality.
Thanks in advance!
<<

atc98092

User avatar

DLNA master

Posts: 4150

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Mon Mar 09, 2015 5:32 pm

Re: Serviio Limiting bandwidth

Are you referring to a connection from inside your network, or from outside connecting from somewhere on the Internet? If outside, what does www.speedtest.net say you have for an outgoing speed connection? Remember that most home Internet connections don't have the same speed in and out.
Dan

LG NANO85 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
<<

doctor_who12

User avatar

Serviio newbie

Posts: 9

Joined: Sat Sep 14, 2013 5:23 pm

Post Tue Mar 10, 2015 4:16 pm

Re: Serviio Limiting bandwidth

Thanks for the reply; I am connecting from outside my home network, I have fiber broadband and thus have much higher speeds than it is giving - Download 73Mb/s and Upload 14Mb/s (http://www.speedtest.net/result/4203218575.png ). As I stated earlier, I can achieve this upload speed when accessing files via FTP from my server.
<<

atc98092

User avatar

DLNA master

Posts: 4150

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Tue Mar 10, 2015 11:49 pm

Re: Serviio Limiting bandwidth

Excellent, just needed to ask.

14 Mbps is certainly sufficient for anything but HD, as long as your ISP isn't throttling your speed based on content. And changing the display from original to medium or slow has helped me in the past. Guess we need to wait for Zip to weigh in on this.

Oh, I should ask: does it do the same thing if you use MediaBrowser from inside your network? If there are no issues from inside your firewall, then I strongly suspect your ISP is doing something.
Dan

LG NANO85 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
<<

doctor_who12

User avatar

Serviio newbie

Posts: 9

Joined: Sat Sep 14, 2013 5:23 pm

Post Wed Mar 11, 2015 11:07 am

Re: Serviio Limiting bandwidth

When I am home tomorrow night I will try from inside my network. I have tried streaming it from the mediabrowser on the server itself and that is fine. I wouldn't have thought my ISP should limit me as I have never had any problems in the past and am on the highest unlimited package they offer.
I have port forwarded it all in both the server and router firewall so that shouldn't be an issue. Quality of Service is also turned off in the router, so I cant think of any other settings to change in it (FYI I use TomatoUSB router firmware).
<<

doctor_who12

User avatar

Serviio newbie

Posts: 9

Joined: Sat Sep 14, 2013 5:23 pm

Post Sun Mar 15, 2015 7:58 pm

Re: Serviio Limiting bandwidth

I have tested it in my home network and it does stream properly. My ISP should not be limiting it though - is there anything in the program or something else other than the ISP that could be causing it?
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Sun Mar 15, 2015 10:29 pm

Re: Serviio Limiting bandwidth

Nothing in the program afaik. From memory the Tomato firmware offers the ability to throttle bandwidth based on port or application, or per user/pc??? You may want to check that this is not on accidentally, but other than that, it's a real head scratcher.... But my money's still on the router.
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.
<<

doctor_who12

User avatar

Serviio newbie

Posts: 9

Joined: Sat Sep 14, 2013 5:23 pm

Post Sun Mar 15, 2015 11:11 pm

Re: Serviio Limiting bandwidth

hmmm, I have no Quality of Service set and nothing else would throttle the bandwidth, I shall try resetting it when I'm back for the holls! Thanks for your help! :)
<<

MikeL

Serviio lover

Posts: 60

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Thu Mar 19, 2015 4:32 pm

Re: Serviio Limiting bandwidth

Thought I would jump in here as I am experiencing a similar problem since updating to Serviio Pro v 1.5.1
The problem is exacerbated even more when trying to access the server through a VPN especially if the client is an IOS device.

The scenario is as follows:

1. Ipad is connected to a VPN. Running a speed test from the ipad I get a download speed of approx. 60Mbs and upload 11 Mbs.
2. Connect to Mediabrowser and attempt to stream a video and it just sits there. The temp .ts files it is streaming are about 5 - 6MB each. Looking at the debug log I see that the requests for the .ts segments are roughly 2 minutes apart. If I let it sit for long enough to download about 6 segments it will actually start to play but naturally will stop again before the next segment has downloaded. Observing the network throughput with the Resource Manager on the PC that is hosting MediaBrowser I see that I am getting an almost constant 350kbs throughput - so the problem is definitely network related.

My guess is that the MTU size on the iPad is dropped to 1400 when it is connected to the VPN (at least that is what happens on a Windows PC) but the server's (PC) MTU size is still set to 1500. This would result in fragmentation of the packets being sent from the server to the client (iPad) - wouldn't it? Would that fragmentation be responsible for such a drop in network throughput?

If I connect an iPad to the Media Browser on the home local network the Resource Manager on the server shows 5Mbs throughput and everything works great.

When the MB is transferring a .ts file what size buffers is it passing down to the TCP level? Is that configurable so I can try setting it at a level to prevent fragmenting at the network level?

Thanks
Mike
<<

MikeL

Serviio lover

Posts: 60

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Fri Mar 20, 2015 3:45 am

Re: Serviio Limiting bandwidth

I ran 8 additional sets of test with the VPN out of the picture:

1. Streamed a source .mpg video file to my iPad from MediaBbrowser across my home network. Serviio /ffmpeg transcoded file to .ts segments and I assume uses HTTP Live Streaming as a transport protocol. There was a noticeable delay in starting ~ 1 minutes but then it ran smoothly. Resource monitor on the PC (Win 7 64 bit) running MB showed an almost steady 5Mbs throughput ( I would have expected higher).

2. Streamed a source .mp4 file to my iPad. This was streamed in native format so I assumed uses HTTP Live Streaming using byte ranges since no .m3u8 or .ts segment files are created. Started up almost immediately and ran smoothly. Again the Resource monitor showed a steady 5Mbs throughput.

3. Streamed same .mpg file to another local PC running Win 7 and using IE 11. Started up a little quicker than test 1 and ran OK. Resource monitor showed the same 5Mbs throughput. Source file was transcoded and a .stf temp file created. What streaming transport protocol is used to an FLV player?

4. Streamed same .mp4 file to the PC. Behaved about the same as test 3 and again the Resource monitor showed 5Mbs throughput.


The next 2 tests were run from my son's home network 500 miles away. Before running them we ran a ping test from his network to mine and rtt was approx. 35ms. Ping from me to him had an rtt of approx. 50 ms. He ran an ookla speed test and was getting approx. 50Mbs download and 72 Mbs upload. ( I know that upload speed sounds high but that's what he gets with his Verizon FIOS service - his download speed is usually around 75Mbs too). The ookla speed test from my computer showed a 94Mbs download and a 12 Mbs upload).

5. Had my son stream same .mpg file used in test 1 to his ipad about 500 miles away. It was a couple of minutes before he had anything start to play but it only played for a matter of seconds before pausing again, wait then a few seconds of play and so on. Resource Monitor on my PC showed an almost steady 2Mbs throughput. (.ts segment files are approx. 5 - 6 MB).

6. Streamed .mp4 file - seemed more responsive on startup and ran smoothly. Resource monitor on my PC showed 2Mbs throughput.

7 & 8 repeated tests 5 and 6 from a Mac Book Pro. In both cases start up was faster and ran OK. Since the Mac was using a Flash plugin in Safari it was streaming a transcoded file from a .stf. I assume using the same transport protocol as test 3 ( is it RTMP?). In both tests the resource monitor showed the same 2 Mbs throughput.

So it would seem that the network throughput for all 3 scenarios (VPN, local and remote-non-VPN) had the same throughput regardless of the streaming protocol being used. Since 3 different types of devices were used as clients (ipads, Mac, PC) it would seem that the issue is on the sending side.

My network router does not have any QOS enabled and I can get much better network throughput from my PC that hosts MediaBrowser so my gut tells me that it has to be something in the way MB is using the TCP layer. The fact that we had no streaming issues for these same types of files to my son's house prior to upgrading from 1.4.x (don't remember what x was, sorry) and the only thing that changed was upgrading to 1.5.1 adds to this assumption.

Any ideas?

Thanks
Mike
<<

doctor_who12

User avatar

Serviio newbie

Posts: 9

Joined: Sat Sep 14, 2013 5:23 pm

Post Sat Mar 21, 2015 10:34 pm

Re: Serviio Limiting bandwidth

Thanks for sharing that - nice to know I'm not the only one! Hopefully we find out what the problem is now. :D
<<

MikeL

Serviio lover

Posts: 60

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Sat Mar 21, 2015 11:10 pm

Re: Serviio Limiting bandwidth

Doctor Who 12 - welcome back from your hols. When did you go to ? :)

I spent more time trying to get to the bottom of this and in my case have narrowed it down to only being an issue on Windows 7 systems (I only have Home Premium so cant speak to any other versions). My computer is up to date with all the latest patches.

Today I installed Serviio on another computer running Windows 8.1 and everything works perfectly. Watching network traffic on the resource monitor looks exactly what you would expect (short bursts of high throughput as the files or file fragments depending on protocol).

By 8.1 system is connected to my network by Ethernet and my 7 system is wireless, so I spent time reconfiguring the 7 system for Ethernet but it made no difference at all. I even disconnected the cable from the 8.1 system and plugged it into the Ethernet port of the 7 system so that all the home networking details were the same - but to no avail.

I then started digging deeper into the network and TCP settings of both systems looking for differences and tweaking the 7 system to see if I could get it to improve - but nothing.

I thought it was my 7 computer at fault so I installed serviio on my wife's computer which is also running Windows 7 (she doesn't know yet) and would you believe the problem is there on her system too. So it definitely points to a Win 7 issue and it doesn't matter if you are using wireless or Ethernet so it would appear to be a TCP stack issue.

I've tried disabling every startup program I can and stopping every window service until the system is a bare bones as I can make it but the problem still persists.

I also tried a variety of speed tests other than Ookla. I found one called NDT from measurementlab.net which from its description uses a single stream socket for its test which I think is more indicative of the way serviio works (can anyone confirm that?). Ookla enables multiple streams so gives an overly optimistic throughput number. Anyway, this tool on the Win 8 system gave an upload speed of about 10Mbs but on the Win 7 system it was consistently around half of that (and that was true on both Win 7 systems). Again something fishy going on with Win 7 I believe.

I've run out of things to try - would appreciate some ideas from others. I don't have much hair left .

Mike
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Sat Mar 21, 2015 11:36 pm

Re: Serviio Limiting bandwidth

Have you tried resetting your winsock and ip settings. See http://www.speedguide.net/faq/how-to-re ... -tcpip-272 - is for vista but commands will work on win7. Long shot I know, but a start.
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: 60

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Sun Mar 22, 2015 4:33 am

Re: Serviio Limiting bandwidth

Thanks DennyAll but I already tried that with no luck. Have also played around with various TCP global settings inclusing turning on ctcp, turning off heuristics, enabling then disabling chimney offload etc. Haven't hit on a combination that does anything yet.

Do you know how to look at buffer sizes, number of transmit buffers.

It has the feeling of something working half duplex instead of full duplex - but I don't know how to check that.

Mike
<<

atc98092

User avatar

DLNA master

Posts: 4150

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sun Mar 22, 2015 10:13 pm

Re: Serviio Limiting bandwidth

Very strange that Windows 7 had a problem but 8 didn't. Both of my Serviio machines are on Win 7 with no issues. My network is wired gigabit.
Dan

LG NANO85 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
<<

MikeL

Serviio lover

Posts: 60

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Sun Mar 22, 2015 11:01 pm

Re: Serviio Limiting bandwidth

atc98092

I have absolutely no problem streaming within my home network it is remote access that exhibits problems. The upload speed from my ISP is supposed to be 10Mbs which if I could drive the link at even half that speed would be more than adequate. It seems that the maximum I can get a single TCP stream to push data on a remote link is around 5 - 6Mbs as evidenced from the speed tests. However when monitoring the network throughput when MB, running on a Win 7 system, is streaming a file out to a remote client it seems to cap out at around 2Mbs which is not adequate to support streaming in some cases. The same version of MB running on a Win 8.1 system streams at a higher rate.

Can you please run a test for me on your machine and set up a client (preferably ios ipad - but any will do) that accesses one of your serviio machines remotely. Try streaming a HD file and turn on the resource monitor on the machine running MB. Select the network Tab and under Processes with Network Activity select ServiioService.exe and ServiioConsole.exe this will make the Network Activity panel filter on those 2 programs. Let me know the green indicator showing throughput behaves and what the filtered Network throughput on the upper graph looks like (it will show up as an orange line superimposed on the overall throughput which is green).

The green indicator on my system stays round about 2Mbs for the duration of the stream, and the network graph shows that it is streaming continually but not fast enough for the client to be able to play the video smoothly.

Would just like someone else confirm the behaviour so I don't think I'm crazy.

Thanks
Mike
<<

atc98092

User avatar

DLNA master

Posts: 4150

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Mon Mar 23, 2015 12:47 pm

Re: Serviio Limiting bandwidth

Mike,

Understand now. Remember that a 10 Mbps connection in real life will provide between 6-7 Mbps speed. There's network overhead in there.

I have a 5 Mbps upload speed, and yes I have used MediaPlayer from outside my network. The last time I traveled the hotel connection was pathetic, and my air card wasn't much better. I could watch an SD movie but that was about it. My air card has been replaced with a Mi-Fi that I have tested (4G) at 15 Mpbs download, so my next trip I'm sure I'll be able to watch anything I want from home.

However, at what quality will I be able to stream HD? That will be the question. with my connection speed, I don't expect to be able to stream HD at full resolution.

I have an iPad 2 with 3G, and I am connected to my server right now with Safari. I'm trying to start an HD video, but it's pathetically slow on 3G. Looks like it's not a good test right now, as the iPad appears to be downloading and updating some apps. I'll try later.
Dan

LG NANO85 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
<<

doctor_who12

User avatar

Serviio newbie

Posts: 9

Joined: Sat Sep 14, 2013 5:23 pm

Post Mon Mar 23, 2015 2:44 pm

Re: Serviio Limiting bandwidth

Hi - I meant when I'm back for the holls - so when I get home from uni at Easter. :lol:

I am using Windows 7, and my old server was running windows server and didn't have a problem, so it does seem to be a problem with windows 7 - I'm using Home Premium on it too.
I did manage to install a virtual machine on for XP to test but that also had the same problem, but that will have been going through windows 7 too - I can reinstall windows 7 as i only have remote desktop connection from here.

I will try windows 8 at the weekend and see what happens!
<<

MikeL

Serviio lover

Posts: 60

Joined: Sat Feb 08, 2014 5:43 pm

Location: New Hampshire

Post Wed Mar 25, 2015 11:00 pm

Re: Serviio Limiting bandwidth

Well, after numerous attempts at tweaking TCP parameters I think I have found a solution.

I had narrowed down the problem to TCP send on the Windows 7 system hosting MediaBrowser. Keeping tests just on my home network and limited to Windows I was seeing the following numbers when streaming a large .mpg file.

Connectivity was: Win 7 client 1Gb Ethernet
Win 7 server wireless AC - 650Mb (this system was also used as Win 7 client for test 1 below)
Win 8 client/server

1. Win 7 client (wireless) streaming file from Win 8 Server (MediaBrowser) - I was seeing 230 Mbs on the network resource monitor.
2. Win 7 client (Ethernet) streaming same file from Win 7 server (MB) (Wireless) - I was only seeing 25Mbs throughput
3. Win 8 client (Ethernet) streaming same file from Win 7 server (wireless) - also seeing 25Mbs throughput.

After tweaks I was getting for the same tests.

1. 284 Mbs
2. 90 Mbs
3. 90 Mbs

I think tests 2 and 3 are now receiver constrained because if I ran test 1 using the Ethernet connected Win 7 system I could still only achieve 90 Mbs. Plus I had done no tweaking of TCP settings on that system.
I did find that if I turned on TCP heuristics on the Win 8 system that the throughput for test 3 went up to 175 Mbs - but then I found I was having some other issues so disabled it again. It's possible that further tweaking may improve things.

Let me tell you what I did:

1. On the Win 7 system I set the Global TCP settings to:

RSS: Enabled
Chimney Offload State : automatic
NetDMA State : disabled
DCA : enabled
Receive Window Auto-Tuning level : normal
Add on Congestion control : none (people recommend enabling ctcp but I found no difference)
ECN : disabled
Timestamps : disabled

I tried lots of combinations of these and other settings but alone they did nothing to improve upload time. I finally found a posting that suggested the following .

2. I increased the size of the TCP send and receive buffer in Windows registry (restart is required): I could find no documentation specific to these settings for Win 7 except for one posting so I thought I'd try it and it worked.

[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \Afd \Parameters]
DefaultReceiveWindow = 131072
DefaultSendWindow = 131072

When I first went to the Afd\Parameters section of the registry the 2 keys were not there - just an entry for default (value not set). So I had to create the entries by right mouse click in the right hand window (where the default entry is) click on New DWord 32bit value and assigning the name DefaultReceiveWindow (no spaces) then right click on the new entry and select modify press the decimal button and enter the number 131072 and hit OK. Repeat for send window and just exit the registry editor. Changes are made to the registry and will take effect after the next reboot.

If you do this please make sure you backup the registry before making any changes.

Initially I only set the send window but then my previous download numbers on speedtests which were always great dropped dramatically. I also found that setting the windows to the same value gave me the best performance. I may play around with these numbers some more. I only used numbers that were a multiple of 64K (65536) sine that is the default TCP send window at the winsock level API.

I also found that I needed to make sure TCP heuristics were turned on. You can do this my using the netsh command from and elevated command prompt:

netsh int tcp set heuristics wsh=enabled

If needed you can also make changes to the global settings above using the appropriate netsh command.

Here is a link to a good primer on netsh if you are not familiar with it:

http://www.colorconsole.de/cmd/en/Windows_7/netsh.htm

Here is a link that gives a write up on AFD its old and pre Win 7 but you get the idea.

http://smallvoid.com/article/winnt-winsock-buffer.html

Here is a link to the post I found that gave me the solution:

http://stackoverflow.com/questions/1069 ... ut-linux-i

I'll try and have my son rerun the tests remotely and see if he notices any improvement. From previous posts he couldn't get the .mpg file to stream so it should be an interesting test.

Sorry for being long winded. If anyone tries this and gets better results with different numbers and settings please let me know.

Regards
Mike
Last edited by MikeL on Thu Mar 26, 2015 12:21 pm, edited 1 time in total.
<<

atc98092

User avatar

DLNA master

Posts: 4150

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Thu Mar 26, 2015 12:55 am

Re: Serviio Limiting bandwidth

Mike, great writeup. I consider myself quite computer savvy, but I have no idea where you are finding "default TCP settings". I've checked my NIC properties, and while there are many settings there, nothing matches what you have there. Are they only available via netsh?

I have no fear of editing the Registry, so I'll try the window size settings. Have played very little with netsh, so more learning there as well.

Thanks!

Dan
Dan

LG NANO85 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
Next

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 30 guests

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