Folding@home how do you dedicate CPU per GPU?

panamaatx

Junior Member
Feb 6, 2018
5
0
6
Been reading the Folding optimization threads and they mention the need to dedicate a CPU core per GPU. I don't see how that's done using the folding client. Any help would be much appreciated.

Panama
 

bill1024

Member
Jun 14, 2017
88
73
91
All it means is to leave a core free.
Say you have 6 cores. You fold with 2 GPUs. You should keep 2 cores free
So if you do BOINC you want to do only 4 tasks. One core for each task and one core per GPU, would be 6 cores used.
That's all it is.
 

panamaatx

Junior Member
Feb 6, 2018
5
0
6
All it means is to leave a core free.
Say you have 6 cores. You fold with 2 GPUs. You should keep 2 cores free
So if you do BOINC you want to do only 4 tasks. One core for each task and one core per GPU, would be 6 cores used.
That's all it is.

Thanks, I've done that and it did improve performance. That being said, I'm not sure it's "dedicated" because it looks like work is still being distributed to all cores, just less. When I look at the GPU-Z load it remains high, in the 90's and above, but will drop intermittently. I freed up additional CPU cores ,threads, til it got to the point it was a reasonable balance, but more than 1 free core. Was hoping it would be possible to make some sort of assignment between the core and GPU to better optimize the load.
 

StefanR5R

Elite Member
Dec 10, 2016
5,459
7,715
136
The Windows process scheduler moves processes from core to core all the time (which is idiotic, because of the need to clear out processor register and caches). This can be prevented by either employing a tool like process lasso, or by switching to Linux whose kernel has a saner process scheduler.

Folding@Home performance on Linux is better than on Windows anyway, due to differences in the graphics driver architecture. On Linux, the GPU is a lot more constantly utilized by the Folding@Home application. Depending on the size of the GPU, this can give a small or a large performance advantage, coupled with higher power requirement but also somewhat improved performance-per-Watt.

Some more aspects about CPU workloads concurrent with F@H GPU feeder processes:
  • Some Intel CPUs clock down the entire processor if one of the cores runs an AVX2/FMA workload. (Other Intel processors either do not clock down, or clock down only the actual core which runs that workload. In the latter case, Linux' scheduler is again beneficial over Windows' nonsensical scheduler.)
  • Many Intel CPUs (and some AMD CPUs) run at different turbo clocks depending on how many cores are used at a time. (This too is better handled by Linux than by Windows.) If the difference between few-core and many-core turbo is very big, you should avoid any other CPU load besides F@H's GPU feeders altogether if F@H PPD is paramount to you.
  • If the CPU workload requires a lot of RAM bandwidth or/and a lot of L3 cache, there is an extra performance hit to F@H GPU load. Reduce such heavyweight CPU load even further, or avoid it altogether while you run F@H on GPUs.
  • If your processor has Hyperthreading (2-way SMT) enabled, the general advice is that you should deduct at least 2 logical CPUs (2 processor threads) from the CPU load for each GPU that you want to use in F@H.
  • F@H normally lets its GPU feeder processes run at lowest process scheduling priority. It may be marginally beneficial to increase this priority, but whether or not this really has any effect also depends on the OS, the CPU type, and the kind of concurrent CPU workload. F@H's process priority can be influenced through config.xml entries which are not very well documented.
Edit,
my criticism of the Windows process scheduler is mostly about Windows 7 which I use myself. I have not used Windows 8/ 8.1/ 10 for computing loads and GPGPU loads personally yet. But from what I read, scheduler policies have not changed a lot from Windows 7 to 10.
 
Last edited:

Pokey

Platinum Member
Oct 20, 1999
2,766
457
126
my criticism of the Windows process scheduler is mostly about Windows 7 which I use myself. I have not used Windows 8/ 8.1/ 10 for computing loads and GPGPU loads personally yet. But from what I read, scheduler policies have not changed a lot from Windows 7 to 10.

