-
Notifications
You must be signed in to change notification settings - Fork 453
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
Maximum CPU time - spread tasks evenly over timeslot #4181
Comments
See function throttler in file client/app.cpp |
@cnergyone, if you have smth - please send a PR |
How's it different than setting |
Sorry, but I don't understand your sentence 'switch between tasks every x minute'? A. Max cpu time is a value that determines how much time (%) BOINC gets over a time span. Parameter B is very ridged. You don't want to have this value changed dynamically or even very often. Parameter C is a about spreading compute time within and between projects. It will have zero impact on the performance of BOINC nor the CPU usage. Its only intend is to make sure that long duration tasks don't get advantage compared to short running tasks. Parameter A can be changed whenever you want, and will not lead to a crash of any task, also not VM tasks. It is intended to be more dynamically set, and can be used with temperature control or power control. I will add this feature later to boinccmd so you can set the cpu time used dynamically; You can then control BOINC cpu usage easily from a script. The difference between the old throttler code and the proposed one: The average temperature is the same, but the user experience for the frog is quite different. |
I still don't understand why do you need to run 2 tasks and suspend 6 tasks at that one second timeframe when you can just effectively set 25% CPU (8 * 0.25 = 2) with 100% CPU time used and achieve the same effect this is just tasks hoarding I also think there's an overhead doing suspend / resume every now and then, especially the tasks are not set to stay in memory edit: if the suggestion is to improve the cpu time used to be consistent, then fine I suppose, but dismissing the core count settings as useless are not. The crash in VM should be looked into and fixed properly. |
|
The purpose of CPU throttling is to let you reduce average CPU temperature, |
"The purpose of CPU throttling is to let you reduce average CPU temperature, This is the job of the kernel. If you provide it less tasks than there are cores it happily shuffles tasks around on cores. "If you have 4 cores, and you run 4 jobs, the OS will run them on different cores. This will not happen on Linux nor Windows. You can use htop and see. You can find info on the linux scheduler here: https://www.kernel.org/doc/html/latest/scheduler/index.html But nothing beats a scientific approach, so lets measure: 8 core linux system, 16 logical cpus, 16 CPU tasks running + 1 GPU task, each run takes 10 minutes Original algorithm CPU time set to 20%: Original algorithm CPU time set to 69%: New algorithm CPU time set to 20%: New algorithm CPU time set to 69%: Conclusion: the average temperature of the cpu with the old algorithm remains the same between low and medium setting. There are temperature spikes that go up to 76C. The average temperature in the new algorithm is lower than the old. There is also a clearer distinction between low and medium setting in the average temperatures. The spikes go less high leading to a lower maximum temperature of the CPU. Interesting observation: |
Describe the problem
When choosing a value of 'Maximum % of CPU time" BOINC will schedule the runtime in seconds.
For example, selecting 25% will make BOINC tasks run for one second, and sleep for 3 seconds.
In a multi core environment this is quite detrimental for performance, power spikes and more.
Also when all the tasks start at once, the computer often is less responsive for one second, and then 3 seconds is very usable.
Describe the solution you'd like
It would be beneficial for the system to spread the multi-core tasks in time, using slots.
For example, if we have an 8 core system with a 25% usage selected, we have have 8 tasks running:
Second example:
In a 100 core system with a 1% CPU load selected:
In the old situation all 100 cores would run for 1 second, completely bogging down the system.
For the next 99 seconds there would be no BOINC tasks running.
In the new situation, every task would run for 1 second in consecutive order.
This would provide a better user experience:
Additional context
In case you want your computer to consume a steady amount of power this is the only way.
Note: It would be beneficial that CPU % LOAD is separately configurable to GPU % LOAD. Same concept, but time slots also take into account amount of GPUs installed in the system.
The text was updated successfully, but these errors were encountered: