Added auto cluster determination #456
Open
+120
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Automatic Cluster Optimization
The script now includes an intelligent cluster optimization system that can automatically determine the optimal number of worker clusters based on your system resources and account count, because sometimes people use like "99" clusters, even if the computer really doesn't have 99 clusters to be used, causing the script/machine to crash.
Why this should be implemented on this project? Simple, it's a way to simplify the configuration to users, ensuring they don't need to change cluster ammount manually to find her optimal results when using the script.
How It Works
The
ClusterOptimizeranalyzes:Configuration
Set
"clusters": "auto"in yourconfig.jsonto enable automatic optimization:{ "clusters": "auto" }Examples
Example 1: 4 Accounts, 8-Core CPU, 16GB RAM
Example 2: 2 Accounts, 2-Core CPU, 4GB RAM
Example 3: 10 Accounts, 4-Core CPU, 8GB RAM
Manual Configuration
To manually set cluster count, use any positive number:
{ "clusters": 2 }Logging Output
When auto-optimization ("clusters": "auto") is enabled, you'll see:
Performance Tips
"auto"for automatic optimization for best performanceFallback Behavior
clusters: "auto"and no accounts are loaded, defaults to 1 cluster