Pay-As-You-Go Computing

CFD workloads traditionally run on a dedicated computer “under the desk” or on a remote cluster or supercomputer. These machines usually run continuously. Their systems are filled with numerous software programs that sometimes conflict with one another.  They have local storage volumes that quickly reach a state of being nearly full. The total cost includes the capital cost of the machine and the overheads of floor space, air-conditioning, electrical power, maintenance and system administration.

CFD computing on the cloud is generally transitory (non-permanent). An instance is launched, the CFD runs, data is saved and the instance is terminated. Pricing is on a pay-as-you-go basis. With CFD on AWS EC2, charges apply principally to: 1) the instance; 2) data storage and data transfer from the instances.

Instance Pricing: On-Demand and Spot Instances

Instance pricing is described in AWS EC2 pricing. It describes different pricing options, with On-Demand and Spot instances providing a ‘pure’ pay-per-use model.  On-demand instances are sold at a fixed price where availability is guaranteed (within the limits of the SLA).  Spot instances are spare EC2 instances that users can bid for, whose price fluctuates based on available EC2 capacity.

On-demand pricing varies between instance types. For Intel- and AMD-based intances, $0.10 per core-hr (± $0.02) provides a rough estimate of the instance cost. Arm-based instances are around $0.035 per core-hr; with approximately half the performance of Intel/AMD cores, it is perhaps more useful to think of their approximate price as “$0.07 per 2×core-hr”.

A user can bid for a Spot instance at a price they choose. The instance starts and continues to run while the bid price exceeds the current Spot market price. The user is charged the Spot market price (note!) not the bid price. Spot instances generally offer substantial savings over On-Demand instances, as the Spot Bid Advisor shows. In our experience, they are approximately 30% of the on-demand cost for Intel- and AMD-based instances and 50% for Arm-based instances — very approximately $0.03 per core-hr for Intel/AMD, $0.03 per 2×core-hr for Arm-based. With this level of saving, we therefore recommend spot instances for CFD assuming the user can tolerate the infrequent occasions a bid is rejected or instance terminated before the CFD simulation is complete.

Data Storage and Transfer

Data is generally stored using Amazon Elastic Block Store (EBS) attached to an EC2 instance. The user specifies the size of storage volume (in GB) when they launch an instance; the volume is deleted when the instance terminates unless over-ridden by the user. The price of EBS storage varies by region but $0.10 per GB-month is typical, when a 100GB volume adds approximately $0.015 per hr to the EC2 price.  There are charges for data transfer from an EC2 instance via the Internet, e.g. copying CFD results to the user’s local machine. The base rate is $0.09 per GB which can be significant. Users can minimise the cost by copying post-processed data, using binary or compressed ASCII format, etc.

Amazon Simple Storage Service (S3) offers better value for longer term data storage.  S3 pricing varies by region and frequency of access, but between $0.0125 are $0.03 per GB-month is typical. Data can be transferred from an EC2 instance instance to S3 at no cost. For long-term archiving of results, there are other options such as Amazon Glacier at an even lower cost of $0.007 per GB-month.