alxbelu wrote:In any case, what I really wanted to ask you was which cloud provider you used; I too was considering donating some extra power that way, but when I realized how overloaded the infrastructure was, I held off. Once the bottlenecks have been solved though I'd still like to contribute more, and I'd like to spin up such a solution.
Certainly! I'm using AWS. I've been running a few different instance types:
[*]
g4dn.xlarge - Started with this, Nvidia Tesla T4 GPU -- was netting me around 100,000-150,000 credits/day/server when it was being used.
Nvidia Tesla T4
[*]
p2.xlarge - Tried this as it wasn't clear to me whether FAH would benefit from better double precision operations or not, answer is not, went back to g4dn.xlarge.
Nvidia K80
[*]
c5.4xlarge - Switched some to this yesterday as GPU's have been running idle, still some CPU WU, netting me around 15,000-20,000 credits/day/server.
16*Cores on 2nd generation Intel Xeon Scalable Processors (Cascade Lake) @ 3.4GHz
[*]
c5.9xlarge - Switched the rest to this now that GPU's have been idle for nearly 2 days, still some CPU WU, netting me around 25,000-30,000 credits/day/server.
32*Cores on 2nd generation Intel Xeon Scalable Processors (Cascade Lake) @ 3.4GHz
I wrote a quick Python script (which I'm running in an AWS Lambda function for simplicity sake) to ascertain the cheapest spot price region/availability zone for a given instance type:
Code: Select all
import boto3
def lambda_handler(event, context):
instanceTypeToPrice = 'g4dn.xlarge';
# Get regions
ec2=boto3.client('ec2')
report={};
for region in ec2.describe_regions()['Regions']:
client=boto3.client('ec2', region_name=region['RegionName']);
for avz in client.describe_availability_zones()['AvailabilityZones']:
prices=client.describe_spot_price_history(InstanceTypes=[instanceTypeToPrice],MaxResults=1,ProductDescriptions=['Linux/UNIX (Amazon VPC)'],AvailabilityZone=avz['ZoneName'])
if len(prices['SpotPriceHistory']) > 0:
report[str(prices['SpotPriceHistory'][0]['SpotPrice'])] = avz['ZoneName']
for sortedKey in sorted(report):
print(sortedKey+" -> "+report[sortedKey])
Lambda function was given permissions to query EC2, and I simply updated the instanceTypeToPrice variable as necessary in the code above to whatever instance type I was interested in finding the cheapest price for (g4dn.xlarge, p2.xlarge, c5.4xlarge, c5.9xlarge).
For example, if you run the above script for g4dn.xlarge you'd find that us-east-2c has the cheapest spot price at that time @ roughly $0.16/hour. Not bad considering it would cost me close to $3,000-$3,500 to buy the hardware, and pay for electricity, I could run this perpetually in AWS for nearly 2.5 years before breaking even if I bought the hardware.
Code: Select all
0.157800 -> us-east-2c
0.159500 -> us-east-1f
0.167300 -> us-east-2a
0.167400 -> eu-north-1a
...
Therefore I just setup a spot instance request in us-east-2c for g4dn.xlarge with an X number of instances.
Thought about maybe writing a tutorial and a CloudFormation template to automate all of this based on a simple $ value you want to contribute in CPU or GPU resources, so others could easily do the same and have it optimally allocate the resources and spin them up. Will hold off for now until, FAH figures out how to get enough work onto the network and how to scale up their internal systems.