-
Notifications
You must be signed in to change notification settings - Fork 200
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
Q: How to use this tool more effectively on my laptop? #491
Comments
You can use --scale parameter to spawn more threads (i.e. ./db1000n --scale 10) but make sure your ulimit -n is configured to be high enough for that |
@arriven What's the default for threads? Do we need to use it (--scale parameter) for any multi-core instance? Or is there a sane default? Maybe it should set it to the number of cores by default? |
I don't think scaling it based on the CPU capacity is a good idea since you are more likely to hit a limit on network capacity (or the amount of sockets you can open). TCP traffic generation doesn't require a lot of CPU unless the target is very quick to respond |
I guess adding information about increasing descriptors / sockets maximum number for different platforms would be very useful - on my Mac it was something like 256 by default, when the allowed maximum is 10240. |
@arriven as for CPU - I noticed the app loads CPU a lot when used with IPv6, like 100%. But when it's IPv4 only - it generates a low CPU load like maybe 12%. Mind I used different VPNs for that. And the one which has only IPv6 (it seems) makes the app load the CPU to 100% and then there are multiple issues with updating the targets list - like EOFs, timeouts, etc. Maybe it's a separate issue with IPv6? |
could be, I don't think I've tested ipv6 functionality well enough, can you tell which specific resources you tried with ipv6? |
Hotspot Shield VPN seems to have only IPv6 for their servers. And I always get very high CPU load with that one. Also I noticed that targets list update failures happen even with IPv4 sometimes, though less often - I'll post examples below. |
and the same with just EOF. I think I also saw something like connection timeout. |
hmm, I have one idea of a potential cause, does it manage to get the proper config at least once in the configuration where you get that 100% CPU load? There is a config embedded into the app as a backup and it could become outdated, I'm not 100% sure whether I've updated it after latest breaking changes |
yep, confirm, when I used Hotspot VPN and I ran the app, it was able to get an initial list and I think it updated a few times ok, but then started having those issues with updating the list. But the traffic report keeps growing anyway. |
If it was able to fetch the config at least once it won't get back to embedded config and that means that the problem is somewhere else, could you maybe send me some debug logs (--debug)? |
Hotspotshield is a transparent proxy for TCP (L4). Hotspotshield has a limited connection tracking table for concurrent TCP streams that are terminated and proxied.. So probably it can be an issue. |
In my case, no VPN used. I start the docker container with clean command from the docs and it stops after 3-10 seconds. The output freezes at this stage:
If I run the container with |
is it the output with debug enabled? |
@arriven it's a standard output w/o debug. Is there a simple way to pass debug argument inside the docker container? |
Yup, just add --debug to the end of the commandline |
Easy enough, thanks The container stops at this point |
hmm, I don't see anything suspicious in the log. The only cases where something like this has happened before involved the process being killed due to OOM. I'm not sure that it's the case here but just to eliminate that as an option, how much memory is available to the container in your configuration? |
Seems to be memory issue, indeed. |
I might need to debug that additionally because I've only been seeing spikes to ~700MB with general usage being under 200MB (there was a bug that could lead to a spike of 2+ GB but it's been fixed long ago). The only "valid" reason I can see right now would be you using custom encryption keys but I don't think that's the case and even then it still shouldn't spike that much unless go garbage collector fails to free up the memory in time (I could see couple memory-heavy decryption operations happening one after the other in quick succession but still) |
So, generally 1GB is more than enough, right? That's good, as running 2GB can be costly for multiple instances. |
The highest CPU usage was by db100n itself (around 60-70%), by Antimalware Service Executable (Windows defender, around 25-30%), but then I turned the defender off right while still running the app, and by Hotspot VPN itself (~25%). I ran for several minutes, but got ~450mb of logs, so I had to cut it by half and archive. If it doesn't suit, you prefer me to use pastebin or if I need to re-run with Defender off - let me know. |
@roman-kruglov there was an issue in the config that could lead to some increased CPU usage but it shouldn't be that significant. Considering the amount of cpu being used by hotspot shield I wonder whether it could be just the normal usage putting a lot of strain on your system? You could try using the commandline from #499 to artificially reduce the amount of traffic generated and if my assumption is correct it should also reduce the load from hotspot shield |
Trying with the latest version, 21. Now it has spikes down sometimes for a short time. I confirm that if I increase the interval, the CPU load goes down - rather the spikes become less frequent. What concerns me is that the amount of traffic with this VPN is not always so much significantly higher (sometimes it is much higher than with VPN Unlimited e.g.). But in general - if the traffic is much higher with Hotspot - should I consider it more effective? Taking into account the high CPU load. P.S. maybe you should announce releases sometimes in the tg channgel - the last one there is so outdated and I think the app improved a lot, right? |
Expected Behavior
I have 64G RAM + bought a good VPN with no limitation on connections and I want to use your tool the most effectively I can on my machine. Can you recommend the way how to use it?
Actual Behavior
Right now I just run this through the docker command. Also tried the solution with a Linux image that runs 10 threads of your tools + ovpn, but that solution hasn't been updated for some time
Specifications
The text was updated successfully, but these errors were encountered: