{"id":267,"date":"2021-01-18T00:25:18","date_gmt":"2021-01-18T00:25:18","guid":{"rendered":"https:\/\/adrianotanaka.com.br\/?p=267"},"modified":"2021-02-09T14:59:46","modified_gmt":"2021-02-09T14:59:46","slug":"oci-cloud-advisor-cost-management","status":"publish","type":"post","link":"https:\/\/adrianotanaka.com.br\/index.php\/2021\/01\/18\/oci-cloud-advisor-cost-management\/","title":{"rendered":"OCI Cloud Advisor &#8211; Cost Management"},"content":{"rendered":"\n<p>Um dos recursos mais legais do OCI foi a cria\u00e7\u00e3o do Cloud Advisor que \u00e9 dividido entre duas fun\u00e7\u00f5es principais:<\/p>\n\n\n\n<p>Cost Management e Cloud Guard, a primeira funcionalidade \u00e9 respons\u00e1vel por analisar o seu ambiente de cloud e propor melhorias afim de economizar os cr\u00e9ditos e  o Cloud Guard \u00e9 respons\u00e1vel por analisar o ambiente, propor e corrigir assuntos relacionados \u00e0 seguran\u00e7a(um post sobre ele vai sair nos pr\u00f3ximos dias).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Como funciona<\/h2>\n\n\n\n<p>O Cloud Advisor analisa seu ambiente uma vez por dia e no final de sete dias, come\u00e7a a  gerar as estimativas, abaixo reproduzo como ele faz os c\u00e1lculos para isso:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Downsize underutilized compute instances<\/strong><br>For the resource that the recommendation applies to,\u00a0Cloud Advisor\u00a0subtracts the recommended OCPU from the current OCPU. It then multiplies the result by the billed usage and by the unit price. That value is divided by the current OCPU.<br><br><strong>Resize underutilized\u00a0Autonomous Data Warehouse\u00a0and\u00a0Autonomous Transaction Processing\u00a0databases<\/strong><br>For the resource&#8217;s compute costs,\u00a0Cloud Advisor\u00a0multiplies the billed usage by the unit price, and then divides that value in half.<br><br><strong>Attach or delete orphaned block volumes and boot volumes<\/strong><br>Cloud Advisor\u00a0estimates how much money would be saved by deleting the unattached block volume or boot volume. For the resource that the recommendation applies to,\u00a0Cloud Advisor\u00a0uses the billed usage for performance units and storage.<br><br><strong>Enable Object Lifecycle Management<\/strong><br>For each\u00a0Object Storage\u00a0bucket,\u00a0Cloud Advisor\u00a0multiplies the billed usage by the unit price and then takes 45 percent of that value.\u00a0Cloud Advisor\u00a0uses 45 percent because overall customer trends indicate that over time, buckets with lifecycle management enabled trend towards a balance of 50 percent archive storage and 50 percent standard storage. Therefore,\u00a0Cloud Advisor\u00a0estimates that the current standard storage for a bucket will, over time, convert to a balance of 50 percent archive storage and 50 percent standard storage.<br>The actual ratio varies based on the bucket&#8217;s purpose. Although\u00a0Cloud Advisor\u00a0estimates a 45 percent savings, the savings could be as high as 90 percent or as low as 0.<br>You can also use Object Lifecycle Management to:<br>delete all objects in a bucket or objects that match the names filters that you specify, <br>or<br>delete uncommitted or failed multipart uploads.<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Acessando<\/h2>\n\n\n\n<p>O Cloud advisor pode ser acessado no caminho Governance and Administration no menu lateral ou usando a barra de pesquisa no topo da p\u00e1gina, ao acessar o servi\u00e7o pela primeira vez, uma mensagem para ativar vai ser apresentada, caso j\u00e1 tenha ativado, uma tela com um resumo do seu ambiente vai ser exibida:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"502\" height=\"417\" src=\"https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-29.png\" alt=\"\" class=\"wp-image-270\" srcset=\"https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-29.png 502w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-29-300x249.png 300w\" sizes=\"auto, (max-width: 502px) 100vw, 502px\" \/><\/figure><\/div>\n\n\n\n<p>Como pode ser visto, nesse ambiente ele estima uma diminui\u00e7\u00e3o de aproximadamente 329 reais, apesar que na documenta\u00e7\u00e3o \u00e9 falado que esse valor deveria ser em d\u00f3lares.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Detalhes<\/h2>\n\n\n\n<p>No lado, esquerdo, indo em <strong>Recommendations<\/strong>, voc\u00ea vai ver o que ele indica como forma de economizar:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1022\" height=\"375\" src=\"https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-30.png\" alt=\"\" class=\"wp-image-271\" srcset=\"https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-30.png 1022w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-30-300x110.png 300w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-30-768x282.png 768w\" sizes=\"auto, (max-width: 1022px) 100vw, 1022px\" \/><\/figure><\/div>\n\n\n\n<p>Nessa tela somos apresentados aos recursos que ele analisou(Recommendations), quantos que ainda faltam ser implementados(Pending), qual a estimativa de economia caso aplique o que ele sugere (Estimated Savings), entre outros detalhes.<\/p>\n\n\n\n<p>No nosso caso, a principal economia est\u00e1 na parte de block volume, clicando nessa op\u00e7\u00e3o, podemos ver que existem discos que est\u00e3o criados mas n\u00e3o est\u00e3o em uso, assim como tamb\u00e9m ver qual a estimativa de economia caso os recursos sejam deletados(ou colocados em uso):<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"332\" src=\"https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-31-1024x332.png\" alt=\"\" class=\"wp-image-272\" srcset=\"https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-31-1024x332.png 1024w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-31-300x97.png 300w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-31-768x249.png 768w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-31.png 1240w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>Tamb\u00e9m podemos ver quando aceitamos alguma das sugest\u00f5es na aba <strong>Implemented<\/strong>:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"207\" src=\"https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-32-1024x207.png\" alt=\"\" class=\"wp-image-273\" srcset=\"https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-32-1024x207.png 1024w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-32-300x61.png 300w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-32-768x155.png 768w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-32.png 1252w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>Quando temos uma recomenda\u00e7\u00e3o do tipo <strong>Downsize underutilized compute instances<\/strong>,  as coisas ficam bem interessantes, por padr\u00e3o, a Oracle aponta inst\u00e2ncias cujo o uso m\u00e9dio de CPU seja menor que 20% e o pico de mem\u00f3ria n\u00e3o tenha passado de 40%, o requisito para que essa an\u00e1lise funcione \u00e9 que voc\u00ea tenha ativado a op\u00e7\u00e3o de monitoramento da VM (que j\u00e1 vem ativa por padr\u00e3o ao criar pelo dashboard). <\/p>\n\n\n\n<p>Como pode ser visto, ele nos recomenda o ajuste de Shape, saindo de um StandardE2.4 para StandardE2.2:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"55\" src=\"https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-33-1024x55.png\" alt=\"\" class=\"wp-image-275\" srcset=\"https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-33-1024x55.png 1024w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-33-300x16.png 300w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-33-768x41.png 768w, https:\/\/adrianotanaka.com.br\/wp-content\/uploads\/2021\/01\/image-33.png 1202w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Espero que tenham gostado dessa breve explica\u00e7\u00e3o do Cloud Advisor, caso tenham duvidas, podem me contatar.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Um dos recursos mais legais do OCI foi a cria\u00e7\u00e3o do Cloud Advisor que \u00e9 dividido entre duas fun\u00e7\u00f5es principais: Cost Management e Cloud Guard, a primeira funcionalidade \u00e9 respons\u00e1vel por analisar o seu ambiente de cloud e propor melhorias afim de economizar os cr\u00e9ditos e o Cloud Guard \u00e9 respons\u00e1vel por analisar o ambiente, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":279,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"material-hide-sections":[],"footnotes":""},"categories":[8,6,1],"tags":[29],"class_list":["post-267","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oci","category-oracle","category-uncategorized","tag-cloud"],"_links":{"self":[{"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/posts\/267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=267"}],"version-history":[{"count":8,"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/posts\/267\/revisions"}],"predecessor-version":[{"id":281,"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/posts\/267\/revisions\/281"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/media\/279"}],"wp:attachment":[{"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrianotanaka.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}