{"id":116399,"date":"2020-11-20T16:00:42","date_gmt":"2020-11-20T13:00:42","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/aws-ec2-instance-hibernation-can-speed-up-startup-times-and-save-you-money-cloudsavvy-it\/"},"modified":"2020-11-20T16:00:42","modified_gmt":"2020-11-20T13:00:42","slug":"aws-ec2-instance-hibernation-can-speed-up-startup-times-and-save-you-money-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/aws-ec2-instance-hibernation-can-speed-up-startup-times-and-save-you-money-cloudsavvy-it\/","title":{"rendered":"#AWS EC2 Instance Hibernation Can Speed Up Startup Times and Save You Money \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a40b22a51e20\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" 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: #dd3333;color:#dd3333\" 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><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a40b22a51e20\" checked aria-label=\"Toggle\" \/><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:\/\/buradabiliyorum.com\/en\/aws-ec2-instance-hibernation-can-speed-up-startup-times-and-save-you-money-cloudsavvy-it\/#Hibernation_Speeds_Up_Load_Times\" >Hibernation Speeds Up Load Times<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/aws-ec2-instance-hibernation-can-speed-up-startup-times-and-save-you-money-cloudsavvy-it\/#How_To_Use_Hibernation\" >How To Use Hibernation<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#AWS EC2 Instance Hibernation Can Speed Up Startup Times and Save You Money \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5269\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/0eb3564906a864c93706b30eaca199af\/p\/uploads\/2020\/06\/e601b806.png\" alt=\"AWS Logo\" width=\"700\" height=\"300\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>If you\u2019re frequently stopping and restarting your EC2 instances, hibernation can save you money\u2014It allows you to pause your instance like a virtual machine and restart it at another time, which can be used to drastically speed up loading times of On-Demand instances.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Hibernation_Speeds_Up_Load_Times\"><\/span>Hibernation Speeds Up Load Times<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A common use case for On-Demand EC2 instances is quite literally spinning them up on demand, as necessary. If your demand is higher during mid-day, you might want to add an extra instance behind your load balancer to handle the extra traffic.<\/p>\n<p>This is a great feature of AWS, but the downside is the startup time. Cold installs, such as when you create a new instance for the very first time, are the worst\u2014AWS has to provision and set up your instance, then the AMI must install, then you must set up all your services. Rebooting the instance is faster, but still slow; the Linux server must start, then all your services must start. For <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>lications with long loading times, this can be expensive, since you\u2019re paying for this computation time often many times a day if you have a fleet of instances.<\/p>\n<p>Hibernation allows you to save the entire contents of the machine\u2019s RAM, and turn the machine off for an extended period of time. Then, when you need to start the instance again, the saved state is simply loaded back into RAM, exactly like how a virtual machine can be paused and restarted.<\/p>\n<p>This can save money because the virtual machine can be restarted in seconds, rather than potentially minutes waiting for services to restart and come back online. Ultimately, if you\u2019re constantly stopping and restarting your EC2 instances, you should turn on hibernation to speed up the process.<\/p>\n<p>The feature is available at no extra cost except obviously the contents of the RAM saved to the EBS volume while it\u2019s hibernating. It\u2019s available on C5, I3, M5, R5, and T3 <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/watch-movies-tv-seriess\/\" data-internallinksmanager029f6b8e52c=\"8\" title=\"Watch Movies &amp; TV Series\" target=\"_blank\" rel=\"noopener\">series<\/a> instances (as well as older versions in each class) running Amazon Linux, Amazon Linux 2, Ubuntu 16.04 and 18.04 LTS, as well as Windows Server 2012, 2016 and 2019. Windows Servers can only be hibernated with 16GB of RAM, but Linux servers support up to\u00a0150 GB of RAM.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"How_To_Use_Hibernation\"><\/span>How To Use Hibernation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Hibernation is very simple to use, but it isn\u2019t on by default, and must be enabled when creating the instance. You\u2019ll see a flag under the Instance Configuration menu, for \u201cEnable hibernation as an additional stop behaviour.\u201d Turn this on.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8065\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/3dc61d08578bfba642d7a8276dccf41e\/p\/uploads\/2020\/11\/5af7567e.png\" alt=\"\" width=\"700\" height=\"202\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>One of the caveats of hibernation is that the storage disk must be an\u00a0encrypted EBS volume. You can enable that on the next page by choosing the default encryption key from the drop down menu.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8066\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/f66497c3f2cd4fe86bcf18e91d7f8e31\/p\/uploads\/2020\/11\/e505ba3f.png\" alt=\"\" width=\"700\" height=\"291\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Once it\u2019s running, you\u2019ll see an option in the menu to hibernate the instance, under Actions &gt; Instance State &gt; Stop \u2013 Hibernate. You can also do this programmatically from the CLI with <a rel=\"nofollow noopener noreferrer\" target=\"_blank\" href=\"http:\/\/redirect.viglink.com?u=https%3A%2F%2Fdocs.aws.amazon.com%2Fcli%2Flatest%2Freference%2Fec2%2Fstop-instances.html&amp;key=204a528a336ede4177fff0d84a044482\"><code>stop-instances<\/code>\u00a0and the \u2013hibernate flag<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8067\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/4c2bff5aeec79796bd5a263bdb6a97d0\/p\/uploads\/2020\/11\/34613ca0.png\" alt=\"\" width=\"683\" height=\"315\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The contents of the RAM will be saved in memory and the instance will appear as \u201cStopped.\u201d When you start it back up again, you should be able to reconnect in a few seconds.\n<\/p><\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener noreferrer\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/8053\/aws-ec2-instance-hibernation-can-speed-up-startup-times-and-save-you-money\/\" target=\"_blank\" rel=\"noopener noreferrer\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#AWS EC2 Instance Hibernation Can Speed Up Startup Times and Save You Money \u2013 CloudSavvy IT&#8221; If you\u2019re frequently stopping and restarting your EC2 instances, hibernation can save you money\u2014It allows you to pause your instance like a virtual machine and restart it at another time, which can be used to drastically speed up loading&#8230;<\/p>\n","protected":false},"author":1,"featured_media":116400,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/06\/e601b806.png","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-116399","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/116399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=116399"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/116399\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/116400"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=116399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=116399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=116399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}