Overclock.net banner

[Guide] Setting up multiple BOINC Instances

16619 106
The Pentathlon is coming up and I think one of the easier ways to bunker is to setup multiple instances of the BOINC on a single computer.

This has several benefits like:
  • Being able to easily shutoff network communication to a particular project while still allowing others to run.
  • Running multiple NCI Projects.
  • Getting more work for projects with a task count.
  • No VM overhead.
  • No switching HDDs or loosing production when one hard drive completes work.
  • No messing with hosts files.
Outlined below are the steps required to setup multiple BM instances in Windows. I am using Win7 so I'm guessing it would work in Win8/10. Scroll down for Linux version.

Setting up a 2nd BOINC Instance in Windows

1. Create a new folder for the project data

My BOINC folder is in C:\ProgramData\BOINC so I just made more folders there called BOINC2. Increment the # for each additional instance.

2. Edit cc_config.xml file

It is located in the main BOINC folder: C:\ProgramData\BOINC

Include the allow_multiple_clients option in cc_config.xml. Mine now looks like this:

PHP:
<cc_config>  
 <options>   
  <use_all_gpus>1</use_all_gpus>   
  <allow_multiple_clients>1</allow_multiple_clients>  
 </options>
</cc_config>
Also add in this line if the extra client is on a remote PC:

PHP:
<allow_remote_gui_rpc>1</allow_remote_gui_rpc>
I also like to add in these lines to make task transfer faster:
PHP:
<max_file_xfers_per_project>10</max_file_xfers_per_project>
<max_file_xfers>10</max_file_xfers>
3. Create a batch file in the new BOINC folder

This will setup the folder and can be used to start the BM. Include these 2 lines inside the batch file. I name mine boinc2.bat and increment the # for each instance. (This will be a theme and generally a good practice.)

PHP:
"c:\Program Files\BOINC\boinc.exe" --allow_multiple_clients --redirectio --detach_console --gui_rpc_port 31418 --dir C:\ProgramData\BOINC2
exit
Update the installation directory (if different) and the BOINC2 directory to wherever your BOINC folder is located and how it is named. BOINC2 if you're following along with me.

The default port is 31416 so increment the port # for each additional client. I have started at 31418 and went up from there.

4 Run the Batch file

It will start another BOINC instance pointing so the new data directory specified in the batch file. You should see another boinc.exe running as well. I end up with a folder and 12 files including the batch file when its done.

For more than one instance I created another batch file and updated the BOINC2 folder and port #. From there the 1st line of the batch file can be combined into one to start up all the instances at once.

Connecting BOINC Manager to the new instance. (Optional)

I say optional as from here on it can be controlled via BOINCTasks. Not everyone uses it so here's how to get another BM Instance running to connect to the new BOINC client.

1. Create new shortcut

I had a BM shortcut on my desktop already so I copied it and renamed it BOINC2 so I knew which instance it belonged to.

2. Copy password to the 2nd Boinc instance

One of the files created after running the batch file is gui_rpc_auth.cfg. Inside a bunch of random letters and numbers. Copy that.

3. Edit BOINC2 Shortcut

Edit the 'Target' line to include the new port # and new password. This is what mine looks like for my 2nd instance.

PHP:
"C:\Program Files\BOINC\boincmgr.exe" /m /n 127.0.0.1 /g 31418 /p 37cf632b718387f4675342371b4055cc


I don't use passwords to connect to my clients, local or across the network. Your password will be different than mine.

If I remember correctly, the new BM didn't connect instantly the 1st time. It was searching for the host but it connected to the host after a few seconds. From here on it can be treated like another computer. Add/remove projects as you like. I always have to change the preferences to run while the computer is busy and run while CPU is in use.

Setting up BOINCTasks (Optional)

This is also optional. I use BOINCTasks to control all my BM instances locally and across the network. I never even have a BM instance open.

1. Add Computer

Select the Computer tab and then Computer in the File Menu and select Add Computer.



2. Give the computer a name

I incremented the name of the actually computer it was on, 3770k-2. That's not the complete computer name so it can be anything. Again I just incremented and kept the index consistent.

3. Specify the IP address

The instance is on the same computer as BoincTasks so its still localhost. Not sure if its needed but I've added the index at the end so BOINC2 has 'localhost2' as its IP address. It works for me.

4. Specify the Port

Use the same port # that was in the 1st batch file. BOINC2 for me was 31418.

5. Give BOINCTasks the password

Same thing here, paste in the password for BOINC2 from the gui_rpc_auth.cfg file.

After that I can control the Boinc instances with BoincTasks. I actually never have any BM windows open on my desktop let alone one for each instance. This is how some of my instances look like in BOINCTasks


I initially setup multiple clients to run Goofy for points and WUProp hours as it's an NCI app with badges but this should def help with the Pentathlon coming up.

Any app_config.xml or gpu.config files will have to be copied over to the new project folders created in the BOINC# folders.

I set this up awhile ago but just tried another instance but let me know if this works. Hopefully I didn't leave a setup step prior to all this.

Credit goes to @tictoc for adjusting the commands for Linux. I'm adding them into the OP.

Linux Version

I am running Mint so others running other distros or have installations in different directories may need to adjust the locations. Linux is case sensitive as a reminder. All the commands below can be entered in a terminal window which can be opened by pressing Control+Shift+T at once.

1. Create data directory for more BOINC instances

