{"id":3388,"date":"2021-09-28T10:15:00","date_gmt":"2021-09-28T17:15:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=3388"},"modified":"2021-09-28T10:15:00","modified_gmt":"2021-09-28T17:15:00","slug":"cap-planning-vcore","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/cap-planning-vcore\/","title":{"rendered":"Planning Azure Cosmos DB capacity using vCores, vCPUs, and request rates"},"content":{"rendered":"<p>New customers who migrate NoSQL databases to Azure Cosmos DB are often unsure of how many throughput request units, or RU\/s, to provision for their workload. Determining throughput capacity is an important step &#8211; too little and performance suffers; too much and you&#8217;ll pay for unused capacity.\u00a0 To avoid these challenges, you can use information about your cluster to estimate request units and avoid overprovisioning or overpaying.\u00a0 Here&#8217;s how:<\/p>\n<h4><strong><span style=\"font-size: 14pt;\">1. Use the Azure Cosmos DB capacity calculator<\/span><\/strong><\/h4>\n<p>If you know the typical request rates and request types for the database cluster you already have, then the <a href=\"https:\/\/cosmos.azure.com\/capacitycalculator\/\" target=\"_blank\" rel=\"noopener\">Azure Cosmos DB capacity calculator<\/a> is the best tool for capacity planning. View our guides to capacity planning on <a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/sql\/estimate-ru-with-capacity-planner\" target=\"_blank\" rel=\"noopener\">Azure Cosmos DB Core (SQL) API<\/a> and<a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/mongodb\/estimate-ru-capacity-planner\" target=\"_blank\" rel=\"noopener\">\u00a0API for MongoDB<\/a>.<\/p>\n<h4><strong><span style=\"font-size: 14pt;\">2. Use vCores or vCPUs to estimate throughput capacity<\/span><\/strong><\/h4>\n<p>Not everyone knows request rate information about their cluster. If you are migrating from an existing database cluster, then you probably know how many data-bearing servers you have and how many vCores or vCPUs are running on your data-bearing servers. That is why we have recently released a <a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/convert-vcore-to-request-unit\" target=\"_blank\" rel=\"noopener\">guide to estimate RU\/s using vCores or vCPU information about your existing cluster<\/a>. This guide applies to migrations from a sharded and replicated nonrelational database to Azure Cosmos DB Core (SQL) API or API for MongoDB.<\/p>\n<p>Here is an example of how you can estimate RU\/s from vCores:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/09\/migration_image.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-3450\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/09\/migration_image.png\" alt=\"Estimate request units when migrating your database replica set to Azure Cosmos DB\" width=\"1751\" height=\"621\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/09\/migration_image.png 1751w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/09\/migration_image-300x106.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/09\/migration_image-1024x363.png 1024w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/09\/migration_image-768x272.png 768w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/09\/migration_image-1536x545.png 1536w\" sizes=\"(max-width: 1751px) 100vw, 1751px\" \/><\/a><\/p>\n<p>Suppose that you currently have a database cluster consisting of<\/p>\n<ul>\n<li>A single replica set with a replication factor of\u00a03,<\/li>\n<li>12 vCores in total among all data-bearing servers in that replica set<\/li>\n<\/ul>\n<p>Then depending on which Azure Cosmos DB API you plan to migrate to, a good ballpark estimate of RU\/s is<\/p>\n<p><span style=\"font-family: 'times new roman', times, serif;\"><em>Provisioned RU\/s, SQL API = (600 RU\/s\/vCore) * (12 vCores) \/ (3 replicas) = 2,400 RU\/s<\/em><\/span><\/p>\n<p><span style=\"font-family: 'times new roman', times, serif;\"><em>Provisioned RU\/s, API for MongoDB = (1,000 RU\/s\/vCore) * (12 vCores) \/ (3 replicas) = 4,000 RU\/s<\/em><\/span><\/p>\n<p>Where<\/p>\n<ul>\n<li>600 RU\/s\/vCore is the rough vCores-to-request-units conversion factor for migrations to Azure Cosmos DB SQL API<\/li>\n<li>1000 RU\/s\/vCore is the rough vCores-to-request-units conversion factor for migrations to Azure Cosmos DB API for MongoDB<\/li>\n<li>A roughly even balance between read and write operations is assumed<\/li>\n<\/ul>\n<p>For more information and examples of capacity planning calculations, visit our <a href=\"https:\/\/cosmos.azure.com\/capacitycalculator\/\" target=\"_blank\" rel=\"noopener\">Azure Cosmos DB capacity calculator<\/a> and <a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/convert-vcore-to-request-unit\" target=\"_blank\" rel=\"noopener\">vCores\/vCPUs-to-RU\/s conversion guide<\/a>!<\/p>\n<h5><\/h5>\n<h5>About Azure Cosmos DB<\/h5>\n<p>Azure Cosmos DB is a fully managed cloud NoSQL database service for modern app development. <a href=\"https:\/\/azure.microsoft.com\/services\/cosmos-db\/#overview\" target=\"_blank\" rel=\"noopener\">Get started free<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to use the information you know about your database clusters to estimate the provisioned throughput request units you&#8217;ll need when migrating NoSQL data to Azure Cosmos DB and avoid over-provisioning or overpaying<\/p>\n","protected":false},"author":20288,"featured_media":3450,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[15,14],"tags":[],"class_list":["post-3388","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mongodb-api","category-core-sql-api"],"acf":[],"blog_post_summary":"<p>How to use the information you know about your database clusters to estimate the provisioned throughput request units you&#8217;ll need when migrating NoSQL data to Azure Cosmos DB and avoid over-provisioning or overpaying<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/3388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/users\/20288"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/comments?post=3388"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/3388\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/3450"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=3388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=3388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=3388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}