{"id":80809,"date":"2022-01-17T10:58:10","date_gmt":"2022-01-17T16:28:10","guid":{"rendered":"https:\/\/www.whizlabs.com\/blog\/?p=80809"},"modified":"2022-02-05T08:39:45","modified_gmt":"2022-02-05T14:09:45","slug":"gcp-virtual-machines","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/","title":{"rendered":"Google Cloud Certification : GCP Virtual Machines Based Compute Options"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">In this article, we are going to learn about <strong>GCP Virtual machines<\/strong> and the benefits of Google Cloud Virtual Machine. Google Cloud Platform is one of the Grooming Cloud Providers in the industry, which is rising fast in adoption and has a number of services on it, that particularly want to use around things like Compute Engine, Machine learning and Analytics and so on. So it can be interesting to look at the benefits of Google Cloud Compute Engine.<\/span><\/p>\n<p>This topic is tested in <a href=\"https:\/\/www.whizlabs.com\/google-cloud-certifications\/\">Google Cloud Certifications<\/a> while you are preparing for the certification exam. If you are preparing for the <a href=\"http:\/\/whizlabs.com\/google-cloud-certified-cloud-digital-leader\/\" target=\"_blank\" rel=\"noopener\">Google Cloud Digital Leader exam<\/a> , then this topic is asked in the cloud digital leader exam.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ea7e02;color:#ea7e02\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ea7e02;color:#ea7e02\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#What_is_a_Virtual_Machine\" >What is a Virtual Machine?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#GCP_Virtual_Machines_or_Compute_Engine\" >GCP Virtual Machines or Compute Engine<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#General_Purpose_Machines\" >General Purpose Machines<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Workload_Optimized_VMs\" >Workload Optimized VMs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Spot_VMs_in_Google_Cloud\" >Spot VMs in Google Cloud<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Security_Features_in_Google_Cloud_Compute_Engine\" >Security Features in Google Cloud Compute Engine<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Disks_Options_in_Compute_Engine\" >Disks Options in Compute Engine<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Pricing_of_Virtual_machine_Instances\" >Pricing of Virtual machine Instances<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Cost_Optimization_Benefits_in_Virtual_Machines\" >Cost Optimization Benefits in Virtual Machines<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Automatic_Recommendation_for_VM_Instance\" >Automatic Recommendation for VM Instance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Pre-emptible_VM\" >Pre-emptible VM<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Committed_Use_Discounts\" >Committed Use Discounts<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Instance_Groups_in_Compute_Engine\" >Instance Groups in Compute Engine<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Load_Balancing_for_Instances\" >Load Balancing for Instances<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Networking_in_Google_Compute_Engine\" >Networking in Google Compute Engine<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.whizlabs.com\/blog\/gcp-virtual-machines\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_is_a_Virtual_Machine\"><\/span>What is a Virtual Machine?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">In Virtual machines, you will have the base underlying hardware which belongs to the physical machine and then on top of this you will have the virtual machine implementation or virtual box which allows you to have different virtual machines like VM1, VM2 and VM3 etc,. For this individual virtual machine they have their own kernel or own separate Operating system installed on top of this virtual machine.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Therefore, we have seen that, in reality we are just having one physical hardware but on top of that we have installed a different Operating system in each virtual machine with the help of a hypervisor or Virtual Box.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"GCP_Virtual_Machines_or_Compute_Engine\"><\/span>GCP Virtual Machines or Compute Engine<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Google Cloud Compute Engine is a product that allows you to run virtual machines on top of Google\u2019s massive infrastructure. Google Cloud Compute Engine is an Intuitive, flexible, simple at scale and secure compute service that lets you create and run your applications on Google Cloud\u2019s Global Infrastructure.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">So, it consists of tons of Computing Cores, Memory, Disk storage and Networks which are globally distributed. The workflow that allows you to easily spin up thousands of VMs and coordinate their activity by intelligently routing traffic to the instances based on the user needs.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">There are six different VM families in Google Cloud Platform. These six different VMs are splitted into two Categories. They are<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">General Purpose<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Workload Optimized<\/span><\/li>\n<\/ul>\n<p>Here is the infographics for this:<\/p>\n<p><img decoding=\"async\" class=\"size-large wp-image-81243 aligncenter\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/GCP-Virtual-Machine-Flow-Chart-1024x910.png\" alt=\"Google Cloud Virtual Machines\" width=\"640\" height=\"569\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/GCP-Virtual-Machine-Flow-Chart-1024x910.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/GCP-Virtual-Machine-Flow-Chart-300x267.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/GCP-Virtual-Machine-Flow-Chart-768x683.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/GCP-Virtual-Machine-Flow-Chart-1536x1365.png 1536w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/GCP-Virtual-Machine-Flow-Chart-473x420.png 473w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/GCP-Virtual-Machine-Flow-Chart-640x569.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/GCP-Virtual-Machine-Flow-Chart-681x605.png 681w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/GCP-Virtual-Machine-Flow-Chart.png 1800w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"General_Purpose_Machines\"><\/span>General Purpose Machines<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">General purpose VMs are ideal for a wide variety of applications like web serving, databases and image processing and come in flavors that are optimized either for cost or a balance of price and performance.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><b>Cost Optimized<\/b><span style=\"font-weight: 400;\">: For applications like web-serving, Steady state LOB apps and Small &#8211; Medium databases users can go with <\/span><b>E2 families(Efficient). <\/b><span style=\"font-weight: 400;\">This is the best practices according to Google Cloud for users like Cost savings is a Priority.<\/span><\/li>\n<li><b>Balanced VMs: <\/b><span style=\"font-weight: 400;\">\u00a0If the workload is like Enterprise apps, Medium databases, Web &amp; App serving then users can go with <\/span><b>Balanced (N1, N2, N2D) families. <\/b><span style=\"font-weight: 400;\">It can<\/span> <span style=\"font-weight: 400;\">Balance between customization, performance and TCO.<\/span><\/li>\n<li><b>Scale-out Optimized: <\/b><span style=\"font-weight: 400;\">It is suitable for scale-out workload, variety of cloud native deployments, large scale java applications and the user is looking for best performance then users can go with <\/span><b>Tau(T2D) families.<\/b><\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Workload_Optimized_VMs\"><\/span>Workload Optimized VMs<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Workload optimized VMs include compute, memory and accelerator optimized options for your most demanding applications such as SAP Hana and high performance computing.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><b>Compute Optimized<\/b><span style=\"font-weight: 400;\">: If the user is looking for ultra high performance with high intensive workload and CPUs like Game servers, Ad serving and high performance web serving then users can go with <\/span><b>C2,C2D families.<\/b><\/li>\n<li><b>Memory Optimized: <\/b><span style=\"font-weight: 400;\">If the workload is like Real-time data analytics, SAP HANA, Largest in memory Databases then Users can go with <\/span><b>M1, M2 machine families. <\/b><span style=\"font-weight: 400;\">Mostly this machine is opted for Ultra high memory workload on Compute Engine.<\/span><\/li>\n<li><b>Accelerator Optimized: <\/b><span style=\"font-weight: 400;\">If the workload consists of High Performance GPUs like ML Training, Massive Parallelized Computation then the users can go with <\/span><b>A2 machine families.<\/b><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Google Cloud Compute Engine offers <\/span><b>Custom machine type <\/b><span style=\"font-weight: 400;\">to customize your machine by selecting the exact number of Cores and RAM for your workload.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Therefore, There is a range of machine types, so you can go from 1vCPU to 64vCPUs and you can opt for 0.6GB RAM to 416GB of RAM. Then Google Cloud has a set of different combinations of resources like standard, High CPU, High Memory and Shared CPU.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Spot_VMs_in_Google_Cloud\"><\/span>Spot VMs in Google Cloud<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">By using Spot VMs, you can achieve even greater savings through taking advantage of Spot VMs. Spot VMs are affordable compute instances suitable for batch jobs and fault tolerant workloads.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Google Cloud Spot VMs guarantee higher minimum savings and more predictability in Pricing for Spot instances compared to other Cloud Providers. The features of Spot VMs are<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Enhanced Pre-emptible offerings<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Higher minimum savings<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">More predictable pricing\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Spot extends to GKE standard(automatic preemption)<\/span><\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Security_Features_in_Google_Cloud_Compute_Engine\"><\/span>Security Features in Google Cloud Compute Engine<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Google Cloud and Compute Engine are designed to be secure by default. For enhanced security, you can leverage <\/span><b>Shielded VMs<\/b><span style=\"font-weight: 400;\">. Shielded VM features include verifiable integrity with secure and measured boot.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-80810\" title=\"Shielded VMs\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-2022-01-10-at-18.18.26.png\" alt=\"Shielded VMs\" width=\"571\" height=\"311\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-2022-01-10-at-18.18.26.png 886w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-2022-01-10-at-18.18.26-300x163.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-2022-01-10-at-18.18.26-768x418.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-2022-01-10-at-18.18.26-772x420.png 772w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-2022-01-10-at-18.18.26-640x350.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-2022-01-10-at-18.18.26-681x370.png 681w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/p>\n<p><b>Secure boot<\/b><span style=\"font-weight: 400;\"> helps prevent malicious code from being loaded early in the boot sequence. Measured boot ensures the integrity of the bootloader, kernel and boot drivers to guard against malicious modifications to the VM.\u00a0<\/span><\/p>\n<p><b>vTPM<\/b><span style=\"font-weight: 400;\"> Resistance (Virtual Trusted Platform Module) can validate your guest VM pre-boot and boot integrity using vTPM technology, which is a compatible and trusted computing group.<\/span><\/p>\n<p><b>Live migration and patching<\/b><span style=\"font-weight: 400;\"> :Keep your virtual machine instances running even when a host system event occurs, such as software or hardware updates. You can define IAM policies and permissions and set these policies that constrain all new Compute Engine instances to use Shielded VM disk images. This enables vTPM and Integrity Monitoring options.<\/span><\/p>\n<p><b>Integrity Monitoring<\/b><span style=\"font-weight: 400;\"> : Integrity monitoring lets you monitor and verify the runtime boot integrity of your shielded VM instances using Stackdriver reports. It Requires vTPM to be enabled.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Disks_Options_in_Compute_Engine\"><\/span>Disks Options in Compute Engine<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">For every VM that you start up, you are going to need attached storage and so Google Compute Engine offers two types of Disks. They are<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><b>Standard Persistent Disks<\/b><span style=\"font-weight: 400;\">: Standard Disks are rotating magnetic media that is backed by Hard Disk Drive(HDD)<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>SSD persistent Disks<\/b><span style=\"font-weight: 400;\">: SSDs are obviously good random I\/O kind of operations and it is backed by Solid State Drive(SSD)<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Whether they are SSD or persistent Disks, it offers you very high availability and durability. Your data is actually spread across multiple disks, so if a particular device goes down, your data does not get lost and you continue to have access.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Your data is encrypted at rest, so Google automatically encrypts the data and manages the keys.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Google provides <\/span><b>Snapshots<\/b><span style=\"font-weight: 400;\"> which allows you to easily backup disks and make copies and then transport that backup to other zones or other regions to spin up the instances.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Pricing_of_Virtual_machine_Instances\"><\/span>Pricing of Virtual machine Instances<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Virtual machines Pricing range from $0.008\/hr to $4.032\/hr per instance hour. You only get charged while the machine is running and there are a number of really friendly pricing innovations.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Instances are billed on a per minute basis so, if you use an instance for 10 minutes and even if it\u2019s a 4$ per hour, you will get billed based on your usage.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">There are sustained use discounts which can be applicable for an instance which is running for a minimum period of 1 month. Then you will actually get a 30% discount. The more you use it, the bigger the marginal discount becomes.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Cost_Optimization_Benefits_in_Virtual_Machines\"><\/span>Cost Optimization Benefits in Virtual Machines<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Automatic_Recommendation_for_VM_Instance\"><\/span>Automatic Recommendation for VM Instance<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Google Cloud automatically provides recommendations for machines and disks that may be idle or under utilized. Click on <\/span><b>Compute Engine<\/b><span style=\"font-weight: 400;\"> in the navigation menu.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the recommendation column, you can see suggestions for each VM based on its historic resource usage. Applying these recommendations can provide an easy way to save on long term usage.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">By clicking on the <\/span><b>Save recommendation <\/b><span style=\"font-weight: 400;\">you can customize your VM instance based on the workload.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-80385 size-full\" title=\"Recommended Instance in GCP\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/Recommended-Instance-in-GCP.png\" alt=\"Recommended Instance in GCP\" width=\"419\" height=\"129\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/Recommended-Instance-in-GCP.png 419w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/Recommended-Instance-in-GCP-300x92.png 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Pre-emptible_VM\"><\/span>Pre-emptible VM<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Depending on the type of workload you are running, you may also benefit from using different types of instances and Pre-emptible VMs.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The new generation of E2 general purpose machines can give you a similar performance to the N1 series while also saving your money.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Leveraging Pre-emptible instances is a great way to run stateless workloads that are time sensitive like media transcoding. They have a maximum uptime of upto 24 hours before they are deleted, but they are 80% cheaper.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can choose Pre-emptible when making new compute instances. To choose the Pre-emptible instance, you need to select the <\/span><b>Create Instance<\/b><span style=\"font-weight: 400;\"> tab.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-80387 size-full\" title=\"Creating an Instance in GCP\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/Creating-an-Instance-in-GCP.png\" alt=\"Creating an Instance in GCP\" width=\"475\" height=\"98\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/Creating-an-Instance-in-GCP.png 475w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/Creating-an-Instance-in-GCP-300x62.png 300w\" sizes=\"(max-width: 475px) 100vw, 475px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">After choosing the machine family and machine size you need to expand the <\/span><b>Networking <\/b><span style=\"font-weight: 400;\">tab.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">By default, Pre-emptible machines will be automatically turned off under the <\/span><b>Management<\/b><span style=\"font-weight: 400;\"> tab. It can be enabled manually by selecting the dropdown menu.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-80389 size-full\" title=\"Pre-emptible Instance in GCP\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/Pre-emptible-Instance-in-GCP.png\" alt=\"Pre-emptible Instance in GCP\" width=\"532\" height=\"326\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/Pre-emptible-Instance-in-GCP.png 532w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/Pre-emptible-Instance-in-GCP-300x184.png 300w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Committed_Use_Discounts\"><\/span>Committed Use Discounts<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">If you know that you will be using resources over a long period of time, you can save even more by using committed use discounts. These are great for static workloads where you have consistent resource usage like multiple production machines.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When you purchase Committed Use Discounts for Compute Engine Resources like vCPU, RAM, GPU, local SSD and sole tenant. If there is a certain amount you know that you will always be running, you need to sign up for Commitments for a 1 or 3 year term.\u00a0<\/span><span style=\"font-weight: 400;\">This can save upto 57% of your Total costs. Commitments can be made per project or span across entire billing account.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Instance_Groups_in_Compute_Engine\"><\/span>Instance Groups in Compute Engine<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Instance groups are simply a collection of machines that you can manage together as opposed to individually. So these allow you to easily add or remove instances and you can simply change the size of the instance group and spin up additional instances.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Instance Group provides you <\/span><b>Self-healing<\/b><span style=\"font-weight: 400;\"> on your instances. So, for some reason an instance goes down and you have a health check running already, the instance group can determine that instance is no longer healthy. Finally, it can shut it down and then bring up a replacement instance with the same configuration.<\/span><\/p>\n<p><b>Auto-Scaling <\/b><span style=\"font-weight: 400;\">can be used to resize the instance automatically based on the traffic to the server. Auto-Scaling can be based on CPU utilization, requests per second and custom stackdriver metrics.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Basically, how the machines are being used once they exceed an average utilization and you can add additional instances. This also scales down based on low traffic on the server.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-80812\" title=\"Autoscaling in GCP\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Autoscale-in-GCP.png\" alt=\"Autoscaling in GCP\" width=\"638\" height=\"263\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Autoscale-in-GCP.png 1182w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Autoscale-in-GCP-300x124.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Autoscale-in-GCP-1024x423.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Autoscale-in-GCP-768x317.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Autoscale-in-GCP-1017x420.png 1017w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Autoscale-in-GCP-640x264.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Autoscale-in-GCP-681x281.png 681w\" sizes=\"(max-width: 638px) 100vw, 638px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Load_Balancing_for_Instances\"><\/span>Load Balancing for Instances<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><b>HTTP(s) Load Balancing, <\/b><span style=\"font-weight: 400;\">which not only distributes the load across multiple backend instance groups, but it intelligently routes traffic to the nearest or fastest instance group as long as it has capacity.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">There is also TCP and UDP load balancing available in Google Compute Engine. And these instance groups can be zonal or regional. Opt for multiple zones which makes it less likely that, if there is an outage in one zone it will respond from another zone for your end users.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-80813\" title=\"Loadbalancing in GCP\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/LoadBalancing-in-GCP.png\" alt=\"Loadbalancing in GCP\" width=\"734\" height=\"398\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/LoadBalancing-in-GCP.png 1246w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/LoadBalancing-in-GCP-300x163.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/LoadBalancing-in-GCP-1024x556.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/LoadBalancing-in-GCP-768x417.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/LoadBalancing-in-GCP-774x420.png 774w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/LoadBalancing-in-GCP-640x347.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/LoadBalancing-in-GCP-681x369.png 681w\" sizes=\"(max-width: 734px) 100vw, 734px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Networking_in_Google_Compute_Engine\"><\/span>Networking in Google Compute Engine<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">In Google Cloud you have a sophisticated range of networking options available to you in Google Compute Engine. It automatically creates a network for you when you create a project.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This network has a variety of subnets, and those subnets are all routed for you automatically. So, it automatically generates these routes that allow all subnets to talk to each other.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can also create custom routes as necessary. The Firewall rules are super flexible to allow incoming traffic or deny incoming traffic from a particular port.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">So hopefully, that gives you a good sense about using a Google Compute Engine in Google Cloud Platform. There are other products in GCP that use Compute Engine as the underlying platform like <a href=\"https:\/\/www.whizlabs.com\/blog\/a-guide-to-gke-clusters-google-kubernetes-engine\/\" target=\"_blank\" rel=\"noopener\">Kubernetes Engine<\/a>, CloudShell and Dataproc.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Therefore, if you want to play around with Google Compute Engine there is a free tier of Compute Engine for f1 micro with 6GB of RAM and shared Processor.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">I hope this article gives you an overview about Benefits of Google Compute Engine. In the next blog, we are going to publish a few more articles on Google Cloud. Till that stay tuned with us!!!<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Happy Learning!!!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we are going to learn about GCP Virtual machines and the benefits of Google Cloud Virtual Machine. Google Cloud Platform is one of the Grooming Cloud Providers in the industry, which is rising fast in adoption and has a number of services on it, that particularly want to use around things like Compute Engine, Machine learning and Analytics and so on. So it can be interesting to look at the benefits of Google Cloud Compute Engine. This topic is tested in Google Cloud Certifications while you are preparing for the certification exam. If you are preparing for [&hellip;]<\/p>\n","protected":false},"author":352,"featured_media":80974,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[10,12],"tags":[],"class_list":["post-80809","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-computing-certifications","category-google-cloud"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",600,315,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines-150x150.png",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines-300x158.png",300,158,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",600,315,false],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",600,315,false],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",600,315,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",600,315,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",24,13,false],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",48,25,false],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",96,50,false],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",150,79,false],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",300,158,false],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines-250x250.png",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",600,315,false],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",96,50,false],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/01\/Google-Cloud-Certification-virtual-machines.png",150,79,false]},"uagb_author_info":{"display_name":"Jagan PJ","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/jagan-pj\/"},"uagb_comment_info":2,"uagb_excerpt":"In this article, we are going to learn about GCP Virtual machines and the benefits of Google Cloud Virtual Machine. Google Cloud Platform is one of the Grooming Cloud Providers in the industry, which is rising fast in adoption and has a number of services on it, that particularly want to use around things like&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/80809","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/352"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=80809"}],"version-history":[{"count":6,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/80809\/revisions"}],"predecessor-version":[{"id":81244,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/80809\/revisions\/81244"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/80974"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=80809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=80809"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=80809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}