Page 1 of 2
How to use cpulimit [SOLVED]
Posted: Tue Feb 25, 2025 1:43 am
by frazelle09
Have been using cputhrottle - to keep the system under 50 C - but it tends to freeze after several days... so i looked for another solution. It seems that there is a cpulimit program, which we also have installed.
When i run htop i see at least 8 processes that have "fah" in them. Does anyone know how i should go about using cpulimit? i can't see trying to use it with each of the 8 or more PIDs i'm seeing under htop. Maybe it can be used just after the FAH program is run???
Have a beautiful week and be happy!

Re: How to use cpulimit
Posted: Tue Feb 25, 2025 3:02 am
by Joe_H
The actual processing is done in the FAHCore_nn processes, fah-client handles getting and returning WUs and processing the log files. The "nn" would be replaced with the core number, a8 and a9 for current CPU WUs and I am not certain the oldest GPU core still being used, but in the 20s.
Re: How to use cpulimit
Posted: Tue Feb 25, 2025 3:04 am
by frazelle09
Here's the ChatGPT reply
The " short reply" It took a couple of trys to get this and i still need to make it into some sort of script that the compu can use when booting
cpulimit -e FAHCore_a7 -l 25 -b
Have a great evening!

Re: How to use cpulimit [SOLVED]
Posted: Tue Feb 25, 2025 5:51 am
by muziqaz
Why not just fold on half the cores? Problem solved
Re: How to use cpulimit [SOLVED]
Posted: Fri Feb 28, 2025 3:44 am
by arisu
If you don't want to fold on fewer cores, then it's better to use cgroups with cpu.max instead of cpulimit.
https://www.kernel.org/doc/html/latest/ ... up-v2.html
Re: How to use cpulimit [SOLVED]
Posted: Thu Mar 06, 2025 7:03 am
by promeneur
It is too techie for me.
Can you write the statements ?
How to add these statements to fah systemd service file ?
Thanks
Re: How to use cpulimit [SOLVED]
Posted: Thu Mar 06, 2025 7:06 am
by promeneur
frazelle09 wrote: ↑Tue Feb 25, 2025 1:43 am
Have been using cputhrottle - to keep the system under 50 C - but it tends to freeze after several days... so i looked for another solution. It seems that there is a cpulimit program, which we also have installed.
When i run htop i see at least 8 processes that have "fah" in them. Does anyone know how i should go about using cpulimit? i can't see trying to use it with each of the 8 or more PIDs i'm seeing under htop. Maybe it can be used just after the FAH program is run???
Have a beautiful week and be happy!
[tuto] openSUSE >= 15.3,Tumbleweed,How to get a silent and cold PC ?
viewtopic.php?t=37572
Re: How to use cpulimit [SOLVED]
Posted: Thu Mar 06, 2025 7:07 am
by arisu
promeneur wrote: ↑Thu Mar 06, 2025 7:03 am
It is too techie for me.
Can you write the statements ?
How to add these statements to fah systemd service file ?
Thanks
I don't know enough about systemd for that. But it's preferable to have fewer fast cores than more slow cores. The only time you would want to limit the CPU usage itself is if for some reason you didn't want to just decrease the number of used cores.
But cgroups cpu.max is basically the same as cpulimit except it is handled by the kernel scheduler so it is much faster (turning the thread "on" and "off" much faster than cpulimit ever could). Here is a way to test it manually to see if it's what you want (this makes no persistent changes to your system and will not affect folding stability or reliability, but it will slow it down):
Code: Select all
# mkdir /sys/fs/cgroups/fah
# cd /sys/fs/cgroups/fah
# echo 1000 2000 > cpu.max
# pidof fah-client > cgroups.procs
Then pause and unpause the core and the CPU usage should be limited to 50% (1000us of usage allowed in any given 2000us period). If you remove the /sys/fs/cgroups/fah directory, reboot, or restart the fah-client process itself, then the change will be undone.
But you should really try just folding on fewer cores instead like muziqaz suggested. That will be more efficient.
Re: How to use cpulimit [SOLVED]
Posted: Thu Mar 06, 2025 7:21 am
by promeneur
I choose to combine "a fewer cores" and cpulimit.
But I wait for someone to write a HOWTO for using cgroups and cpu.max with fah.
I searched by browsing internet without any success.
Re: How to use cpulimit [SOLVED]
Posted: Thu Mar 06, 2025 7:29 am
by arisu
If using fewer cores and using cpulimit is working for you, then there's no need to use cgroups.
Re: How to use cpulimit [SOLVED]
Posted: Thu Mar 06, 2025 7:34 am
by promeneur
arisu wrote: ↑Thu Mar 06, 2025 7:29 am
If using fewer cores and using cpulimit is working for you, then there's no need to use cgroups.
I would prefer to use this new way using sytemd because perhaps one day cpulimit will be deprecated.
Re: How to use cpulimit [SOLVED]
Posted: Thu Mar 06, 2025 7:40 am
by arisu
I'm sure there is a way to do it smoothly with systemd but I do not know how.
Re: How to use cpulimit [SOLVED]
Posted: Sun Mar 09, 2025 6:31 pm
by toTOW
If you want to get a silent folding machine, don't fold on crappy laptops or get a desktop with high quality coolers and fans.
No need to mess with useless software.
Re: How to use cpulimit [SOLVED]
Posted: Mon Mar 10, 2025 1:12 am
by arisu
That too. If the machine is being loud (and isn't aging) then it's not designed to be silent under load. FAH puts the system under load and the more load, the better. Of course folding on that machine is better than nothing but you really shouldn't need to throttle its usage.
There used to be a way to directly pass extra arguments to the core, and you could pass -cpu and then a percentage. This is no longer possible with the v8 client although the core still supports it. I read on github that there were no plans to restore the ability to pass extra arguments to the core.
Re: How to use cpulimit [SOLVED]
Posted: Mon Mar 10, 2025 1:57 am
by Joe_H
That ability to pass "-cpu" to the core dates back to very old single threaded CPU folding cores. The last I knew it did not work properly with newer multi-threaded cores, it just limited one thread. Indirectly that slowed things down as the other threads all would be waiting for the slowed thread to catch up.
The rest of the uses of passing parameters to the folding cores in the v7 client were mostly used for testing purposes, not in general usage.