mac with 8 cores but fahcore only using 700% max according to top?
Moderators: Site Moderators, FAHC Science Team
-
- Posts: 16
- Joined: Sat Oct 14, 2023 4:25 pm
- Hardware configuration: 3* Mac Mini's (2012,2014) 2* Mac Prox 6,1
- Contact:
mac with 8 cores but fahcore only using 700% max according to top?
Hi, I am running Fold at home 7.6.21 on a couple of 8 core Mac pro 5,1 machines running High Sierra.
In FAH Control it reports that 8 cores are present, but on one machine when I look at cpu usage using top running in a shell FAHCore it never exceeds 700% cpu utilisation ? My belief was that on multi core systems the percentage increases by 100 per core, so on a dual core machine top would report typically 199% CPU utilisation for FAHcore running at maximum settings . On the second machine it correctly report 750%+ utilisation. Both appear to be identical in FAH control
is there anything I can do to utilise the extra core, as these machines are not used for anything else
Thanks
In FAH Control it reports that 8 cores are present, but on one machine when I look at cpu usage using top running in a shell FAHCore it never exceeds 700% cpu utilisation ? My belief was that on multi core systems the percentage increases by 100 per core, so on a dual core machine top would report typically 199% CPU utilisation for FAHcore running at maximum settings . On the second machine it correctly report 750%+ utilisation. Both appear to be identical in FAH control
is there anything I can do to utilise the extra core, as these machines are not used for anything else
Thanks
-
- Site Moderator
- Posts: 1115
- Joined: Sat Dec 08, 2007 1:33 am
- Location: San Francisco, CA
- Contact:
Re: mac with 8 cores but fahcore only using 700% max according to top?
I believe power full will be available cores - 1.
To use all, you need to explicitly set desired cpus for that slot.
This might help:
viewtopic.php?p=354664#p354664
To use all, you need to explicitly set desired cpus for that slot.
This might help:
viewtopic.php?p=354664#p354664
-
- Posts: 16
- Joined: Sat Oct 14, 2023 4:25 pm
- Hardware configuration: 3* Mac Mini's (2012,2014) 2* Mac Prox 6,1
- Contact:
Re: mac with 8 cores but fahcore only using 700% max according to top?
many thanks. I tried setting the slot value to 8 explicitly, restarted but no difference. I'm actually starting to think its some weird problem with reporting on this particular mac. Via Activity Monitor or the top command ( then ocpu - order by cpu) it never exceeds 700%. However if in process manager I choose Top menu Window -> CPU usage , I get 8 cpus all showing approximately the same utilisation. Furthermore if I issue the command
$ sysctl -n hw. ncpu
it returns the correct value of 8.
So this perhaps suggests that all 8 cores are being used, but for some reason top/Activity monitor are mis reporting it ?
$ sysctl -n hw. ncpu
it returns the correct value of 8.
So this perhaps suggests that all 8 cores are being used, but for some reason top/Activity monitor are mis reporting it ?
Re: mac with 8 cores but fahcore only using 700% max according to top?
DEcreasing the number of cores in FAHcontrol (or the config file) is effective immediately. INcreasing the number of cores only with the next job.
Ryzen 9800X3D / RTX 4090 / Windows 11
Ryzen 5600X / RTX 3070 Ti / Ubuntu 22.04
Ryzen 5600 / RTX 3060 Ti / Windows 11
-
- Posts: 16
- Joined: Sat Oct 14, 2023 4:25 pm
- Hardware configuration: 3* Mac Mini's (2012,2014) 2* Mac Prox 6,1
- Contact:
Re: mac with 8 cores but fahcore only using 700% max according to top?
Ah, thanks Paul, I'll leave it set and see what happens
-
- Posts: 16
- Joined: Sat Oct 14, 2023 4:25 pm
- Hardware configuration: 3* Mac Mini's (2012,2014) 2* Mac Prox 6,1
- Contact:
Re: mac with 8 cores but fahcore only using 700% max according to top?
Thanks PaulTV, looks like that did it.
I set the slot value to 8 rather than -1 , and , after it got a new WU, its displaying both top and process manager info as a 700+ percentage i.e FAH_core is running at 766% while under observation.
Odd that on two apparently identical machines , one found 8 cores using the -1 flag and, one set to n - 1 cores using the -1 flag ?
many thanks
I set the slot value to 8 rather than -1 , and , after it got a new WU, its displaying both top and process manager info as a 700+ percentage i.e FAH_core is running at 766% while under observation.
Odd that on two apparently identical machines , one found 8 cores using the -1 flag and, one set to n - 1 cores using the -1 flag ?
many thanks
Re: mac with 8 cores but fahcore only using 700% max according to top?
I'm not 100% sure, but as far as I understand, -1 means 'automatic, depending on load settings'. Settings can be low, medium and high, where high is equal to all cores available, medium is all cores minus one, and I don't remember what low means, tbh. As you may guess, I prefer specifying the number of cores rather than using -1 and the load slider.
There's one thing you may consider. In certain situations, using all cores but one can be faster than using all cores for folding. The folding threads need to exchange information, and one can't run faster than the others. So, they all fold with the speed of the slowest thread. If one CPU thread is available for OS tasks, for example, it may actually be faster. When CPU folding, I usually reserve one CPU thread for the GPU (not applicable on a Mac), and one for the OS plus whatever else is running in the background. I have never done much testing what is most optimal though, that is rather hard to determine (I mostly fold on the GPU only anyway).
There's one thing you may consider. In certain situations, using all cores but one can be faster than using all cores for folding. The folding threads need to exchange information, and one can't run faster than the others. So, they all fold with the speed of the slowest thread. If one CPU thread is available for OS tasks, for example, it may actually be faster. When CPU folding, I usually reserve one CPU thread for the GPU (not applicable on a Mac), and one for the OS plus whatever else is running in the background. I have never done much testing what is most optimal though, that is rather hard to determine (I mostly fold on the GPU only anyway).
Ryzen 9800X3D / RTX 4090 / Windows 11
Ryzen 5600X / RTX 3070 Ti / Ubuntu 22.04
Ryzen 5600 / RTX 3060 Ti / Windows 11
-
- Posts: 16
- Joined: Sat Oct 14, 2023 4:25 pm
- Hardware configuration: 3* Mac Mini's (2012,2014) 2* Mac Prox 6,1
- Contact:
Re: mac with 8 cores but fahcore only using 700% max according to top?
Thanks Paul, most interesting. In my case these mac servers are running only for FAH, and are headless , or at least as headless as I can make a Mac (no monitor attached. So FAH is not really competing with much other resource beyond the background processes of OSX, and iCloud sync is disabled . I have a linux server which is truly headless in that X windows does not start, and the bare minimum of processes start at boot.
I wonder if there is a benchmark that could be run to indicate the relative merits of 7+1 Vs 8 cores for FAH on a mac ?
I wonder if there is a benchmark that could be run to indicate the relative merits of 7+1 Vs 8 cores for FAH on a mac ?
Re: mac with 8 cores but fahcore only using 700% max according to top?
There is one for GPU (https://fahbench.github.io/ - no experience with it though, and aparently only for PCs). I'm not aware of a simple benchmark tool for CPU folding that also works on MAC. There is a way to do a bit of benchmarking with a single job.
* Start the job with the max nr of CPUs you wanna test.
* Let it run for a couple percent (4 or so), then look at the time per frame. Ignore the ETA, that's unreliable.
* Reduce the number of CPUs, restart folding
* Let it run for a couple percent again, then look at time per frame.
The TPF will need a little while to stabalize after a restart / change of the client config, hence the 'let it run for a couple percent'.
* Start the job with the max nr of CPUs you wanna test.
* Let it run for a couple percent (4 or so), then look at the time per frame. Ignore the ETA, that's unreliable.
* Reduce the number of CPUs, restart folding
* Let it run for a couple percent again, then look at time per frame.
The TPF will need a little while to stabalize after a restart / change of the client config, hence the 'let it run for a couple percent'.
Ryzen 9800X3D / RTX 4090 / Windows 11
Ryzen 5600X / RTX 3070 Ti / Ubuntu 22.04
Ryzen 5600 / RTX 3060 Ti / Windows 11
-
- Site Admin
- Posts: 7937
- Joined: Tue Apr 21, 2009 4:41 pm
- Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2 - Location: W. MA
Re: mac with 8 cores but fahcore only using 700% max according to top?
I haven't run any specific benchmarks on my Macs, but anecdotally have found that I get the best results in points for the power used when I limit the CPU threads to the number of full cores and don't use the threads provided by HT on Intel processors. The CPU folding core is capable of using about 90% or so of the available cycles in the FPU, so the HT threads only add about 15-20% throughput at the cost of a disproportionate increase in power usage.
I did run folding on my son's Mac Pro 5,1 for about 10 years before he upgraded his machine. For some projects using 7 cores out of the 8 did get about the maximum throughput, but at times it was less than using 6. 8 may or may not get better throughput, but even the minimum OS overhead could b enough to slow down folding as the other threads waited for calculations to catch up.
As for the slider settings PaulTV has it right for the Full and Medium settings bing all available threads and one less. The Light setting uses half the available threads.
I did run folding on my son's Mac Pro 5,1 for about 10 years before he upgraded his machine. For some projects using 7 cores out of the 8 did get about the maximum throughput, but at times it was less than using 6. 8 may or may not get better throughput, but even the minimum OS overhead could b enough to slow down folding as the other threads waited for calculations to catch up.
As for the slider settings PaulTV has it right for the Full and Medium settings bing all available threads and one less. The Light setting uses half the available threads.
iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
-
- Posts: 16
- Joined: Sat Oct 14, 2023 4:25 pm
- Hardware configuration: 3* Mac Mini's (2012,2014) 2* Mac Prox 6,1
- Contact:
Re: mac with 8 cores but fahcore only using 700% max according to top?
Thanks Joe, how do you exclude the HT threads . Do you simply halve the number of cores defined in the slot , slider set to Light or is there some better way
-
- Site Admin
- Posts: 7937
- Joined: Tue Apr 21, 2009 4:41 pm
- Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2 - Location: W. MA
Re: mac with 8 cores but fahcore only using 700% max according to top?
I just set the CPU thread number in FAHControl. In the case of my son's Mac Pro and similar machines I have used with i7 processors that was based on looking up the processors and seeing their actual core count. For example his Mac Pro 5,1 had one Xeon W3530, 4 cores with 8 threads provided. None of the machines I have used were equipped with processors that did not have HT, If I had one such as a 4 core i5 I would set the thread count to one less than the core count.
Setting the slider to Light would have the same effect. The are two actions connected with that setting though. The first will not matter with Macs, the default on Light is to Pause GPU folding. The second is that for laptops and also for desktop computers connected to an UPS via USB for monitoring, on Light folding will be paused when running on battery and that can not be overridden.
Setting the slider to Light would have the same effect. The are two actions connected with that setting though. The first will not matter with Macs, the default on Light is to Pause GPU folding. The second is that for laptops and also for desktop computers connected to an UPS via USB for monitoring, on Light folding will be paused when running on battery and that can not be overridden.
iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3