BOINCpe: Advanced Configuration

BOINCpe-LogoThe steps explained for basic setup enable any computer to be a functional BOINC crunching machine very quickly. However, there are still some things that have to be manually adjusted with this very basic configuration.

The more advanced configuration explained on this page will enable you to run your BOINCpe machines without any user interaction at all (beyond pressing the power button of the computer). You will be able to operate your machines diskless (without hard disk drive) and headless (without mouse, keyboard and monitor attached).

Configure BOINC Remote Access

Since you most probably want to monitor and configure the BOINC client running on the crunching machine you will have to configure remote access to this machine. The BOINC client already comes with RPC (Remote Procedure Call) capabilities. Essentially, you can use the BOINC manager GUI running on a different machine in order to connect to any other remote host (this case: BOINCpe).

The following steps only briefly describe how to enable Remote Access. Please have a look at the article “How To Control BOINC On Remote Computers” from the BOINC Wiki. There are two text files necessary to configure remote access.

Create file remote_hosts.cfg in .\plugin\BOINC_client\data

You might have to create the file remote_hosts.cfg if you do not already have one. Actually, this file is a list of DNS names or IP addresses. Each one in a separate line. No separating characters are necessary except for the line breaks. Only the computers specified in this file will be allowed to access BOINC remotely.
See: Remote Hosts File

Edit/Create file gui_rpc_auth.cfg in .\plugin\BOINC_client\data

The file gui_rpc_auth.cfg configures the password necessary for accessing the client. It is a plain text file containing only a single line which is the password. This file is already available in directory .\plugin\BOINC_client\data. You might want to change the initial password, but you can also leave it as is.
See: BOINC Daemon Password

After putting these two files in the directory .\plugin\BOINC_client\data and building BOINCpe, your machine will be accessable by remote. If you are running multiple crunching machines in a farm, the free tool BoincView can support you in monitoring and administrating multiple BOINC machines at once…

Automatically get settings from a BOINC Account Manager (BAM)

A BOINC Account Manager (e.g. BOINCstats BAM!) is a great thing to manage your BOINC settings centrally across a number of different projects you might be attached to. You can configure BOINCpe to use your BAM account in order to start computation immediately after startup without further configuration. BOINC will then use your default BAM preferences.

You need access to the installation directory of BOINC that is already successfully connected to your BAM Account. From there you have to get the following files:

Copy file acct_mgr_url.xml to .\plugin\BOINC_client\data

This file identifies the account manager to be used (e.g. BOINCstats BAM!). Just take it from your BOINC installation directory and copy it to .\plugin\BOINC_client\data.

Copy/Edit file acct_mgr_login.xml to .\plugin\BOINC_client\data

The file acct_mgr_login.xml has two different purposes: First, it stores your personal login data for the BAM account (i.e. login name and hashed password). And then, it stores the ID of the host that connected to BAM the last time using these credentials.
After copying the file to .\plugin\BOINC_client\data we have to modify the file in order to get a new unique host ID (CPID) for the BOINCpe machine and to let it connect to BAM immediately. This is easy: Simply edit the contents of the XML tags “<previous_host_cpid>” and “<next_rpc_time>” to “0″. It has to look like the following:

...
<previous_host_cpid>0</previous_host_cpid>
<next_rpc_time>0</next_rpc_time>
...

Please remember that the host ID will be gone (this will most likely also lead to multiple machines in your project profile(s)), once the BOINCpe machine is restarted unless you configure the BOINCpe Persistency Service (see below).

Automatically backup your data using BOINCpe Persistency Service

What does BOINCpe Persistency Service do?

BOINCpe Persistency Service: What does it look like?Are you worried about using a RAM disk for your long running computations? Want to make sure your projects never have duplicate entries for your machines again? Then BOINC Persistency Service is right for you!
It will periodically backup your BOINC data from the RAM disk to a network share on a different computer (e.g. your file server). Moreover, it will automatically restore the BOINC data from the share after bootup to start computation with the backupped settings, WUs and checkpoints. Please check the diagram on the left for further information on how the persistency service works. See the BOINCpe FAQ for further configuration of the cron scheduler, if you like.

The configuration of the BOINCpe persistency service will work fine with as many machines as you like. Simply specify the same network share for all BOINCpe machines. It will automatically create/read a subdirectory according to a MAC address of the computer.
So, do your configuration for BOINCpe once - burn it as often as you need it…

Edit your share and login data in .\plugin\BOINC_persistency\files\network_share_data.bat

You need to enter your network share and credentials for accessing it. Please follow the instructions in .\plugin\BOINC_persistency\files\network_share_data.bat.

Note: Your BOINCpe system’s MAC address will be added as a directory to path you specify in this file. This is necessary in order to distinguish between the BOINC data of different hosts.
An Example: Let us assume your first BOINCpe host has the MAC address 00-0A-0B-0C-0D-0E and your second host has the address 00-01-02-03-04-05. You can use the same path for both hosts (e.g. \\myServer\myShare in network_share_data.bat). The final path will automatically be set to: \\myServer\myShare\00-0A-0B-0C-0D-0E respectively \\myServer\myShare\00-0A-0B-0C-0D-0E.
Also have a look at the above diagram for further illustration…

Enable the plugin “BOINCpe Persistency Service” in the plugin menu of PEbuilder.exe

The plugin is disabled by default. You will have to enable it manually before building BOINCpe.

Note: The local data put in folder .\plugin\BOINC_client\data) will be overridden if using persistency service and valid BOINC data exists on the share. On startup, the data from the share is loaded in order to start BOINC.

You can manually load or store BOINC data using Go/Programs/BOINC/Load BOINC Data from Share… respectively Go/Programs/BOINC/Persist BOINC Data to Share…

Note: Always shut down the machine using Go/Shut down/Shut down. All BOINC data will be persisted before shutting down the computer.

Related Articles


Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Powered by WP Hashcash

Reader Comments

Big Apple: * New York City * (30. Oktober - 04. November)…

New York City, Spitzname “Big Apple”: 1924 machte dann der Sportjournalist John J. Fitz Gerald den Begriff in seiner Kolumne mit dem Titel “Around The Big Apple” über die New Yorker Pferderennszene populär. Im Pferderennspor…

Hi Torben,

meine letzte New York Reise führte mich zu Weihnachten in diese wahnsinns Stadt. Dass war sicher nicht das billigte Weihnachten was ich verlebt abe, aber mit Sicherheit das schönste. New York ist persönlich für mich eine der schönsten und gigantichsten Städte die es gibt auf der Welt und wer noch nicht in New Yorkwar, kann sich nicht vorstellen was dort abgeht.

LG
Karo

BoincPE seems to do excellently on my XP computers.

I now have some Vista computers. Does BoincPE work at all on Vista systems, if so, how do I get it to set-up. Do I simply make a copy in an XP computer and boot up the Vista computer with it?

Ob der Kerkeling auch schon in New York war?

Hi Torben

After a few power outages, and loss of some workunits, I think I might be on to something. Some Boinc projects tasks only take about 3 hours to run. So even persisting the data to a network share every 24 hours will result in some loss of WU’s. Also, you can never be sure the state of the data when the persistency service runs is a ‘valid’ checkpoint. Also when having several machines run their backup at once, it saturates the 100MB network. So what I have decided to do is eliminate the persistency service altogether, and instead, when mapping the network share, I just set that directory (the folder with the machines unique MAC id) as the BOINC data directory. And voila! No more lost workunits (even when power is restored, the last checkpoint has almost always worked, and no more duplicate ID’s). Also network traffic is much slower, and nearly unnoticable hard drive activity. Even when 2 machines are downloading new workunits, even the slowest hard drive can more than keep up with the data flow off the internet (very few people in the world have more than 10-25MB sustainable download speeds). Here is the main modifications I made to a couple batch files:

First is inti_boinc:

@ECHO OFF

REM This File is launched from PeNetCfg.ini (section [PostNetAutoRun])

ECHO.
ECHO Setting BOINC paths…
ECHO ======================
ECHO.

SET BOINCbase=%SystemDrive%\BOINC
SET BOINCclient=%BOINCbase%\Client\Standard

