Jump to content

How to use Google Clouds free $300 for BOINC

In this guide I will using Google Clouds $300 to run http://www.primegrid.com on a GPU but with tweaking this should guide should be useable for any of the projects with or without a GPU.

 

Requirements

This guide assumes you already have accounts with : http://bam.boincstats.com and any projects you want to use Google Cloud on e.g. http://www.primegrid.com. Make sure you've joined the LinusTechTips_Team for the project.

 

This guide will be using the command line quite a bit and because of the nature of it being a cloud service provider there will be charges if you leave this running past the trial money. Google Cloud only seems to give access to 1 GPU for beginners so costs should be limited but you should be diligent in checking the billing.

 

Because of this risk I highly recommend reading the guide fully before attempting.

Google Cloud Set up

  1. Make your Google Cloud account and activate it by adding payment details (this unlocks the ability to run GPU instances).
  2. Under quotas select Compute Engine API - GPUs (all regions) and click edit quotas setting a limit of 1 and fill in your details and hit submit request (I personally could not get more then one on my fresh account and this limits the cost risk but feel free to try more)

    image.png.73ba4a6a3f0fc4fa204934ea6381dcbc.png


     
  3.  Under VM instances press CREATE INSTANCE and pick GPUs as your machine config and P100 and the default Machine type seems to be doing well for me. I haven't had much luck with using other GPUs but let me know if anyone gets them working with good results.

    image.png.0e94bdcbcfcea9d6b5cc62664b12275a.png 


     
  4. You should have a suggestion to change the boot disk so go within in it and pick: "Debian 10 based Deep Learning VM with M108" scroll to the bottom and press "create"

    image.png.5b5bc5c9c2b3d554b37548e7d147d7d7.png


     
  5. Wait a minute for your VM to start up then click SSH within "VM instances". Once its started up you should see terminal below. Type in y and press enter. Let the drivers install this may take 5 mins.

image.png.716e631593b527b3c019be66c0948c38.png

 

BOINC setup

Congrats you now have a running P100 on Google Cloud with drivers installed. Now on to setting up the VM for BOINC. After you've let the drivers fully install close your SSH connection to your VM and within "VM instances" stop and start your VM then reconnect via SSH.

Run the following commands within the terminal:

  1. sudo apt update -y
  2. sudo apt upgrade -y

Worth stopping and starting your VM again then enter these into the terminal: 

  1. sudo apt install boinc -y
  2. boinccmd --join_acct_mgr http://bam.boincstats.com USER_NAME PASSWORD
  3. boinccmd --lookup_account http://www.primegrid.com USER_NAME PASSWORD
  4. boinccmd --project_attach http://www.primegrid.com ACCOUNT_KEY
  5. boinccmd --set_run_mode always
  6. boinccmd --set_network_mode always
  7. boinccmd --set_gpu_mode always
  8. boinccmd --set_network_mode always
  9. boinccmd --read_global_prefs_override
  10. boinccmd --project http://www.primegrid.com update
  11. boinccmd --project http://www.primegrid.com resume

Replace the USER_NAME, PASSWORD, ACCOUNT_KEY with your own

 

Some of these are likely redundant but I still run them regardless to make sure there is nothing unexpected. You can see more commands on how to use boinccmd here: https://boinc.berkeley.edu/wiki/Boinccmd_tool

boinccmd --get_cc_status

is useful to check that your GPU and networking is not suspended.

boinccmd --get_project_status

can be used to check your project has been added.

 

Complete!

 

After 5 mins your VM should start getting tasks and working on them. You can see tasks that have been downloaded and complete/submitted using 

boinccmd --get_tasks

boinccmd --get_old_tasks

respectively. Below you can see an example of the output from "boinccmd --get_tasks"

image.png.0e6876cbfcbc88e6ffe57d1e7bab4bb0.png

 

Within your project account users you should see also see your Google Cloud VM pop up as well. If there is no GPU this means installing the GPU drivers has likely failed as BOINC can't recognise there is a GPU available. While making this guide the main cause of this was not choosing the OS with drivers or not restarting the VM after installing drivers and updating the system.

image.png.90789cc383ee478fe6204ec427f506c3.png

 

 

 

Notes

The boot drive seems saving task states while turning on/off so it should be easy to use spot instances instead to reduce the cost of running the instance but I have not tried that yet.

The BOINC installation part of the guide should work for other cloud service providers as long as you pick a debian based system with drivers for the GPU used.

ACCOUNT_KEY for the project can be found by digging through the account details for the project you want to run, for Primegrid I found it on the home page while logged in.

 

Link to comment
Share on other sites

Link to post
Share on other sites

I'd like to add that using spot/preemptible VMs can save you a bit of the credit,

You could also use multiple P4s as spot VMs and come in below the pricing for a V100 spot which would be better value if you're folding.

 

Also, note: If you use an ubuntu image and are willing to put in a bit more work (sometimes a lot, because nvidiai) and install the drivers on your own, you could make a custom vm that's dedicated to just GPU crunching, general rule to follow would be 1c/GPU

"A high ideal missed by a little, is far better than low ideal that is achievable, yet far less effective"

 

If you think I'm wrong, correct me. If I've offended you in some way tell me what it is and how I can correct it. I want to learn, and along the way one can make mistakes; Being wrong helps you learn what's right.

Link to comment
Share on other sites

Link to post
Share on other sites

Another offer of £500 of cloud computing 

https://cloud.ionos.co.uk/compute/signup

My Folding Stats - Join the fight against COVID-19 with FOLDING! - If someone has helped you out on the forum don't forget to give them a reaction to say thank you!

 

The only true wisdom is in knowing you know nothing. - Socrates
 

Please put as much effort into your question as you expect me to put into answering it. 

 

  • CPU
    Ryzen 9 5950X
  • Motherboard
    Gigabyte Aorus GA-AX370-GAMING 5
  • RAM
    32GB DDR4 3200
  • GPU
    Inno3D 4070 Ti
  • Case
    Cooler Master - MasterCase H500P
  • Storage
    Western Digital Black 250GB, Seagate BarraCuda 1TB x2
  • PSU
    EVGA Supernova 1000w 
  • Display(s)
    Lenovo L29w-30 29 Inch UltraWide Full HD, BenQ - XL2430(portrait), Dell P2311Hb(portrait)
  • Cooling
    MasterLiquid Lite 240
Link to comment
Share on other sites

Link to post
Share on other sites

39 minutes ago, Lightwreather JfromN said:

I'd like to add that using spot/preemptible VMs can save you a bit of the credit,

You could also use multiple P4s as spot VMs and come in below the pricing for a V100 spot which would be better value if you're folding.

 

Also, note: If you use an ubuntu image and are willing to put in a bit more work (sometimes a lot, because nvidiai) and install the drivers on your own, you could make a custom vm that's dedicated to just GPU crunching, general rule to follow would be 1c/GPU

I did mention spot instances in the notes but as the BOINC Pentathlon is on I personally wanted a full VM but will be exploring spot more with my AWS account when my GPU quota is approved.

 

I based the choice on P100 partly on that was the one that worked for me and some research into the theoretical performance vs price. 

P4 costs ~45% of P100 while giving 4% of the FP64 theoretical performance. Also despite my requests I can not increase the number of GPUs I can run from 1. Will try in the future if time is a factor in their decision. So I went for the middle performance to balance the performance/cost for the single GPU I can run.

 

Actual performance maybe different so likely worth testing but limits in my time/the fact its for a competition did make me settle on P100. I did make the assumption that FP64 is a good metric just from the nature of prime crunching but happy to be corrected on that as would be good to know for the future.

 

My first time deploying anything with Cloud Services so was an interesting experience, you are right there will be loads of tips like setting up an image that would speed things up for larger deployments. Just happy I got anything working =).

 

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, iubiubiub said:

P4 costs ~45% of P100 while giving 4% of the FP64 theoretical performance.

Do note not much in BOINC uses FP64 for GPUs far as I know. Most people don't own GPU hardware with proper FP64 support so projects don't target that.

Link to comment
Share on other sites

Link to post
Share on other sites

29 minutes ago, leadeater said:

Do note not much in BOINC uses FP64 for GPUs far as I know. Most people don't own GPU hardware with proper FP64 support so projects don't target that.

ah my bad thats a good point, just compared my rtx3090 to the p100 and 3090 has ~10% of the FP64 but is 5x faster then the p100 so that should explain why.  So FP64 won't be the best comparison between them and would need to be tested then.

 

Cheers

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×