HelloZeroNet / ZeroNet

ZeroNet - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.io
Other
18.37k stars 2.27k forks source link

ZeroNet\core\tools\tor\tor.exe is using 20% of the CPU #1471

Open slrslr opened 6 years ago

slrslr commented 6 years ago

Step 1: Please describe your environment

Step 2: Describe the problem:

Hello, it is not rare when i see the ZeroNet\core\tools\tor\tor.exe is using roughly 20% (it is sustaned usage for like 15 minutes i am watching the process) of the CPU in Task manager and System Explorer.

Connections (195, total made: 23784)

The normal Tor.exe process probably launched by Tor browser that i am also running is not using any CPU.

Computer is recovered from sleep mode, if it can play any role.

Similar amount of CPU (20%) is using Firefox and sometimes also qBittorrent. It is strange that just Tor would need that much. I seen connections of the process in /stats page and in System Explorer and it is not large amount. I am not browsing ZeroNet atm, i have 250 sites, maybe more in the list. ~126 connected on newsfeed.

After trying to restart the tor.exe it not started so i clicked to update Zeronet and after start the tor.exe is using like 5% of the CPU which is OK.

HelloZeroNet commented 6 years ago

I think it's depends on the guard node: if it's finds you suspicious then it will require proof of work from you. You can try lower the --tor_hs_limit setting, maybe creating hidden services is the trigger for this.

slrslr commented 6 years ago

@HelloZeroNet What is the tor_hs_limit variable? What is the default value / which value i should try? I found someone used value 100

HelloZeroNet commented 6 years ago

The default is 10, It defines how many hidden service (.onion address) will create on startup. I would try to set it to 1. https://github.com/HelloZeroNet/ZeroNet/blob/master/src/Config.py#L263 The higher number increase the privacy by serving different zeronet sites using different hidden services, so it makes it harder to find out what other sites you serving.

slrslr commented 6 years ago

@HelloZeroNet

so i updated to rev3504 and started ZN like this: C:\ZeroNet\ZeroNet.exe --multiuser_local --tor_hs_limit 1 And i see in process properties that the cmd is: "C:\ZeroNet\ZeroNet.exe" --multiuser_local --tor_hs_limit 1

Now a few minutes after start i see on /Stats page:

Tor hidden services (status: OK (1 onions running)): global : hereaddress

Connections (97, total made: 582): here are 57 .onion addresses

one hour later i see CPU usage of the ZeroNet\core\tools\tor\tor.exe is still around 20%

Tor hidden services (status: OK (1 onions running)): global : hereaddress

Connections (322, total made: 7468): 242 .onion connections