GCP - Google Cloud Computing - Compute Engine
Google Cloud Computing - Compute Engine
basic
Compute Engine
- Infrastructure as a Service
- A managed environment
for deploying virtual machines
- run thousands of virtual CPUs on a system that is designed to be fast and to offer consistent performance.
- Fully customizable VMs
- Compute Engine offers virtual machines that run on GCP
- create and run virtual machines on Google infrastructure.
- run virtual machines on demand in the Cloud.
- select predefined VM configurations
- create customized configurations
- no upfront investments
- Lift and shift
- choice:
- have complete control over your infrastructure
- maximum flexibility
- for people who prefer to manage those server instances themselves.
- customize operating systems and even run applications that rely on a mix of operating systems.
- best option if other computing options don't support your applications or requirements
- easily lift and shift your on-premises workloads into GCP without rewriting the applications or making any changes.
- have complete control over your infrastructure
compute options
create a virtual machine instance
- by Google Cloud Platform console or the GCloud command line tool.
- standard, SSD, or local SSD.
- the standard spinning hard disk drives or HDDs, or flash memory solid state drives SSDs.
- Both of these options provide the same amount of capacity in terms of disk size when choosing a persistent disk.
- Therefore, the question really is about performance versus cost
- standard disks
- higher amount of capacity for your dollar.
- SSDs
- higher number of IOPS per dollar
- local SSDs
- even higher throughput and lower latency than SSD persistent disks because they’re attached to the physical hardware.
- but data on local SSD persists only until stop or delete the instance.
- Typically is used as a swap disk just like a RAM disc.
- But if you need more capacity, you can store those on a local SSD.
- one instances with up to 8 separate 375 GB local SSD partitions for total of 3 TB of local SSD space for each instance.
- Standard and non-local SSD disks can be sized up to 64 TB for each instance. The performance of these disks scales with each GB of space allocated.
- Linux and Windows Server images provided by Google or customized versions of these images
- import images for many of the physical servers.
- Linux and Windows Server images provided by Google or customized versions of these images
- import images for many of the physical servers.
- how much memory and virtual CPUs
- range from very small to very large indeed.
- can make a custom VM.
- machine learning and data processing that can take advantage of GPUs, many GCP zones have GPU’s available for you.
- Just like physical computers need disks, so do VM.
Virtual machines need block storage
- (2 main choices)
- 2 persistent storage
- standard or SSD.
- offer network stores that can scale up to 64 terabytes
- can easily take snapshots of the disks for backup and mobility
- attach a local SSD
- If application needs high-performance scratch space
- enable very high input/output operations per second
- to store data of permanent value somewhere else
- local SSDs content doesn’t last past when the VM terminates.
- persistent disks can.
- choose a boot image.
- GCP offers lots of versions of Linux and Windows
- can import the own images too.
- let the VMs come up with certain configurations
- like installing software packages on first boot.
- pass GCP VM startup scripts to do so.
- can also pass in other kinds of metadata too.
- Once the VMs are running
- take a durable snapshot of their disks.
- keep these as backups or use when need to migrate a VM to another region.
- per second billing
- GCP enables fine grained control of costs of Compute Engine resources by providing per second billing.
- helps reduce the costs when deploying compute resources for short periods of time
- such as batch processing jobs
- provide significantly cheaper pricing for the workloads that can be interrupted safely
- have a workload that no human being is sitting around waiting to finish
- such as batch job analyzing large dataset
- benefit:
- save money
- cost less per hour but can be terminated by Google Cloud at any time.
- different from an ordinary Compute Engine VM in only one respect.
- given compute engine permission to terminate it if it’s resources are needed elsewhere.
- make sure the job able to be stopped and restarted.
- can’t convert a non-preemptible instance into a preemptible one.
- must be made at VM creation.
- choose the machine properties of the instances
- such as the number of virtual CPUs and the amount of memory
- by using a set of predefined machine types
- or by creating the own custom machine types.
- the maximum number of virtual CPUs and the VM was 96 and the maximum memory size was in beta at 624 gigabytes.
- huge VMs are great for workloads like in-memory databases and CPU intensive analytics
- but most GCP customers start off with scaling out not scaling up.
- add and take away VMs from the application based on load metrics.
place the Compute Engine workloads behind global load balancers that support autoscaling
- balancing the incoming traffic across the VMs
- Google VPC supports several different kinds of load balancing
- define resources that are automatically deployed to meet demand
- If a VM is stopped (outage or a hardware failure), the automatic restart feature starts it back up. Is this the behavior you want? Are the applications idempotent (written to handle a second startup properly)?
- During host maintenance, the VM is set for live migration. However, you can have the VM terminated instead of migrated.
VM access and lifecycle
price
- bills by the second
- with a one-minute minimum for virtual machine usage.
- Sustained-use discounts
- apply automatically to virtual machines that run for more than 25% of a month.
- Committed-use discounts
- for stable and predictable workloads.
Preemptible and Spot VMs
images
boot disk
Common Compute Engine actions
disk snapshiots
.
This post is licensed under CC BY 4.0 by the author.
Comments powered by Disqus.