Page 1 of 3

32 max threads on windows?

Posted: Sun Feb 06, 2022 6:18 pm
by mchaker
Hello FoldingForum,

I have a dual-socket system with two AMD EPYC 7543 CPUs in it.
32 cores per socket (64 threads per socket) = 128 threads total on the system.

Every time I try to set the thread count for a CPU slot in the FAHControl app over 32, FAHClient/FAHControl resets the thread count.
I can't seem to set the thread count of a slot to over 32 threads.

I searched the forum and found a discussion thread from months ago discussing CPU thread limits, but I don't think a solution was reached besides "use linux". :(

Is there any fix for Windows planned to allow a 128 thread folding slot?

Re: 32 max threads on windows?

Posted: Sun Feb 06, 2022 7:16 pm
by Joe_H
Same solution applies now, use Linux.

There are multiple issues with Windows and support for use of large numbers of threads. First a suitable license version of Windows needs to be used, otherwise you are limited. Your regular Home and Pro license levels do not cover that. Second the app components would need to be compiled with all of the necessary options selected for use of high thread counts across multiple CPU cores and sockets. Specifically in this case the CPU folding core FAHCore_A8.

I do not know of any work being done in this area to support a niche use. Enhancement requests may have been made in the past, but those eventually get assigned to the CPU folding core developement site which is not public. Th code the folding core is based on is public though.

Re: 32 max threads on windows?

Posted: Sun Feb 06, 2022 9:34 pm
by PaulTV
I'm not sure if folding jobs would utilize 128 cores very well, that may be too much. But others who know more about it may have a different opinion. To use all cores on Wintendo (a very good gaming platform), I'd create multiple CPU slots. 4 x 32 also makes 128 :)

Re: 32 max threads on windows?

Posted: Sun Feb 06, 2022 9:39 pm
by Neil-B
I have tested the fahcore_a8 and it readilly runs with 32+ cores/threads per slot, on a suitable project wu it delivered more wus per day as a single slot rather than multiple slots, and delivered each wu quicker ... the issue is not the fahcore or the windows os rather it appears a legacy issue with a limit set in the fahclient code ... I'll try again to see if there is any resolution on the horizon

Re: 32 max threads on windows?

Posted: Mon Feb 07, 2022 3:22 am
by MeeLee
One possible solution to it, that may or may not work, is to use a VM to run a few instances of FAH.
That way you can run core 0 with 32 threads, and another instance using core 1.
This should double your core count.

The only Windows solution to this, is to buy Windows Enterprise, which can handle up to 128 threads, but costs you a monthly fee (unlike most other Windows versions which only cost you the purchase price at the beginning).

Re: 32 max threads on windows?

Posted: Mon Feb 07, 2022 10:10 am
by mchaker
Thank you all for the help - I do have Windows Enterprise on this machine, thankfully.
So far I have been using 4x 32-thread slots (to sum up to 128 threads) and that seems to be scheduled properly by WIndows across all threads/logical CPUs.

I am interested in how you got to 32+ threads per slot, Neil-B -- mind sharing how to set that up? (Is it just to use the beta fahcore_a8? How would I do that? Or are there other steps?)

Re: 32 max threads on windows?

Posted: Mon Feb 07, 2022 11:35 am
by Neil-B
@mchaker ... response by pm

Re: 32 max threads on windows?

Posted: Mon Feb 07, 2022 11:37 am
by Neil-B
MeeLee wrote:The only Windows solution to this, is to buy Windows Enterprise, which can handle up to 128 threads, but costs you a monthly fee (unlike most other Windows versions which only cost you the purchase price at the beginning).
This is incorrect ... It is not, I repeat not a licensing issue ... it is the FAHClient/FAHControl code that cause this issue - Not Licensing, nor the FAHCore.

Re: 32 max threads on windows?

Posted: Mon Feb 07, 2022 8:23 pm
by calxalot
I believe the limit is due to the Windows client being a 32-bit build.

Re: 32 max threads on windows?

Posted: Mon Feb 07, 2022 10:47 pm
by Neil-B
The windows client simply passes the settings to the fahcore - the fact that it is 32bit shouldn't stop it passing the correct settings to the fahcore which is 64bit and readilly folds on more than 32 threads ... it is most likely a legacy coding issue

Re: 32 max threads on windows?

Posted: Tue Feb 08, 2022 12:06 am
by calxalot
The code is in open source cbang SystemInfo.cpp

Code: Select all

  SYSTEM_INFO sysinfo;
  GetSystemInfo(&sysinfo);
  return sysinfo.dwNumberOfProcessors;
This will not indicate more than 32 cores in a 32-bit app.

https://codereview.webrtc.org/2978863002

In that link, you may see the patch uses GetNativeSystemInfo(), but I believe that requires Windows 10 or later.

Re: 32 max threads on windows?

Posted: Tue Feb 08, 2022 5:49 am
by mchaker
GetNativeSystemInfo() seems to work on Windows versions older than 10 (author states that the call runs on Windows XP)

Would it be possible for me to compile my own FAHClient? Or is that something only the FAH team can compile and distribute?

If it's only doable by the team, is it too much to ask for that change? :)

Re: 32 max threads on windows?

Posted: Tue Feb 08, 2022 9:15 am
by calxalot
FAHClient is closed-source and another v7 release is unlikely.

I think you'll have to wait for a 64-bit v8 client for Windows.
I don't know when or if such will be released, but it seems needed.
I doubt anyone is running 32-bit Windows on cpus with >32 threads.

Re: 32 max threads on windows?

Posted: Tue Feb 08, 2022 9:50 am
by Neil-B
Or just the ability to set the number of threads in the config and not have the client override it .. simples .. only needs that call if auto generating slot

Re: 32 max threads on windows?

Posted: Tue Feb 08, 2022 9:56 am
by calxalot
If you’re feeling brave, sure, try it.
Be sure to have the client exit before altering config.xml