Skip to content

Instantly share code, notes, and snippets.

@djw8605
Last active April 1, 2019 14:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djw8605/38beb7bf7a8bee001c1c to your computer and use it in GitHub Desktop.
Save djw8605/38beb7bf7a8bee001c1c to your computer and use it in GitHub Desktop.
HCC's Crane Supercomputer Vs. Amazon EC2
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Amazon EC2 Instance\n",
"We will assume an Amazon EC2 instance of type `m4.xlarge`. It has these characteristics:\n",
"* 4 cores\n",
"* 16 GB of RAM (4GB / core)\n",
"* $0.239 per Hour\n",
"\n",
"Crane also has 4 GB of Ram per core."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Calculate Computation"
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Crane has 452 nodes at 16 Cores per node\n",
"crane_cores = 452*16"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Calculate how many instances are needed to simulate Crane\n",
"num_instances = crane_cores / 4"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Hourly: $432.11\n",
"Daily: $10,370.69\n",
"Monthly: $311,120.64\n",
"Annual: $3,785,301.12\n"
]
}
],
"source": [
"# How much does it cost per hour for Crane to be on EC2, $0.239 per hour\n",
"hourly_cost = num_instances * 0.239 \n",
"print 'Hourly: ${:0,.2f}'.format(hourly_cost)\n",
"print 'Daily: ${:0,.2f}'.format(hourly_cost*24)\n",
"print 'Monthly: ${:0,.2f}'.format(hourly_cost*24*30)\n",
"print 'Annual: ${:0,.2f}'.format(hourly_cost*24*365)\n",
"compute_annual_cost = hourly_cost*24*365"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Calculate Storage\n",
"Amazon S3 has tiered pricing. But for simplicity of the calculations, we will only consider the top, and least expensive tier of $0.0275 per GB / Month"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Crane Storage in GBs: 1,486,848\n"
]
}
],
"source": [
"# Crane has 1452 TB of Lustre\n",
"crane_gb = 1452 * 1024\n",
"print 'Crane Storage in GBs: {:0,.0f}'.format(crane_gb)"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Monthly: $40,888.32\n",
"Annual: $490,659.84\n"
]
}
],
"source": [
"storage_price_per_month = crane_gb * 0.0275\n",
"print 'Monthly: ${:0,.2f}'.format(storage_price_per_month)\n",
"print 'Annual: ${:0,.2f}'.format(storage_price_per_month*12)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Summary"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Total Annual: $4,275,960.96\n"
]
}
],
"source": [
"total_annual = (storage_price_per_month * 12) + compute_annual_cost\n",
"print 'Total Annual: ${:0,.2f}'.format(total_annual)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
@drdrswan
Copy link

drdrswan commented Mar 4, 2016

Networking costs intentionally neglected. Operating includes FTE, power/cooling, space, racks and infrastructure.

@drdrswan
Copy link

drdrswan commented Mar 4, 2016

Of course, one would need perhaps even more networking, and FTE in different role, with AWS as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment