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

SRT server-to-client performance #2636

Open
xmaslo opened this issue Jan 27, 2023 · 7 comments
Open

SRT server-to-client performance #2636

xmaslo opened this issue Jan 27, 2023 · 7 comments
Labels
Type: Question Questions or things that require clarification

Comments

@xmaslo
Copy link

xmaslo commented Jan 27, 2023

I'm sending the same file from the server to client and vice versa. In the local network, I have no problems, the server-to-client performance is as expected (around 100 MiB/s). However, over the internet, the server-to-client performance is drastically worse than the client-to-server-performance.

SERVER-TO-CLIENT
client: ./srt-file-transmit srt://[HOST]:[PORT] file:///path/to/file
server: ./srt-file-transmit file:///path/to/file srt://:[PORT]?mode=listener

CLIENT-TO-SERVER
client: ./srt-file-transmit file:///path/to/file srt://[HOST]:[PORT]
server: ./srt-file-transmit srt://:[PORT]?mode=listener file:///path/to/file

In the server --> client scenario, my speed is peaking at around 200KiB/s.
On the other hand, in the client --> server scenario, I can get easily to around 30MiB/s.

I tried UDP on the same port, both ways are approximately the same (30 MiB/s).

What could be the issue in the *server-to-client scenario? I do not expect there is a problem with the network since UDP works just fine. Is this some sort of a bug? The issue is same both for the srt-file-transmit as well as when calling the API directly.

@xmaslo xmaslo added the Type: Question Questions or things that require clarification label Jan 27, 2023
@santomet
Copy link

santomet commented Feb 8, 2023

Bump, I also experience this problem in FILE/MESSAGE mode. Is there any possible explanation?

@ethouris
Copy link
Collaborator

ethouris commented Feb 8, 2023

First question: do you transmit in both configuration over the exactly same network path in the same direction?

And, if you could repeat this test - this time using srt-test-file (it works mostly the same way, but it's using blocking mode by default; requires --enable-testing when compiling), I would be also appreciated.

@maxsharabayko
Copy link
Collaborator

I would suggest trying to enable FileCC-related logs (e.g. changing HLOGC to LOGC and maybe log level) and analyze where it is stuck.

SRT stats (-statsout <filename> command-line option) can also be used to check CWND and flow window size. CSV file can be fed to SRT stats plotting for visualization.

@xmaslo
Copy link
Author

xmaslo commented Feb 22, 2023

First question: do you transmit in both configuration over the exactly same network path in the same direction?

And, if you could repeat this test - this time using srt-test-file (it works mostly the same way, but it's using blocking mode by default; requires --enable-testing when compiling), I would be also appreciated.

First question:
Only one side has a public ip and so I always connect in the same direction (thus I believe the network path is the same in both configurations).

As far as the second suggestion goes, I tried it and result is the same.

@xmaslo
Copy link
Author

xmaslo commented Feb 22, 2023

I would suggest trying to enable FileCC-related logs (e.g. changing HLOGC to LOGC and maybe log level) and analyze where it is stuck.

SRT stats (-statsout <filename> command-line option) can also be used to check CWND and flow window size. CSV file can be fed to SRT stats plotting for visualization.

I used the ENABLE_HEAVY_LOGGING flag and behavior is different. It starts with about 3 MiB/s and quickly crashes (which is much faster than 200KiB/s, but without HEAVY_LOGGING enabled, applications do not crush).

I run the statistics and these were the results:
Server-to-client (server is the sender):

server-to-client(server).csv
server-to-client(client).csv

Client-to-server (client is the sender):
client-to-server(server).csv
client-to-server(client).csv

There are noticable differences mostly in bandwidth and congestion window.

Visuals:

server-to-client(server):

server-to-client-1(server)
server-to-client-2(server)

server-to-client(client):

server-to-client-1(client)
server-to-client-2(client)

client-to-server(server):

client-to-server-1(server)
client-to-server-2(server)

client-to-server(client):

client-to-server-1(client)
client-to-server-2(client)

@ethouris
Copy link
Collaborator

ethouris commented Mar 3, 2023

It just hit my head.

Are you using IPv4 or IPv6?

Because we have detected a small problem here - see #2663

@xmaslo
Copy link
Author

xmaslo commented Mar 11, 2023

It just hit my head.

Are you using IPv4 or IPv6?

Because we have detected a small problem here - see #2663

We are using IPv4, so this should not be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Questions or things that require clarification
Projects
None yet
Development

No branches or pull requests

4 participants