Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transfer speeds in higher latency networks #13

Open
pjokinen opened this issue Jan 3, 2024 · 2 comments
Open

Transfer speeds in higher latency networks #13

pjokinen opened this issue Jan 3, 2024 · 2 comments

Comments

@pjokinen
Copy link

pjokinen commented Jan 3, 2024

Hi!

I have been using MythTV via the Kodi plugin from local network and remote locations (with VPN connections) and I'd like to share my observations about transfer speeds in higher latency networks. For the most part, MythTV and the plugin have been working great, but live tv and recordings have been unusable in certain networks due to constant buffering. Recording stream bitrates are about 10 Mbps and network speeds are about 100 Mbps, so the network speed should not be the issue.

After finally looking into this issue, I found out that part of the problem stems from the small transfer buffers used in this library. The problematic networks are the ones with higher latency, so small buffers are limiting transfer speeds quite badly. I patched the Kodi MythTV plugin to use larger receive buffer and it fixed the issue. I have not observed any negative effects from this change.

I also modified livetvdemo into small test program to test and demonstrate the issue. Using it, I obtained following results:

Local network over WIFI (~3ms latency, ~120Mbps transfer speed)

default receive buffer (~64k):

[SPEED-TEST] transferred 47141000 bytes in 8.37 seconds (44.02 Mbps)

256k receive buffer:

[SPEED-TEST] transferred 47141000 bytes in 3.59 seconds (102.58 Mbps)

Remote network over VPN (~25ms latency, 100Mbps transfer speed)

default receive buffer (~64k):

[SPEED-TEST] transferred 47141000 bytes in 51.34 seconds (7.17 Mbps)

256k receive buffer:

[SPEED-TEST] transferred 47141000 bytes in 15.07 seconds (24.44 Mbps)

It appears that buffers bigger than 256k do not increase transfer speeds any further in these networks. For some reason, speed over VPN connection is still quite far from network speed, but with this modification the Kodi plugin is now usable in all locations.

bigger-buffer.patch.txt
speed-test.cpp.txt

@janbar
Copy link
Owner

janbar commented Jan 4, 2024

Hi, thanks for testing and report this. So yes it is an enhancement. As soon as possible I will include your patch.

@pjokinen
Copy link
Author

pjokinen commented Jan 5, 2024

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants