-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Proposals to improve PyFunceble #41
Comments
An containerised version ie. Docker image or a VM is a good idea and something we have discussed before. This just makes is easy for someone to run it with set limitations in a preconfigured environment but for those who know their specs and limitations we can, as it is now, determine that through a few simple tests of smaller lists. Like I know on my Intel i7 3960x that 200 processes is my own Max before starting to drag the machine down. I also run this on Ubuntu 18.04.2 x64 daily with tests running 4-8 hours and no freezing and all my tests use Multiprocessing. Same on Ubuntu 16.04.2 and Arch Linux latest. So having debug logs YES oh YES we do indeed need them and I know they will be coming soon. |
Most of my posts are from my smartphone as that is often the only time I have. Commenting on github from a smartphone is not user friendly by any means. First: Second: Third:
It is indeed, you should not give up faith. It may not be as perfect as what you want but we have massive projects running and relying on it for 3 years day in and day out. There are always improvements and fixes when time allows @funilrys but in its current state we run it it on so many different environments and distributions we cannot replicate freezing and believe me I have tried.
I doubt this would ever be practical (I may be wrong though), but I think it would be impossible to know what's running on someone's machine other than PyFunceble. So such a switch might be able to say ok lets allocate X processes because CPU is X and Memory is X but then 20 minutes into the test something else gets launched by the system / user which causes that situation to change. The key here is just finding the sweet spot of how many processes to allocate before things go wrong. For safety sake you could use even 25 processes which is still way faster than any bash method or running one at a time. Even 10 processes is faster than 1 🤔 even 5 is faster than 1 its too tempting to push many many processes in order to get such massive tests finished. I have automated PyFunceble tests on the same server above which run every hour 24/7 from Cron but are only allocated 50 processes so as to make sure, like this morning, they don't bring the server down while my current manual test of the bigger lists is in progress. Let me correct myself a bit here, I HAVE indeed been able to freeze PyFunceble that was when I gave it 250 processes on my local machine. My max processes I can ever run on my local machine is 200 but even then I am limited to what else I can do while that is running. So I can run 50 processes day in and day out while I have 5 browsers open, my email and working on anything else I like without noticing its really even running in the background. It truly is about finding a sweet spot and with your VERY large list its also a matter of, right now, finding ways of splitting the load by splitting your lists into smaller chunks for safety sake of not losing data but my suggestion would be simply pick 25-50 processes and let it run and also use the mySQL/mariaDB database option. I have been discussing improvements to the database structure for mySQL/MariaDB with @funilrys which I know are coming soon which will dramatically improve the situation of if you had to kill PyFunceble during a multiprocess test, so it can carry on where it left off but also NOT lose the data in the output folder. This change will mean the output folder files are only created at the very end of testing by pulling the data from mySQL/MariaDB and then generating those files from database. I doubt this kind of change would ever work with the current and default JSON database structure which is one reason why SQL was introduced because we are all running into very large lists to deal with. |
Too many existing users who run it to test smaller lists where JSON is still ok and will remain a default. I know a debug log is coming in the short term but to be honest you will never succeed with very big lists like yours, even mine, without using MySQL. This is why I switched the moment the option was available as lists are growing rapidly. |
@maravento See bash script I added to #39 |
Problems:
Possible bugs:
Hardware Test:
I have performed different tests in physical environments with Ubuntu 18.04.3 x64 and large lists (+ 3 M). This is the result::
PC1: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz, RAM 32028 MiB
a. PyFunceble -m -p 200 -f file = system collapses
b. PyFunceble -m -p 150 -f file = freezes after a while running
c. PyFunceble -m -p 100 -f file = freezes after a while running
d. PyFunceble -m -p 50 -f file = test abort. Read 'CPU Usage'
e. PyFunceble -f file = Stable but slower than a bash
PC2: Intel(R) Xeon(TM) CPU ES-2603 v4 @ 1.70 GHz, RAM 15903 MiB
a. PyFunceble -m -p 200 -f file = system collapses
b. PyFunceble -m -p 150 -f file = freezes after a while running
c. PyFunceble -m -p 100 -f file = freezes after a while running
d. PyFunceble -m -p 50 -f file = freezes after a while running
e. PyFunceble -f file = Stable but slower than a bash
CPU usage:
In all tests the program reaches 100% CPU usage with a large lists (+ 3 M).
Speed test: PyFunceble vs bash
Bash:
#!/bin/bash
while read LINE; do
curl -o /dev/null --silent --head --write-out '%{http_code}' "$LINE"
echo " $LINE"
done < source.txt
PyFunceble:
PyFunceble -f source.txt
Results after +1 hour:
PyFunceble: 1364 processed lines (in hosts/ACTIVE hosts/INACTIVE hosts/INVALID)
Bash: 2930 processed lines
Conclusion:
This application is only faster than a simple bash with the "-m -p" flag, but it becomes unstable and freezes or collapses the system. I suggest that it be improved in this regard so that it is usable. regards
The text was updated successfully, but these errors were encountered: