Page 1 of 1

How do I set the number of cores to use

Posted: Wed Oct 04, 2023 12:13 am
by whocrazy
Hi.
When I get my new computer soon, I want to control how many cores are used, IE. 4 cores, or 8 cores, or all 16 cores.
What is the exact syntax I should use, either on the command line, or the config.xml file?
Thanks.

Re: How do I set the number of cores to use

Posted: Wed Oct 04, 2023 3:02 am
by BobWilliams757
I'm assuming you are using an operating system other than Windows?

Re: How do I set the number of cores to use

Posted: Wed Oct 04, 2023 4:43 am
by whocrazy
I will be using windows 10.

Re: How do I set the number of cores to use

Posted: Wed Oct 04, 2023 5:32 am
by Joe_H
Assuming you will have a display, use FAHControl to set the number of cores for the CPU slot. The default value of -1 leaves control of the number of cores to the slider. That sets the number to 1 less than the total Medium and to half on Light.

The number of cores used by a WU are set to a maximum based on the setting at download. While processing a WU you can reduce the number of cores used, but not increase it above the number set. The next WU downloaded will get the increased number of cores.

Re: How do I set the number of cores to use

Posted: Wed Oct 04, 2023 6:47 am
by whocrazy
Unfortunately, due to my total blindness, I am unable to use fah control, as it uses GTK and GTK is no good with screen readers.

Re: How do I set the number of cores to use

Posted: Wed Oct 04, 2023 2:57 pm
by Joe_H
Then carefully editing the config.xml file is one of your options. You will need to set an option "cpus" to the value of the number of cores you want to use. The careful editing is because FAHClient uses a subset of XML and needs careful formatting. FAHClient and FAHControl verify settings before saving them. Directly editing the file can leave you with a client that will not run. The editing needs to be done with FAHClient not running. Here is the section of my config.xml file that shows it done for CPUs set to 2:

Code: Select all

<!-- Folding Slots -->
  <slot id='0' type='CPU'>
    <cpus v='2'/>
  </slot>
If your CPU slot has another ID number you will have to use that instead of "0".

Another option requires you to be comfortable working in a command line environment. You can use FAHClient to send commands to the running background process. In your case to set the number of cores to 8 you would use something like the following:

Code: Select all

FAHClient --send-command --cpus 8
I am not sure on the exact syntax, I have not used this method and there may be permissions issues involved.

Re: How do I set the number of cores to use

Posted: Wed Oct 04, 2023 3:21 pm
by whocrazy
Thank you so much for this, it is really appreciated.
I just wish that fah control didn't use GTK, or used some other GUI platform, like QT for example, that one has accessibility settings that can be turned on in the code.

This issue has been a bit of a barrier for me since 2014, you might have seen some posts on here from me about it.

Re: How do I set the number of cores to use

Posted: Fri Oct 06, 2023 4:27 am
by calxalot
If the client is running, the command would be

Code: Select all

FAHClient --send-command "option cpus 8"
The command must be quoted so it is a single argument.

Other commands are possible:

Code: Select all

FAHClient --send-command help