rustdesk / rustdesk-server

RustDesk Server Program
https://rustdesk.com/server
GNU Affero General Public License v3.0
6.46k stars 1.35k forks source link

connection bandwidth #104

Open wh0am111 opened 2 years ago

wh0am111 commented 2 years ago

how to set connection bandwidth

image

rustdesk commented 2 years ago

env var

paspo commented 2 years ago

we should probably document these ENV vars in the readme

rustdesk commented 2 years ago

ENV

yes

wh0am111 commented 2 years ago

we should probably document these ENV vars in the readme

how to set, I can not find the env in the README.

what I can see just these

image

can you find to me? thanks

paspo commented 2 years ago
variable description
LIMIT_SPEED speed limit (in Mb/s)
TOTAL_BANDWIDTH max total bandwidth (in Mb/s)
SINGLE_BANDWIDTH max bandwidth for a single connection (in Mb/s)
paspo commented 2 years ago

https://github.com/rustdesk/rustdesk-server/pull/112

wh0am111 commented 2 years ago

variable description LIMIT_SPEED speed limit (in Mb/s) TOTAL_BANDWIDTH max total bandwidth (in Mb/s) SINGLE_BANDWIDTH max bandwidth for a single connection (in Mb/s)

thank you so much

altiummm commented 1 year ago

variable description LIMIT_SPEED speed limit (in Mb/s) TOTAL_BANDWIDTH max total bandwidth (in Mb/s) SINGLE_BANDWIDTH max bandwidth for a single connection (in Mb/s)

thank you so much

hi, how do i set up speed limit settings on my server? I don't use docker

drex96 commented 1 year ago

variable description LIMIT_SPEED speed limit (in Mb/s) TOTAL_BANDWIDTH max total bandwidth (in Mb/s) SINGLE_BANDWIDTH max bandwidth for a single connection (in Mb/s)

how can we set these up on windows (nssm) ?

paspo commented 1 year ago

how can we set these up on windows (nssm) ?

https://nssm.cc/usage

Look at the "Environment" tab

wxlg1117 commented 1 year ago

@paspo What is the difference between LIMIT_SPEED and SINGLE_BANDWIDTH?

jannoke commented 1 year ago

Does limiting work only on server side and is not configurable on client side?

paspo commented 1 year ago

No software has control over what it is receiving on the input side. You can control the output (and this, sometimes, can have an influence on the input), because you can choose which data to transmit before, or you can add delays to achieve a bandwidth limit.

You have the option to use some iptables magic to delay incoming packets, but this is risky: these packets are already received and if delayed, they must be buffered somewhere (in kernel space) and any buffer can be filled, causing packet loss or worse.

jannoke commented 1 year ago

I was thinking more of the sender side - I just started to use it and set up the server, but I can see that quality could be better and bandwidth is quite low per client. Even with direct connetion in lan. So I was thinking if there are some env or other configurable limits/defaults on client side (sender) or that this is just the max quality rustdesk is designed to give out.

ylluminate commented 1 year ago

So there's something unclear about this situation: When using RustDesk with a server in the mix, does all traffic pass through the server or is it only used to set up a P2P connection?

I had expected and hoped that it would be used to negotiate P2P connections, but from this discussion it seems as if it is strangely going to require all data to pass through the server...

And if this is in fact the case, then we need some kind of a method to report transfer / data usage on the main RustDesk software that is doing management so we can observe monthly usage levels readily in order to know if we might need to do something about server / hosting company limitations...

bagherfathi commented 1 year ago

hi @ylluminate as mentioned in rust desk documents here https://github.com/rustdesk/rustdesk/wiki/How-does-RustDesk-work%3F , rustdesk desk tries for a p2p connection if it is possible UDP hole punching on client address gathered by rendezvous. if it's not possible use a relay server and pass all traffic from server

ludos1978 commented 1 year ago

for anybody who does want to change this on windows, this does seem to make the change:

Edit: Add Name for Value in Registry

dinger1986 commented 1 year ago

Do you want to add that to the docs? Or point me where you think it should be added and I'll add it

ludos1978 commented 1 year ago

if somebody could confirm it, i think it generates higher troughputs with values (LIMIT_SPEED=64, SINGLE_BANDWIDTH=256). But confirmation from somebody else would be great. It then would make sense to add it to the docs.

dimejo commented 4 months ago

@paspo and @rustdesk: Can you please explain what LIMIT_SPEED is used for? The description (speed limit) isn't really useful. Why is the default for LIMIT_SPEED so much lower than the default for SINGLE_BANDWIDTH? Is one used for video bandwidth and the other for file transfers?

paspo commented 4 months ago

@dimejo pelase refer to this discussion

dimejo commented 4 months ago

@dimejo pelase refer to https://github.com/rustdesk/rustdesk-server/discussions/371

Oh, didn't look into discussions. Thank you for the fast reply and special thanks for working on this!