Linux Mint increased my FAH production 20-25% over Win 10. So now I only use Linux for dedicated Folding Rigs. No experience with BOINC projects. But will probably run SETI later this year for the WOW event.
 

Kiska

Golden Member
Apr 4, 2012
1,007
290
136
Linux Mint increased my FAH production 20-25% over Win 10. So now I only use Linux for dedicated Folding Rigs. No experience with BOINC projects. But will probably run SETI later this year for the WOW event.

I've done this on Ubuntu, but since Mint is based on Debian and Ubuntu this should also work:
If you want headless:
sudo apt update && sudo apt upgrade
sudo apt install boinc-client

You may have to install these to get GPU compatibility:
sudo apt install boinc-client-opencl
sudo apt install boinc-client-nvidia-cuda

To get boinc over the network and view things in a GUI not on the PC:
Edit cc_config.xml file:
Here is a sample of mine, I have mine to immediately report on task completion and I have increased the number of transfers happening from 2 to 8 and max transfer from 4 to 20. Edit this as needed, or you can use mine
Code:
<cc_config>
    <log_flags>
        <file_xfer>1</file_xfer>
        <sched_ops>1</sched_ops>
        <task>1</task>
        <android_debug>0</android_debug>
        <app_msg_receive>0</app_msg_receive>
        <app_msg_send>0</app_msg_send>
        <async_file_debug>0</async_file_debug>
        <benchmark_debug>0</benchmark_debug>
        <checkpoint_debug>0</checkpoint_debug>
        <coproc_debug>0</coproc_debug>
        <cpu_sched>1</cpu_sched>
        <cpu_sched_debug>1</cpu_sched_debug>
        <cpu_sched_status>1</cpu_sched_status>
        <dcf_debug>0</dcf_debug>
        <disk_usage_debug>0</disk_usage_debug>
        <file_xfer_debug>0</file_xfer_debug>
        <gui_rpc_debug>0</gui_rpc_debug>
        <heartbeat_debug>0</heartbeat_debug>
        <http_debug>0</http_debug>
        <http_xfer_debug>0</http_xfer_debug>
        <idle_detection_debug>0</idle_detection_debug>
        <mem_usage_debug>0</mem_usage_debug>
        <network_status_debug>0</network_status_debug>
        <notice_debug>0</notice_debug>
        <poll_debug>0</poll_debug>
        <priority_debug>0</priority_debug>
        <proxy_debug>0</proxy_debug>
        <rr_simulation>0</rr_simulation>
        <rrsim_detail>0</rrsim_detail>
        <sched_op_debug>1</sched_op_debug>
        <scrsave_debug>0</scrsave_debug>
        <slot_debug>1</slot_debug>
        <state_debug>0</state_debug>
        <statefile_debug>0</statefile_debug>
        <suspend_debug>0</suspend_debug>
        <task_debug>1</task_debug>
        <time_debug>0</time_debug>
        <trickle_debug>0</trickle_debug>
        <unparsed_xml>1</unparsed_xml>
        <work_fetch_debug>0</work_fetch_debug>
    </log_flags>
    <options>
        <abort_jobs_on_exit>0</abort_jobs_on_exit>
        <allow_multiple_clients>1</allow_multiple_clients>
        <allow_remote_gui_rpc>1</allow_remote_gui_rpc>
        <client_version_check_url>http://boinc.berkeley.edu/download.php?xml=1</client_version_check_url>
        <client_new_version_text></client_new_version_text>
        <client_download_url>http://boinc.berkeley.edu/download.php</client_download_url>
        <disallow_attach>0</disallow_attach>
        <dont_check_file_sizes>0</dont_check_file_sizes>
        <dont_contact_ref_site>0</dont_contact_ref_site>
        <lower_client_priority>0</lower_client_priority>
        <dont_suspend_nci>0</dont_suspend_nci>
        <dont_use_vbox>0</dont_use_vbox>
        <exit_after_finish>0</exit_after_finish>
        <exit_before_start>0</exit_before_start>
        <exit_when_idle>0</exit_when_idle>
        <fetch_minimal_work>0</fetch_minimal_work>
        <fetch_on_update>0</fetch_on_update>
        <force_auth>default</force_auth>
        <http_1_0>0</http_1_0>
        <http_transfer_timeout>300</http_transfer_timeout>
        <http_transfer_timeout_bps>10</http_transfer_timeout_bps>
        <max_event_log_lines>0</max_event_log_lines>
        <max_file_xfers>20</max_file_xfers>
        <max_file_xfers_per_project>8</max_file_xfers_per_project>
        <max_stderr_file_size>0</max_stderr_file_size>
        <max_stdout_file_size>0</max_stdout_file_size>
        <max_tasks_reported>0</max_tasks_reported>
        <ncpus>-1</ncpus>
        <network_test_url>http://www.google.com/</network_test_url>
        <no_alt_platform>0</no_alt_platform>
        <no_gpus>0</no_gpus>
        <no_info_fetch>0</no_info_fetch>
        <no_opencl>0</no_opencl>
        <no_priority_change>0</no_priority_change>
        <os_random_only>0</os_random_only>
        <process_priority>3</process_priority>
        <process_priority_special>3</process_priority_special>
