|
HOWTO: Run BOINC / SETI@Home over a Samba Server October 1, 2013 I did an interesting project this weekend, and as it may be useful to others, I will lay out the details here. You will not have the same specs or requirements that I did precisely, but the general concepts may still apply. This all started with the then current version of BOINC in Linux appearing to be suddenly wonky (that's a technical term). For many a year I ran the Windows version of BOINC in Linux under Wine. That works fine and sets up quickly (see post elsewhere in this blog). The Linux version has long been difficult to set up for security and rather poor and limited documentation reasons, but three months ago, I wrestled that particular dragon and got BOINC in Linux running. That worked beautifully for three months, then got wonky. By wonky, I mean that the calculations seemed to be moving backwards and the stats did not appear to completely add up. In fact, this was probably not an issue with the Linux BOINC client at all. The BOINC version was just upgraded by Berkeley, and from comments from other users, I assume now that what I was seeing was probably just growing pains from the new upgrade being tweaked. Nonetheless, it got me playing around, this wonkiness. What I finally arrived at was the decision to rip everything out and do it differently from the ground up. Here is what I started with:
Even though BOINC is pretty
low drain, it occurred to me that I may as well not hammer
on the main hard drive (OR on the laptop hard drive) for
BOINC for a couple of reasons: I have the extra drive to
read and write to, both myself and BOINC will benefit by
using a rarely used drive for reading and writing, and
with what I had in mind, the drive reads and writes for
BOINC would include two BOINC clients, not just the one.
Better to use the experimental extra drive for BOINC.
2 GB is not a lot of space,
but if you look at the SETI@Home BOINC requirements, they
are measured in the Megs or 10s of Megs. As I said, BOINC
has low requirements as an application. 2 GB was probably
overkill for what I would do. With a couple of days of
work in queue, here what it the 2GB partition looks like:
Plenty of space to expand,
almost nothing being used. From the above, you may guess that this is the partition to be used by Windows. So, we'll continue with the Windows setup for now. From the BOINC web site, get the current Windows installer. You will be installing in Wine to a specific known drive letter. By 'specific known drive letter' I mean that you literally want to go into Wine's settings and tell Wine that the drive letter (in my case, drive letter t:) equals a specific Linux location (in my case /home/samba/boinc-w7l):
So I literally installed to drive t: knowing that the Windows laptop which would be running this install has drive t: available in the drive letters mapped in the Windows network. Why is this so? The BOINC installer seems to write the drive letter the user selects into the installed software at the time of install. You cannot change it later. So if you install to drive t: you can only run that install of BOINC on drive t:. Even though I used Wine to run the installer, and Wine will not be running the software, the rule applies: BOINC wrote drive t: to itself when Wine installed it, so drive t: must be used in Samba, even though Wine will not be involved in the actual operation. This brings up a good point. If you have to move all of the installed files and folders to a different Samba share later on, you may do so. All that you have to do is access the different Samba share with the same drive letter as the letter you used in the BOINC installer. Knowing this in advance, you can plan accordingly by choosing a drive letter which is available on the Windows Samba client. Now exit completely out of
Wine. Wine's job is done (for now) once it installed the
BOINC software somewhere accessible. In other words, do
not use Wine to run the BOINC software just installed.
That would cause BOINC to run on the Linux box's resources
and we do not want that. Instead set up a Samba share,
thus:
A couple of things are notable
above. First, the Samba server was edited in SWAT. If you
do not have SWAT, you should not be using Samba, in my
opinion. Now let's look at this Samba share definition. It
gives my user account and the Windows 7 laptop access to
the new Samba share. Note also that the Samba share is the
same folder as we used to install in Wine:
(/home/samba/boinc-w7l) Further note that
/home/samba/boinc-w7l is still the dedicated 2GB partition
for the Windows client. I set the create mask and
inheritance values as I did since BOINC will need read,
write and execute functions in order to operate
uninterrupted. Since the 2GB partition is dedicated
solely to the Windows version of the BOINC software, this
is not overly permissive permissions for this Samba
share. While in SWAT, restart the Samba server.
However BOINC may also start
to load but then crash if you use the Start Menu to launch
it. In that case, use the Windows Task Scheduler to
create your BOINC launch shortcut and set the task that
you create to launch 30 seconds to a minute after login
(this delay will make sure that your network has time to
come online fully before Task Scheduler tries to launch
BOINC). You also have other interesting options in
the Task Scheduler such as not loading BOINC if a specific
router is not available, etc. You can select from these
options as desired. If Windows complains about the location (drive t:) not being trusted, the following resolves that issue: Do Control Panel, Internet Options, Local Intranet, Advanced. Add the network containing your t: drive:
BOINC is a distributed computing project, and as such it distributes project work units to millions of client computers. It is obvious that the system capabilities, age of the computers, operating systems, user workload and technical specifications of these client systems will vary widely. Therefore, what needs to be tweaked for one computer may not need to be tweaked for another and may need to be tweaked in another way altogether for a third computer, and so on. Here are a few tweaks which may or may not be necessary and may or may not provide stability and efficiency based on your own equipment specifications and setup.
The BOINC software exists physically on the Linux box (experimental hard drive, 2 GB partition). It does not consume limited Windows 7 laptop disk space. Also, since the Windows 7 laptop does not use its hard drive, the Windows 7 laptop appears to be powered off on the surface. It is using relatively little resources. The screen saver eventually locks the laptop, then powers the display entirely off. All power lights EXCEPT hard drive activity stay on regardless. The display is totally off. The laptop is totally silent. The hard drive indicator on the laptop shows no activity at all. This is not surprising. BOINC
over Samba does NOT read or write to the Windows 7 laptop
hard drive. BOINC is installed in the Linux drive. All
data is read from the Linux drive over wifi, crunched on
the Windows 7 laptop processor and RAM and the results
written over wifi back to the Linux experimental drive.
The results are that the Windows 7 laptop resources of RAM
and processor and GPU are used, laptop hard drive is not.
As a result, the Windows 7 laptop operates at a speed the
Linux box does not.
Note the CPU efficiency and
estimated speed columns for the laptop. The laptop
crunches SETI@Home numbers at 100% efficiency and twice
the speed of the Linux box (although the numbers fluctuate
a bit). This is hardly surprising. The RAM and processor,
and not the hard disk are crunching numbers on the laptop
with no other operations. The Linux box is also
coordinating the whole show. Let's next look in greater
detail at what the Linux box is doing while the Windows 7
laptop plugs away silently.
Add to these requirements that since I am running two BOINC clients, I want to monitor them both on my Linux box. Since I want to monitor them both, the default BOINC GUI in Linux is not helpful. Since the default BOINC GUI is not helpful, I do not use it on the Linux box. Instead, on the Linux box I run the command line BOINC client as below. Note: from here on, we assume that the Windows client is largely up and running...we move here to the BOINC client running on the Linux box. The Linux command issued is: /usr/bin/boinc_client
--attach_project http://setiathome.berkeley.edu
9999999999999999999999999 --no_gpus --allow_remote_gui_rpc
--no_priority_change --dir
/home/user/vworld1/boinc-nixtower1/ What this means in English is:
I use the Linux box for daily
tasks, so that is where I want my monitor. I chose
Boincview as monitoring software. Being copyright 2006, it
is either stable and secure at this point or not. The
problem is, it is a Windows application, and not Linux.
Here we go back to Wine in Linux. Boincview does not
'install' as the BOINC for Windows application installs,
instead it just runs as downloaded. I launch and run
Boincview through a Linux shell script: /usr/bin/boinc_client
--attach_project http://setiathome.berkeley.edu
9999999999999999999999999 --gui_rpc_port 31417 --no_gpus
--allow_remote_gui_rpc --no_priority_change --dir
/home/user/vworld1/boinc-nixtower1/&
This starts my Linux command line client and then launches Boincview under Wine. To review briefly, we have started the Windows 7 BOINC client on the Samba network. For our purposes, assume it is up and running. We have now configured and started the Linux client locally. For our purposes, let's assume it is also up and running. Now we move on to our goal of monitoring both of these clients to be sure that they are running continually. Remember above that I
mentioned that we would come back the the RPC GUI option?
Well, we're coming back to it now. (I am copying (and
adapting significantly for our purposes) the next three
instructions from another website called [BOINC] Setting
up BoincView (windows) at
https://secure.dslreports.com/forum/r15201703-) On each
client, you need to do 3 things.
192.168.1.101
The first entry is my Linux tower, the second, my Windows 7 laptop, the third is not technically used and you may not need it. Since I am running a BOINC client on the same computer as I am monitoring it, I found it helpful to add. Your results and needs may vary depending on your setup. Last, restart the BOINC service. This will activate the remote_hosts.cfg file and allow RPC access. Since the Boincview in Wine
execution only consists simply of the scripting cd
/home/user/vworld1/boinc-nixtower1/boincview/
let's assume that you have Boincview running in Wine on the Linux box. However, it shows nothing at all because you have not yet told Boincview about your BOINC clients (Windows 7 laptop and Linux command line version, both of which we assume are running at this point). To access Boincview, double
click on the taskbar icon. In Boincview, start with this: Click 'Open the locations setup'. For each location added, name your new connection something relevant (like boinc-nixtower1 or boinc-w7l) Select 'Get data via network access'. (Hint: Using the other option (Get data via direct file access) will work at first, but quickly drops back offline.) Add the IP address from your router for each computer (in my case 192.168.1.101 for the Linux box and 192.168.1.103 for the Windows 7 laptop). For the port in the location settings, the default is 31416. I used that port for one machine and used 31417 for the next. For the password, use the password found in gui_rpc_auth.cfg in EACH COMPUTER'S RESPECTIVE INSTALL FOLDER. That's pretty much it. You
should now be able to roll over the taskbar icon and see
something like this:
Double clicking on the Boincview icon and selecting 'all locations' shows something like this under Hosts:
That's it, you're done!
|
|