Kodi Community Forum

Full Version: Bandwidth usage when streaming from remote site with OpenVPN
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Dear all,
Does anyone know how I can configure xbmc to use more bandwidth than around 15-17Mbps when I stream 1080p mkv files from my remote file server? I want that xbmc should use all available bandwidth (100Mbps, tested and verified that I can transfer at that speed).

So my setup is like this;
Site#1: 250/100Mbps connection
Site#2: 250/50Mbps connection
I've got a fileserver on my Site#1 and a site-to-site OpenVPN connection between Site#1 and Site#2. On Site#2 I've configured xbmc's advancesettings.xml like this (because Site#2 is the remote site):
<network>
<buffermode>1</buffermode>
<cachemembuffersize>0</cachemembuffersize>
<readbufferfactor>5</readbufferfactor>
</network>

I've played around a lot with readbufferfactor, but that doesn't do any difference at all. I can also start xbmc on two different clients and stream 1080p, then the bandwidth usage goes up to around 30-35Mbps. So there's also a proof that there's available bandwidth on the OpenVPN tunnel. I've also tried to use buffermode = 0 and 3.

So, what I want is that the buffer would fill upp faster because there's apparently a lot more bandwidth available than just 15-17Mbps. The playback isn't really any issue - just that I want xbmc to fill upp the buffer faster.

I use XBMC Gotham 13.2 RC1 on OSX Mavericks.

Thanks in advance!
Change readbufferfactor to some huge number like 100. It won't hurt anything and will simply try to use as much bandwidth as possible.
(2014-08-09, 03:00)Ned Scott Wrote: [ -> ]Change readbufferfactor to some huge number like 100. It won't hurt anything and will simply try to use as much bandwidth as possible.

Thank you for your reply!
Believe me, I've tried to change the value up to 5K, and it doesn't make difference at all. I even tried to change it with a decimal value. Even Frodo behaves the same way as Gotham.

I forgot to mention - I'm using Samba as the transfer protocol. Also, everything is connected with ethernet. I really don't like wireless except for mobile devices.
Is that all you have in advancedsettings.xml. the whole thing needs <advancedsettings></advancedsettings> tags around it.
(2014-08-09, 21:44)nickr Wrote: [ -> ]Is that all you have in advancedsettings.xml. the whole thing needs <advancedsettings></advancedsettings> tags around it.

Thanks Nickr for your reply!

Yes, I do have some more in my advancesettings.xml. My settings for MySQL library and the network stuff I posted. So, yes I do have those tags in the beginning and the end, like this:
<advancedsettings>
MySQL stuff....
<network>
Those setting I posted...
</network>
</advancedsettings>

I've tried one thing today... I installed XBMC on a virtual Win7 in my Site#2. And with the exact same settings, it made a bandwidth around 35Mbps. So is there maybe something wrong with the OSX version?
Any XBMC developer that could explain why XBMC won't use all avalible bandwidth? And if it's configurable?
I've discovered one thing... When I use the XBMC's build in SMB client, buffering goes very slow - but if I mount the drive in OSX and play the exact same files from the exact same share, only that I play it from the mounted volume, buffering bandwidth goes up to 100Mbit+ by instant.

So the developer maybe should take a look at their build in SMB client?
I am wondering if it really matters? yes it'd be nice to know why it doesn't work as it should, but if you are not getting playback pauses, is it of any more than academic interest?
(2014-08-11, 02:03)nickr Wrote: [ -> ]I am wondering if it really matters? yes it'd be nice to know why it doesn't work as it should, but if you are not getting playback pauses, is it of any more than academic interest?

Well, for some large videos, ~16-17Mbps isn't enough. I tried a 3D movie today, and the buffering couldn't keep up.

So I was thinking about automatically mount the SMB share into OSX, and then use path subs. That could be a way around the issue.

I agree with you that it would be nice to know why it doesn't work. But it should also be fixed - don't you think? I can supply with whatever information that could help fixing this problem.
This works for me. If I set the readbufferfactor to a large number then XBMC loads the data as fast as it can. I don't know why it isn't working for you, though. The only other thing I can think of is that maybe the bandwidth limiter is on in XBMC -> Settings -> System -> Internet access
(2014-08-11, 02:36)Walle85 Wrote: [ -> ]
(2014-08-11, 02:03)nickr Wrote: [ -> ]I am wondering if it really matters? yes it'd be nice to know why it doesn't work as it should, but if you are not getting playback pauses, is it of any more than academic interest?

Well, for some large videos, ~16-17Mbps isn't enough. I tried a 3D movie today, and the buffering couldn't keep up.

So I was thinking about automatically mount the SMB share into OSX, and then use path subs. That could be a way around the issue.

I agree with you that it would be nice to know why it doesn't work. But it should also be fixed - don't you think? I can supply with whatever information that could help fixing this problem.

Yes it should be investigated.

Yes it should annoy you if it is actually affecting playback!

Ned, are you on OSX?
Yes
(2014-08-11, 04:43)Ned Scott Wrote: [ -> ]This works for me. If I set the readbufferfactor to a large number then XBMC loads the data as fast as it can. I don't know why it isn't working for you, though. The only other thing I can think of is that maybe the bandwidth limiter is on in XBMC -> Settings -> System -> Internet access

Very strange! Have you also got buffermode = 1? How do you monitor bandwidth usage?

Yeah, I've tried to change that too. But it didn't change anything in a positive matter.

I could supply with some screenshots if you want? Just let me know if I could supply with anything. But what I think is that maybe the issue should be concentrated around the difference between playing files from a mounted volume (appearing as a local volume to XBMC) and XBMC's SMB client. Don't you think?
The difference between kernel space (osx mounts) und user space (libsmbclient in xbmc) maybe? Though i have no idea why this would lead to such drastical slow down on such a powerfull cpu. No clue really.

Can you try to increase the MTU setting of your VPN device?
So, I've gotten around the issue now, by mounting the network share into OSX and using path substitution like this:
<advancedsettings>
..........
<pathsubstitution>
<substitute>
<from>smb://MY_SERVER/SHARE/</from>
<to>/Volumes/SHARE/</to>
</substitute>
</pathsubstitution>
........
</advancedsettings>

One thing to notice in OSX (and I think in Linux to), is that make note to uppercase and lowercase characters. So for me SMB:// didn't work, but smb:// did the trick.

(2014-08-11, 12:54)Memphiz Wrote: [ -> ]The difference between kernel space (osx mounts) und user space (libsmbclient in xbmc) maybe? Though i have no idea why this would lead to such drastical slow down on such a powerfull cpu. No clue really.

Can you try to increase the MTU setting of your VPN device?

Yes, there must be something in the difference how XBMC handle those protocols. But that's what I think, and I'm not a developer - I'm a pure network guy.

Do you think that MTU could make a difference in a positive matter? I'm thinking that all my other SMB client seems to handle throughput very well. I uses OSX and Ubuntu, and both are working flawlessly - but XBMC don't.
Pages: 1 2