For every extra BOINC instances you want to run, just increment the # for each instance. I made mine right along the normal boinc-client folder with this command in terminal.

PHP:
sudo mkdir /var/lib/boinc2
2. Create cc_config.xml file

Just like the Windows version, create the cc_config.xml and and paste these few lines in for easy access via remote BM or BOINCTasks access.

PHP:
sudo gedit /var/lib/boinc2/cc_config.xml
Use your text editor of choice. I've used gedit and nano. Either works.

3. Paste text into cc_config.xml

Copy in these lines and save.

PHP:
<cc_config>        
 <options>                
  <use_all_gpus>1</use_all_gpus>                
  <allow_multiple_clients>1</allow_multiple_clients>        
 </options>
 </cc_config>
Also add in this line if the extra client is on a remote PC:

PHP:
<allow_remote_gui_rpc>1</allow_remote_gui_rpc>
I also like to add in these lines to make task transfer faster:
PHP:
<max_file_xfers_per_project>10</max_file_xfers_per_project>
<max_file_xfers>10</max_file_xfers>
4. Create blank gui_rpc_auth.cfg

I've found it just easier to create a blank file in linux so create a blank file and save. It can probably be done the same in Windows but hey I already the wrote the windows version out.

PHP:
sudo gedit /var/lib/gui_rpc_auth.cfg

5. Start BOINC Client Instance


Run this command to start up the BOINC instance with the adjusted port # and directory. tictoc was smart and made the last digit the same as the boinc folder number. 31422 and boinc2. Genius.

PHP:
sudo /usr/bin/boinc --daemon --allow_multiple_clients --gui_rpc_port 31422 --dir /var/lib/boinc2
For more instances I adjusted the port # and boinc # folder. From here you can monitor with BOINCTasks or a BOINC Manager.

WUProp Setup

To allow for WUProp to gather data on any projects you're running on the additional BOINC instances, it will need an app_config.xml file to use the rpc_gui port that was setup with the client. Navigate to each of your boinc data folders and create an app_config.xml file and paste in these contents:

PHP:
<app_config>  
 <app_version>   
  <app_name>data_collect_v4</app_name>   
  <plan_class>nci</plan_class>   
  <avg_ncpus>0.01</avg_ncpus>   
  <cmdline>-p 31418</cmdline>  
 </app_version> 
</app_config>
If you've been setting up the same folder structure as me the folder will be located here:

PHP:
Windows: C:\ProgramData\BOINC2\projects\wuprop.boinc-af.org/app_config.xml
Linux: /var/lib/boinc2/projects/wuprop.boinc-af.org/app_config.xml
Adjust the port number on in the cmdline option to match that BOINC instance. Per my setup above my windows port for BOINC2 was 31418 and this is my file. Be sure to have BM re-read the app_config.xml files to pickup the change.

Edit: Add Linux version section.
Edit: Add WUProp setup.
101 - 107 of 107 Posts

· Premium Member
Joined
·
2,908 Posts

· Premium Member
Joined
·
6,192 Posts
Discussion Starter · #104 ·
@mmonnin quick question on WUprop and multiple clients.

Are you running WUprop on each client and then modding each individual project app_config with the proper port, or are you just running WUprop on the main client and adding each port to the main app_config, if that makes sense...
For computers where I have CPU and a GPU, which is all but one atm, I run a 2nd client with WUProp for the GPU hours. My main install BOINC directory runs the CPU apps. On the 2nd client I add in the app_config.xml file with the port #. The main install directory will use the default port 31416 and does not need an app_config to use the default port..

I do have typically like 10 BOINC directories setup on each PC for bunkering but only 2 have WUProp.
 

· Once more into the Fold
Joined
·
3,120 Posts
Okay thanks, Im splitting up the tasks on my 1700X because the client cant seem to play nice with 3 different projects running at the same time. One project will run dry and the other will download 3 days of work because it thinks its using 16 cores, when its limited to 4...tried many different settings and configs but some projects just suck to work with.

I posted the question because my first return was invalid, but the next one worked so I guess I had it setup right.

Thanks again
 

· Premium Member
Joined
·
6,192 Posts
Discussion Starter · #106 ·
Okay thanks, Im splitting up the tasks on my 1700X because the client cant seem to play nice with 3 different projects running at the same time. One project will run dry and the other will download 3 days of work because it thinks its using 16 cores, when its limited to 4...tried many different settings and configs but some projects just suck to work with.

I posted the question because my first return was invalid, but the next one worked so I guess I had it setup right.

Thanks again
Yeah, I never use max_concurrent as I've run into the same issue. If they are extremely long like CPDN, then I will just suspend the extra tasks and resume them once several complete. If the project has options like Primegrid I use it to see a max download on the project preferences to set a max # of threads in use. Eventually BOINC will get the CPU times close to your preferences.

Running more than one WUProp task on CPU threads can get the hosts banned though if there are more CPU tasks being used than CPU threads so be warned.
 

· Once more into the Fold
Joined
·
3,120 Posts
CPDN is definitely the main issue, but even Kryptos I like to limit because anything past 8 threads starts to lose efficiency. I think Gerasim is the only project Im running now that has really good built in preferences like Primegrid, wish they all did.

Thanks for the heads up on WUProp bans, I always have a couple free threads and Im not running any projects where I think that could be an issue.
 
101 - 107 of 107 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top