<proxy_info>
    <socks_server_name></socks_server_name>
    <socks_server_port>80</socks_server_port>
    <http_server_name></http_server_name>
    <http_server_port>80</http_server_port>
    <socks5_user_name></socks5_user_name>
    <socks5_user_passwd></socks5_user_passwd>
    <socks5_remote_dns>0</socks5_remote_dns>
    <http_user_name></http_user_name>
    <http_user_passwd></http_user_passwd>
    <no_proxy></no_proxy>
    <no_autodetect>0</no_autodetect>
</proxy_info>
        <rec_half_life_days>10.000000</rec_half_life_days>
        <report_results_immediately>1</report_results_immediately>
        <run_apps_manually>0</run_apps_manually>
        <save_stats_days>30</save_stats_days>
        <skip_cpu_benchmarks>0</skip_cpu_benchmarks>
        <simple_gui_only>0</simple_gui_only>
        <start_delay>0.000000</start_delay>
        <stderr_head>0</stderr_head>
        <suppress_net_info>0</suppress_net_info>
        <unsigned_apps_ok>0</unsigned_apps_ok>
        <use_all_gpus>1</use_all_gpus>
        <use_certs>0</use_certs>
        <use_certs_only>0</use_certs_only>
        <vbox_window>0</vbox_window>
    </options>
</cc_config>
Use sudo nano /var/lib/boinc-client/cc_config.xml
After this you will want to:
sudo less /var/lib/boinc-client/gui_rpc_auth.cfg
This is the password to the RPC port of BOINC.

Now on your machine which you want to administer BOINC from, get the IP of the machine with BOINC installed and input. You should now be able to use BOINC from another computer. If you need images to guide you I can do that after I get sleep. And you'll hear from me in 12 hrs time. About 5pm Australian Eastern Daylight Saving time
If you want a head:
sudo apt install boinc

And you should be able to control it from there
 

StefanR5R

Elite Member
Dec 10, 2016
5,459
7,715
136
Linux Mint increased my FAH production 20-25% over Win 10. So now I only use Linux for dedicated Folding Rigs. No experience with BOINC projects. But will probably run SETI later this year for the WOW event.
Some BOINC GPU applications already achieve very high GPU utilization on Windows. Others have low utilization similar to Folding@Home. Most of the time this can be worked around by running two or even more jobs on the same GPU at a time.

Right now I am running GPUGrid on a Windows machine with 1080Ti and have ≈50 % utilization with 1 job/GPU, and ≈75 % utilization with 2 jobs/GPU. I want to test whether GPUGrid works better on Linux, but need to wait until they fix a little problem with a built-in self destructor of the GPUGrid application.
 
Last edited: