Installing boinc client on Google Cloud Platform

Message boards : Documentation : Installing boinc client on Google Cloud Platform
Message board moderation

To post messages, you must log in.

AuthorMessage
ProDigit

Send message
Joined: 8 Nov 19
Posts: 626
United States
Message 97663 - Posted: 15 Apr 2020, 2:46:18 UTC
Last modified: 15 Apr 2020, 3:30:50 UTC

I just installed Boinc on Google Cloud platform.
Google currently offers $300 on cloud services, for anyone starting out. The offer is valid for 12 months.
Some users have figured it covers a quadcore processor for 3 months, for free.

I have found you can actually run 6 instances of f1 micro for an entire year, and according to what I read, only pay $8.
Or do 5 instances and pay nothing.
I chose for 6 individual VMs running at 2,3Ghz.
You are limited to 575MB of available RAM, 10GB of disk space, and 1 core per VM, and the core is shared (meaning, you won't always have access to the full speed).
I also used Linux, which is cheaper, but you can select Windows too if you want (at a slightly higher price, and also headless, no GUI).

Here are the steps I've taken to make it work:

first, go to https://cloud.google.com/

Register

After you finish the procedure, you should be taken to compute engine.
from there you can create your own virtual machine (create an instance).
- Name it, and set location (I change server location on each instance, not to run all instances on the same server and get a complaint from Google).

In my case, I found that the following settings were the cheapest and imho the best option for running boinc:
- Instead of 'compute optimize' (which charges $122 for a quad core), select 'general purpose' 'N1 (standard, Intel Skylake)'.
- Then under 'machine type' select 'f1-micro'. ($4,28/mo)
- Under 'Boot disk' >> 'Public images', select your OS of choice (I chose Unbuntu 19.10 Minimal). Note that all Operating systems run from Terminal, not one has a GUI.
- Select 'HTTP' and 'HTTPS' (not sure if both are needed, but that's what I did).
- Click create.

Once your VM is created, click on the 'SSH' icon.
A browser window will open with a terminal.
From there, type:

sudo apt update
sudo apt upgrade
sudo apt install boinc

It'll probably pause for location settings, following settings work for USA:
Country USA: 2,
Location (I just chose NY) : 105,
Language (EN US): 31,
Keyboard layout:10

If you have a boinc bam account, you can import all your projects:
boinccmd --join_acct_mgr http://bam.boincstats.com USERNAME PASSWORD

And/Or import your projects (eg: import Rosetta), by first getting your account key:
boinccmd --lookup_account https://boinc.bakerlab.org/rosetta/ ACCOUNT@EMAIL.COM PASSWORD

Then copy/pasting the project with the account key:
boinccmd --project_attach https://boinc.bakerlab.org/rosetta/ ******Account key******


from there, do:
boinccmd --set_run_mode always
boinccmd --set_network_mode always


you can see your host hardware info by typing:
boinccmd --get_host_info

Or your projects by typing:
boinccmd --get_project_urls

You can verify if boinc is running by typing
htop

If Htop shows 100% CPU usage, you're probably good.

You can close the window, your host will continue to run in the background.
You can repeat the process for the remaining many you want to run.
Just don't forget to turn them off, because Google will charge you, if you went over the $300 credit they gave!

Good luck!
ID: 97663 · Report as offensive
ProDigit

Send message
Joined: 8 Nov 19
Posts: 626
United States
Message 97729 - Posted: 16 Apr 2020, 0:34:11 UTC

It appears in certain regios (LA) they have E2, basically a dual core CPU) at $0.5 less per cpu), and is a great deal!
ID: 97729 · Report as offensive
Falconet

Send message
Joined: 3 Oct 10
Posts: 31
Portugal
Message 97847 - Posted: 19 Apr 2020, 14:46:10 UTC - in response to Message 97729.  

It appears in certain regios (LA) they have E2, basically a dual core CPU) at $0.5 less per cpu), and is a great deal!



They are very slow though.
ID: 97847 · Report as offensive
ProDigit

Send message
Joined: 8 Nov 19
Posts: 626
United States
Message 98056 - Posted: 25 Apr 2020, 5:20:56 UTC - in response to Message 97847.  
Last modified: 25 Apr 2020, 5:21:24 UTC

Yes, but you can run a lot of them.
I run like 6 per account, since some of them (shared cores) are not running at the full 100%.
The Amazon ones are even slower, and as far as I know, I'm limited to 1 unit from Amazon.
ID: 98056 · Report as offensive
Falconet

Send message
Joined: 3 Oct 10
Posts: 31
Portugal
Message 98122 - Posted: 28 Apr 2020, 12:13:24 UTC
Last modified: 28 Apr 2020, 12:14:47 UTC

I use preemptive instances. Still have some credit.

Running 32 E2 Cores (2 instances, Intel Haswell and Broadwell, 2.3 GHz and 2.2 Ghz respectively) at about $0.22/hours
They get stopped a couple times a day so I check the Google Cloud app every now and then to restart them.

E2 is the cheapest in preemptive instances from what can tell from their pricing. Slightly cheaper than the N1 preemptive and basically the same performance.
ID: 98122 · Report as offensive
ProDigit

Send message
Joined: 8 Nov 19
Posts: 626
United States
Message 98303 - Posted: 3 May 2020, 15:52:34 UTC - in response to Message 98122.  
Last modified: 3 May 2020, 15:54:35 UTC

The N1 are often 2,3Ghz with <680MB of RAM for $5 a month.
The E2 are often 2Ghz but dual core with >1GB of RAM for $6,8-$7,5 a month; which from a compute perspective is better than the N1.
I say 'often' here, because it seems some E2 CPUs also run at 2,3Ghz, and some N1 CPUs also run at 2Ghz, or 2,5Ghz even.

What is this "preemptive instances" you mention?
I use the 'micro' servers.
I do run about 6 per account.
They're slow, but they all add to the projects.
And for as long as there's corona shutdown, those google servers are mostly unused anyway!
I'm currently at $10 for 0.5 month, still $290 of the free credit to go.
I suppose I could make a whole range of Google accounts, to add and keep adding,
However, I fear they'll just shut me down that way.
One account is on my work email and work accounting.
The other on my own home address.
ID: 98303 · Report as offensive
Falconet

Send message
Joined: 3 Oct 10
Posts: 31
Portugal
Message 98324 - Posted: 4 May 2020, 10:12:56 UTC - in response to Message 98303.  

Preemptive instances are instances that run for only 24 hours, at which point they stop running (all data is saved on the disk) unless they stop running before, which does happen.
Stopping them and starting them up again resets the 24 hour clock.

https://cloud.google.com/compute/docs/instances/preemptible

I just had 2 whole days where they didn't even stop other than at the 24 hour mark. I feel like a preemptive E2 instance stops less than the preemptive N1 instances I had before.

They are much, much cheaper than regular instances. I'm spending like 5 dollars a day for 32 cores Intel Haswell 2.3 GHz (sometimes it's Broadwell or something else but mostly Haswell). So around 0,11 cents/hour each.


I've got 2 instances with 16 cores each and 8 GB of RAM. For comparison, an N1 custom instance with 16 cores and 14.5 GB of RAM (can't select less than that) costs 42 cents per hour.


Note: To run them, the Google account has to be upgraded from a normal account to a full/paid whatever account. And then you can you the free credit for these.
ID: 98324 · Report as offensive
ProDigit

Send message
Joined: 8 Nov 19
Posts: 626
United States
Message 98771 - Posted: 24 May 2020, 7:27:27 UTC

Yeah, but when you're not careful, they'll charge your card.
Best cancel the card, so they won't charge it when the free tier is over.

By the way, Amazon AWS doesn't throttle their service like Google does.
I'm now trying out Microsoft Azure.
All of them are expensive, but Azure only gives you $200 for 30 days.
You can either buy a quadcore for 3/4th a month, 2 slower dual cores, or a whole bunch (like 60 or so) single cores.
Not sure if they have a limit like Google and Amazon (amazon only has 1 free type, google just makes it impossible to access more than 4 or 5 VMs over SSH).
ID: 98771 · Report as offensive
ProDigit

Send message
Joined: 8 Nov 19
Posts: 626
United States
Message 99286 - Posted: 14 Jun 2020, 16:43:24 UTC
Last modified: 14 Jun 2020, 16:50:08 UTC

A quicker way to set everything up, is to start with this order instead:
sudo apt update
sudo apt install boinc boinctui nano
boinccmd --join_acct_mgr http://bam.boincstats.com USERNAME PASSWORD
boinccmd --set_run_mode always
boinccmd --set_network_mode always
sudo su
cd /var/lib/boinc/
nano global_prefs.xml

Then change the value of <max_ncpus_pct> value of '66', to '100', and save
then do:
/etc/init.d/boinc-client restart
apt upgrade
reboot


then execute boinctui to see if everything is working fine.
ID: 99286 · Report as offensive
ProDigit

Send message
Joined: 8 Nov 19
Posts: 626
United States
Message 99558 - Posted: 30 Jun 2020, 3:42:50 UTC
Last modified: 30 Jun 2020, 3:43:42 UTC

After running Boinc for 2 months on Google Cloud, Microsoft, and Amazon for a few weeks,
I have to say that they're not offering the same performance as they're promising!
My PPD scores are about on par with an ARM board of similar Ghz and core count.

And I'd advise to just buying an Atomic Pi ($30 board), each unit processes about 4x to 5x faster, plus they have an IGP that can run some projects like the Collatz and Einstein.
In a few days, I surpassed the score of the cloud based units running for months,
And without the IGP, I would probably surpass 2 months of crunching on the cloud, in about 2 weeks.

Still, the cloud services offer a few weeks to months worth of free data processing, you might as well use it for Boinc!
ID: 99558 · Report as offensive

Message boards : Documentation : Installing boinc client on Google Cloud Platform

Copyright © 2021 University of California. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.