nexus, index source, cloud index source
cloud
“Cloud” in the context of research computing refers to commercial clouds, for example AWS, GCP and Azure,
where Virtual Machines are available on a pay-as-you-go basis. The content of this repo does not however
concern “cloud” consumer services like iCloud and Google Drive.
Essay: Is cloud computing a good idea for you?
children
references
Cloud computing for research comes at a dollar cost. We are interested in optimizing spend.
- Preemptible instance use on the cloud (70-90% savings)
open topic: access control
cloud clinics
- 23-JAN-2025 11:30AM PDT Checkpointing methods: Getting $3.33 of cloud compute for $1.00
- [connect link], [recording link]
- Abstract: In today’s busy world we can lose track of small details that have a big impact.
Suppose you have a cloud budget of $10,000 but your computations could be scaled up beyond
that limitation to produce better research. What you need is access to immutable storage (easy),
access to cheap preemptible cloud VM instances (easy) and a reliable method of checkpointing
your progress (easy? hard?). This one-two-three punch means you can purchase $33,333 worth of
cloud computing for a mere $10,000 and get better research results as a consequence. This cloud
clinic will catch you up on the how-tos and other small details of such a substantial gain in
compute power. We use a CNN as our example implementation of a compute-intensive research task.
AWS EC2 Virtual Machines
AWS virtual machines fall into a variety of categories and size scales; so there is some studying
up to do in deciding which instance to select. A typical powerful workstation will run between $0.50
and $1.00 per hour; so it is important to Stop (not Terminate) the instance when it is not in use.
Below are remarks on non-GPU and then GPU-based VMs. Following that are instructions for logging in to
a VM on AWS by means of the VSCode application.
non-GPU instances
- Information on naming conventions
- Examples from the compute-optimized C-series
- c6id.4xlarge
- C = compute optimized, 6 = generation 6
- i = Intel processors (contrast: ‘a’ for AMD processors)
- d = instance store volumes: temporary, high-performance block-level storage…
- …physically attached to the host computer running the EC2 instance
- …fast data access
- …but data is lost if the instance is stopped or terminated
- 4xlarge = 16vCPU, 32GB RAM, $.8344 per hour for Ubuntu
- 12xlarge = 48vCPU, 96GB RAM, $2.5032 per hour for Ubuntu: Cost scales linearly with vCPU count and RAM
- c6i.4xlarge: C-series, 6th-generation, Intel, 16vCPU, 32GB RAM, $0.708/hr Ubuntu
- c7i-flex.4xlarge: C, 7th-gen, Intel, 16vCPU, 32GB RAM, $0.7063/hr Ubuntu
- The
-flex
modifier is reputed to be “5% cost savings with occasional performance hit”
- This choice would be a nominal cost optimizer but ‘remains to be shown’
- This suggests benchmarking identical configurations on a moderate processing task
- How would a cheaper C5 or C4 compare?
- How to ensure the entire vCPU bank is engaged?
gpu instances
Log in from VSCode
- Use this tutorial to connect to the VM from VSCode
- The objective is to have the VS Code Server automatically install on the VM so VSCode simply runs on the VM
- On the AWS Console: Be sure to Create and subsequently Download a new keypair file when starting the VM
- On the AWS Console: Take note of the ip address of the VM
- On “your laptop” move the downloaded
keypair.pem
file to a location in your file system where VSCode can see it
- On VSCode: Use the >< icon in the lower left corner to bring up the connection interface
- On VSCode: Add a new connection, e.g. the command
ssh ubuntu@123.234.123.234
- On VSCode: Edit the configuration file
config
to have a pointer to the keypair file
- This keypair might reside in the WSL Linux filesystem, e.g.
\\wsl.localhost\Ubuntu\home\myname
- This keypair might reside in a subfolder you create in your home directory, e.g.
C:\Users\myusername\.keypairs
config
in my system is found / selected at homedirectory\.ssh\config
- The important line to add to the Host entry for this VM:
- ` IdentityFile “C:\Users\username.keypairs\keypair.pem”`
- With this in place VSCode can be instructed to establish a connection to the AWS VM
- This will install a communication app called VSCode Server
- VSCode Server securely connects your laptop to the AWS VM via your local VS Code Client
- Once you are connected you should see an (Ubuntu OS) prompt; you are logged in to the VM
- To test this try issuing a shutdown command that will Stop (not Terminate) the VM
- You can re-start the VM from the AWS console