Page 1 of 1

Spot folding

Posted: Mon Jun 08, 2020 12:00 pm
by codecaine
I was wondering how to use spot instances to run WU, and clearly someone has figured that out, installed the client and started running it. I'm interested in doing this too.
https://stats.foldingathome.org/donor/71687954 (was just viewing random user stats)

Also, I really like looking at the monthly stats more than the overall stats. It's awesome to see that some people really jumped in the top rankings and other teams have moved down. It shows there are definitely changes. https://stats.foldingathome.org/teams-monthly

Re: Spot folding

Posted: Mon Jun 08, 2020 3:27 pm
by JimboPalmer
I asked the moderators to break this out into it's own threads, as they would be buried on page two if a thread with a different topic.

One or both topics may get seen as a new thread.

Re: Spot folding

Posted: Mon Jun 08, 2020 6:26 pm
by MeeLee
I've successfully tried Amazon AWS, Google Cloud computing, and Microsoft Azure for services like Boinc (FAh is possible too).
You get a certain amount of credit with each one.

My general consensus is:
for AWS, you have no other option than to use what Amazon offers for within the free credit plan (which is a standard single core 2,5Ghz CPU).
For Google Cloud, there are a few approaches. You get $300 on credit, that you can spend on an EC2 unit for compute ($75/mo), usually dual or quad core, rather slow (2,1Ghz), or you can use the shared single core 2Ghz units for $4/mo.
The $300 credit runs out in one year, which means you'll need about 6.25 units.
These units don't run at full speed, and at some point will start throttling to 80, 60, or even 20% of it's rated speed (imagine, a single core 2Ghz CPU at 20% = 400Mhz, won't make the deadline).
Plus, those slow units have a max of about 4 or 5 of them, before Google starts doing difficult with SSH (unless you make a new group).
Microsoft is my least favorite one. It gives you 1 week to get to know the program, before asking for a CC.
You can either use all the credit on a fast compute oriented unit, or use the slow route of a few slower EC2 units, but it's the same as with Google.
They're tardy slow, and are throttled as well.

Paying for the service, forget about it! It costs a few thousand dollars a year, to get a quad core performance on either one of all three services.
So your best choice will be to use up the free credit as fast as possible.
Use high CPU core count, low RAM, and low disk space (calculate about 500MB per core).
Then find the region (east, mid, west) that has the cheapest price for that unit (if it's available).

Also don't go outside of your country, because this costs money.
Stick with Linux, because it's the cheapest (headless Ubuntu is my favorite), but many have redhat, debian, centos, or other operating systems available as well.
Give access to http, otherwise your unit won't be able to download and upload WUs.
Make sure to do:
sudo apt update
sudo apt upgrade
before installing the software you need.

Setting up a VM takes about 20 minutes (more the first few times, as you learn how it works).

And use up the money in 2 weeks to a month. Will be a much better deal than using the lower priced slow units that are throttled, and constantly need looking after.

If you plan on paying for the service, don't.
Buy a second hand PC on ebay, and pay for your electricity.
It'll be a lot less costly!
In fact, if you want the best bang for the buck,
Buy a cheap PC, and add a GTX 1660 Super, or 1660 Ti in it.
Or if your budget allows, get a RTX 2060 Super, or 2060 KO.
That's about the best bang for the buck.
You'll pay initially more, but after a year folding, you'll pay less than a quarter of what you'll pay those cloud services.

A third alternative you can do, is every month open up a new email account, and falsify your home address, and use a different credit card each time (they don't charge until you surpass your free credit). That way you can get multiple times new credit...

For every EC2 VM you make, make sure it's in a different regio.
Because I notice that if you live in regio east, and add 2 or 3 VMs, sometimes all 3 get throttled at the same time.
If you spread them around, (especially the west coast) there's less of a downtime.

Re: Spot folding

Posted: Tue Jun 09, 2020 12:31 am
by Knish
i found the previous post strangely inaccurate. Nothing should fail to make the deadline (unless u crazily try to do single core AWS folding); and all 3 require CC's up front

talking cpu's:
My Azure spot hasn't been pre-empted even once in these past ~20 days
32 threaded cpu doing very well
I am confused by their termination of credits after 1 month, tho. Despite reading their docs multiple times, not sure if their "pay-as-u-go" plan will use remaining credits after the 30day expiration

Google GCP limits by default 24 threads to a region despite 32 being the global default limit. I haven't bothered to request an upgrade. I've played with 6, 8, 12, and 24 threads and they do quite fine.

talking GPU's:
i think GCP reigns supreme with ease of use, thanks to LTT forums. haven't bothered with Azure b/c of AMD GPU and linux issues.
AWS looks awesome as the rankings have shown, but I fear applying for an GPU EC2 spot is outside the purview of the free/trial tier and will have to pay out of pocket

edit: i don't want to end up like this guy: https://www.reddit.com/r/Folding/comments/fsnlfi/oops/

Re: Spot folding

Posted: Tue Jun 09, 2020 3:37 pm
by MeeLee
I've processed plenty of WUs using all 3, and it hasn't cost me a single penny yet!

I used the shared 1vCPU version of Google with 687MB of RAM, because it was enough to run a server version of Ubuntu just fine on it.
I used 6 of them, before Google started limiting access to my VMs (that's 6 cores).
This way I could stretch it to 1 year, however, when they throttle the VM, they also throttle the payment.
Meaning that my $300 credit would never be used up during the entire of a full year.
For that reason I had to go a step higher, and use the 2vCPU version. But even that one gets throttled.
The one that goes unthrottled, is at least 10x more expensive, and often comes with lots of RAM and Disk space that FAH or Boinc doesn't need.

Instead of paying $75/mo after the free tier ended, I bought myself a Ryzen 9 3900x. The whole system cost me $800 (SSD, PSU, Mobo, CPU, RAM, Power switch); and with electricity running a whole year, will cost me less than running 8 VCPUs for 2 months.

Re: Spot folding

Posted: Wed Jun 10, 2020 12:31 am
by Knish
wow, u certainly stretched the dollar really far. my approach was 'more science done now is better than some done later,'

anyway, I came back to post about GCP billing. Just looking at the billing page lets one see how many credits are remaining, (just over $18 in my case right now) but I got to wondering how much of a delay there is. I found a guide for using another one of their free products, Big Query and DataStudio, to export billing info into and displaying it. After tinkering to get it to simply display the credit_amount, that showed i have just over $3 actually remaining! Just in the knick of time haha.

any additional info ppl might have on this would be appreciated

Re: Spot folding

Posted: Wed Jun 10, 2020 6:52 am
by MeeLee
If you don't mind having a browser window always open, you could use Google cloud shell.
It gets you 2 CPUs with 2Gig of RAM, and debian 9, and 15 free GB.
I don't know if they allow you to run it without pay, or if you need to pay extra or not..
Haven't used it for anything either. I think the console throttles speed drastically as well, only allowing fast burst speeds.
You can't save the console to a VM though.
Whatever you do in it, disappears as soon as the browser closes.

Amazon AWS, I just learned, will suspend the account for non-payment, even though they won't actually send you a reminder when the credit is used up, after 30 days.
Not very customer friendly.
Microsoft I just stopped, because they wanted my CC info 2 weeks before the deadline.
Google is the best one to me so far.
Not only do they have a browser based console to play around with, they also give the longest (1 year) free tier, and/or a $300 credit, which ever expires first.
I haven't surpassed the free tier yet.

Re: Spot folding

Posted: Wed Jun 17, 2020 1:50 pm
by codecaine
Really great info, and I think I'll stick with advice! An optimized bang for the buck graphics card.