Compute Engine is a service for spinning up a [[virtual machine]] (VM) on [[Google Cloud Platform]]. Depending on the number of CPUs and amount of RAM, virtual machines can cost between $8 per year to a few hundred dollars per year. A VM on Compute Engine can be configured with various options for vCPU, RAM, [[disk]], networking and operating system (OS) image. Pre-configured [machine types](https://cloud.google.com/compute/docs/machine-types) are available for general computing, memory-optimized, compute-optimized and accelerator-optimized machines. Newer generations of Compute Engine will have newer CPUs and may cost more. Compute Engine also has a variety of [[GPU]] and [[TPU]] options for [[base/Deep Learning/deep learning]] tasks in the [accelerator-optimized machine family](https://cloud.google.com/compute/docs/accelerator-optimized-machines). Look for available public images for your use case like "Deep Learning on Linux". Check the Marketplace for pre-configurations based on your tech stack, but watch the price! For example, you can set up a Django site with MySQL database in one click (for free). You can also load a [[container]] on top of a VM to run a [[Docker]] container. To connect to a VM running Linux, [[SSH]] from the GCP Console or [[Cloudshell]]. See the [docs](https://cloud.google.com/compute/docs/insatnaces/connecting-to-instance) for more information. Sustained use discounts are offered if you use a resource for over 25% of the month. If you plan to use a VM for an extended period of time, apply for extended use discounts. A preemptible instance is one that can be terminated at any time to provision resources to another customer, and offers big discounts if your task is compatible.