rustdesk-server icon indicating copy to clipboard operation
rustdesk-server copied to clipboard

connection bandwidth

Open wh0am111 opened this issue 1 year ago • 22 comments

how to set connection bandwidth

image

wh0am111 avatar Sep 02 '22 00:09 wh0am111

env var

rustdesk avatar Sep 02 '22 10:09 rustdesk

we should probably document these ENV vars in the readme

paspo avatar Sep 02 '22 10:09 paspo

ENV

yes

rustdesk avatar Sep 02 '22 10:09 rustdesk

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

wh0am111 avatar Sep 05 '22 06:09 wh0am111

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 avatar Sep 05 '22 15:09 paspo

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

paspo avatar Sep 05 '22 18:09 paspo

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

wh0am111 avatar Sep 06 '22 01:09 wh0am111

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

altiummm avatar Oct 16 '22 17:10 altiummm

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) ?

drex96 avatar Nov 01 '22 08:11 drex96

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

https://nssm.cc/usage

Look at the "Environment" tab

paspo avatar Nov 01 '22 12:11 paspo

@paspo What is the difference between LIMIT_SPEED and SINGLE_BANDWIDTH?

wxlg1117 avatar Jan 09 '23 01:01 wxlg1117

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

jannoke avatar Feb 26 '23 12:02 jannoke

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.

paspo avatar Feb 27 '23 07:02 paspo

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.

jannoke avatar Feb 27 '23 07:02 jannoke

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...

ylluminate avatar May 24 '23 16:05 ylluminate

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

bagherfathi avatar Jun 03 '23 05:06 bagherfathi

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

  • open regedit
  • goto HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RustDesk
  • Add a Value with Multiline Characters (REG_MULTI_SZ)
    • name it: Environment
  • Add these values (you will get a warning that empty characters are removed), change the numbers according to your speed LIMIT_SPEED=4 TOTAL_BANDWIDTH=1024 SINGLE_BANDWIDTH=16
  • Restart the computer

Edit: Add Name for Value in Registry

ludos1978 avatar Jul 22 '23 17:07 ludos1978

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

dinger1986 avatar Jul 22 '23 18:07 dinger1986

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.

ludos1978 avatar Jul 23 '23 08:07 ludos1978

@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?

dimejo avatar May 02 '24 20:05 dimejo

@dimejo pelase refer to this discussion

paspo avatar May 03 '24 13:05 paspo

@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!

dimejo avatar May 04 '24 09:05 dimejo