-
Notifications
You must be signed in to change notification settings - Fork 40
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
Feature: Allow for number of threads regardless of detected core count #49
Comments
Quick PoC by just hacking the code based on my system: Hard set 8 cores, run at 50% per core:
Observation:
|
Hi! sorry for the delay on this response, this is a great idea, I agree with you, are you a dev? can you start working on this issue? |
Alas, not a dev (and especially not rust :) ). I can read code and hack around just following my nose but don't actually delve into real, actual programming (C, rust, go, etc.) beyond knowing how to read it, infer the logic and compile. |
We can wait for some contribution, sometimes miracles happen 😅 |
Currently in
cli.rs
/main.rs
the code is using the number of cores detected to determine how many threads to spawn. This is incompatible with usingsystemd-run
to limit the CPU resources to maximize search while minimizing heat generation. For example on an 8 core system:...rana will spawn only 4 threads running at 100% each as systemd artificially shows the process only 4 cores exist. Given this CPU has 8 cores (hyperthreads). the desire instead is to run 8 threads at 50% on all 8 cores (which systemd will do for us with the above property set) - this spreads out the heat and maximizes return value better than running 4 @ 100% (I did a lot of work testing BOINC tasks which uses the same design methods - there's something magical about running more threads at lower speed than fewer threads at max speed. I suspect it has to do with L2 caching or somesuch.
It would be handy if a user controlled switch
-t
/--threads
could be specified which is allowed to be larger (or smaller!) than the detected core count. The help text should probably say something like "Only use this with systemd CPUQuota settings" or somesuch to alert the user as to it's danger etc.Thanks for considering.
The text was updated successfully, but these errors were encountered: