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

Network Throttle #644

Open
ghost opened this issue Dec 24, 2017 · 9 comments
Open

Network Throttle #644

ghost opened this issue Dec 24, 2017 · 9 comments
Labels
P3 Low priority
Milestone

Comments

@ghost
Copy link

ghost commented Dec 24, 2017

I am recreating some issue from original @irungentoo repository.
It was recommend to post it here because it is most actual repository for toxcore.

So issue irungentoo#1581

There should be a variable that clients can set that affects the amount of network traffic. All packets that are sent every x seconds should depend on this variable in some way (not necessarily in the same way). This should help (mobile) clients restrict/allow the network usage depending on availability of data usage.

And copy of my own comments:

Is it possible to limit such traffic?
Specify some rate or similar things.
I think it is too much packets per second for chat.

Approximately it sends/receives 600 packets per minute per one instance.
Maybe it is possible to install own server and communicate with the world through that server and each node will have the same DHT traffic obtained from such server?

I think for now my meta traffic is much greater than my payload.
And such big traffic will be a problem for mobile devices.

@tox-user
Copy link
Member

My knowledge of how toxcore works is very limited, but I think this behaviour is required to receive status updates from your friends. To be able to see who is online, see their current name and status. And to receive friend requests.

@ghost
Copy link
Author

ghost commented Dec 25, 2017

Are status updates not P2P traffic? All mentioned packets are from/to random IPs (not related to my contacts).

@tox-user
Copy link
Member

Connections to your friends are made directly to them (https://tox.chat/faq.html#tox-leak-ip), so status updates should be peer-to-peer. In that case I don't know what's causing that traffic.

@tox-user
Copy link
Member

What version of toxcore are you using?

@ghost
Copy link

ghost commented Dec 25, 2017

The traffic is then likely to be dht lookups ... searching for clients... like hey do you know where "xyz" is...nope but try "abc". This the penalty for not having a central server to look up who is where (on the internet that is). A good intro to DHT might help http://engineering.bittorrent.com/2013/01/22/bittorrent-tech-talks-dht/

@ghost
Copy link

ghost commented Dec 25, 2017

The check neighbour status is just a simple packet to that neighbour so I think it is lookups taking place. Perhapps the way forward is for mobile clients to only respond to lookups matching them selves ie a lookup for "xyz"...yeah thats me and ofcourse announcements for actual contacts we have a full address for and not no but try here. Leave all that for full clients. That should minimise traffic at mobile end points. Any thoughts on this?

@ghost
Copy link
Author

ghost commented Dec 25, 2017

@dingosan

I also think it is DHT (check my original post).
But as you can see throttling of DHT (if it is doable) is requested by some users and it is very appreciated by me. It can be some sort of ratio/factor/weight of node...
Also I suggested another option for networks - dedicated server for DHT.
Let's say you have 100 desktops inside local network... it is much better to have some external node which will handle DHT for whole this group. I prefer to setup VPS and connect tox clients to it. I know it is maybe too much work.. but just as idea for the future.
So such DHT node will have loading factor 100 of 100 and nodes connected to that node will have 0 of 100 (working as mobile client reporting only about itself). If it is standalone node (for example notebook) this can be set to 10 of 100 (some value calculated experimentally). Otherwise you will have to turn off Wi-Fi or Tox if you are on battery.

My knowledge in DHT is not big. But common idea: there is a lot of cases when it can be important to limit participation in DHT.

@ghost
Copy link

ghost commented Dec 26, 2017

You already have something similar. It is used in mobile clients. Disable udp mode which is used for dht traffic (and possibly other things?) on all lan clients bar one....it will be the proxy for them.

@tox-user
Copy link
Member

This issue is a duplicate of #441.

@iphydf iphydf added this to the v0.2.x milestone Jul 16, 2018
@iphydf iphydf added the P3 Low priority label Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low priority
Projects
None yet
Development

No branches or pull requests

2 participants