CALL setSysVar BOINCbase %BOINCbase%
CALL setSysVar BOINCclient %BOINCclient%

ECHO.
ECHO Processing Network Share Data
ECHO.

CALL %BOINCbase%\Persistency\network_share_data.bat
SET ERRORLEV=0
SET PersistDrv=T:
SET PersistDrvBase=Q:
CALL setSysVar PersistDrv %PersistDrv%

ECHO This system’s MAC addresses:
%BOINCbase%\Persistency\GetMACAdapters.exe
for /f “tokens=1 delims=;” %%i in (’%BOINCbase%\Persistency\GetMACAdapters.exe’) do Set MAC=%%i

ECHO.
CALL setSysVar MAC %MAC%
ECHO.
ECHO Mapping temporary share %PersistDrvBase%…
net use %PersistDrvBase% “%Share%” “%Password%” /user:”%User%”

if exist %PersistDrvBase%\%MAC%\ goto ShareExists
if exist %PersistDrvBase%\ goto CreateFolder

SET ERRORLEV=1
ECHO.
ECHO FAIL: Share %Share% does not exist…
ECHO.
goto end

:CreateFolder
ECHO.
ECHO Creating dir based on MAC address…
md %PersistDrvBase%\%MAC%

:ShareExists
ECHO.
ECHO Removing temporary share %PersistDrvBase%…
net use %PersistDrvBase% /delete
ECHO Mapping share %Share%\%MAC% to %PersistDrv%
net use %PersistDrv% “%Share%\%MAC%” “%Password%” /user:”%User%”

SET BOINCdata=%PersistDrv%\Data
CALL setSysVar BOINCdata %BOINCdata%

if exist %PersistDrv%\Data goto launch
xcopy %BOINCbase%\InitData\*.* %BOINCdata%\ /e /s /v /y /h /r /d

:launch
ECHO.
ECHO Launching BOINC
ECHO ===============
ECHO.
REM Start BOINC launcher

CALL %BOINCbase%\Client\launch_boinc.bat

:end
EXIT

Then launch_boinc was modified slightly (the new client 10.45 doesn’t like the switch “return_results_immediately”:

@ECHO OFF

start /D%BOINCclient% /low %BOINCclient%\boinc.exe -dir %BOINCdata%

start /D%BOINCdata% %BOINCclient%\boincmgr.exe

:end
EXIT

Next I moved the 2 batch files, load_boinc_data, and persist_boinc_data out of the “Files” subdirectory so those 2 options would be correctly greyed out in the NU2 Menu.

Also the restart and shutdown commands modified to remove the calls to the persistency service:

NT Shutdown command script:
@ECHO OFF

ECHO Shutting down BOINCpe now…..
ECHO ==============================
ECHO.

@%systemroot%\system32\nu2shell.exe -s

EXIT

and NT reboot command script:
@ECHO OFF

ECHO Rebooting BOINCpe now…..
ECHO ==========================
ECHO.

@%systemroot%\system32\nu2shell.exe -r

EXIT

So far (about 1 week) everything is working good, and I this will be much easier and cheaper in setting up a headless and diskless ‘farm’. First the main advantage is more consistent uniform network traffic, more reliable restarts in the event of a power failure. Also, the size of the Ramdisk can be greatly reduced, allowing the machines to be built with probably as little as 512KB of ram (256+256 Ram drive). The RAM drive is still needed to allow for the creation of some folders that WindowsPE needs, like the My Documents folder etc. What I did to reduce hard drive activity is set global preferences in either a Account Manager or the project itself is to set the “Write to Disk at most every XXX seconds” paramenter to about 600 (10 min) on all “slave machines”. This is like persising every 10 min, but only changing files that are needed, rather than re-writing and backing up of the entire Network Share, which is time consuming, and can easily saturate a 100MB LAN.

Cheers!

This is for Markcbq

There really is no such thing as a “XP” or “Vista” computer. Any system that will run Vista will work just fine with the ‘mini-XP’ that BartPE uses. Just be sure to use a Windows XP CD when building the image, dont use a “Vista” CD. You might need to put a driver for the network card into the proper folder in BoincPE before building it.