You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/mongodb/vcore/compute-storage.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.author: nlarin
7
7
ms.service: cosmos-db
8
8
ms.subservice: mongodb-vcore
9
9
ms.topic: conceptual
10
-
ms.date: 06/30/2024
10
+
ms.date: 07/07/2024
11
11
---
12
12
13
13
# Compute and storage configurations for Azure Cosmos DB for MongoDB vCore clusters
@@ -77,7 +77,7 @@ For instance, if you need 8 TiB of storage per shard or more, make sure you sele
77
77
78
78
### Working set and memory considerations
79
79
80
-
In MongoDB, *the working set* refers to the portion of your data that is frequently accessed and used by your applications. It includes both the data and the indexes that are regularly read or written to during the application's typical operations. The concept of a working set is important for performance optimization because MongoDB, like many databases, performs best when the working set fits in RAM.
80
+
In Azure Cosmos DB for MongoDB vCore, *the working set* refers to the portion of your data that is frequently accessed and used by your applications. It includes both the data and the indexes that are regularly read or written to during the application's typical operations. The concept of a working set is important for performance optimization because MongoDB, like many databases, performs best when the working set fits in RAM.
81
81
82
82
To define and understand your MongoDB database working set, consider the following components:
83
83
@@ -89,7 +89,7 @@ By keeping the working set in RAM, you can minimize slower disk I/O operations,
89
89
90
90
### Choosing optimal configuration for a workload
91
91
92
-
Determining the right compute and storage configuration for your MongoDB workload involves evaluating several factors related to your application's requirements and usage patterns. The key steps and considerations to determine the optimal configuration include:
92
+
Determining the right compute and storage configuration for your Azure Cosmos DB for MongoDB vCore workload involves evaluating several factors related to your application's requirements and usage patterns. The key steps and considerations to determine the optimal configuration include:
93
93
94
94
1.**Understand your workload**
95
95
-**Data volume**: Estimate the total size of your data, including indexes.
@@ -98,7 +98,7 @@ Determining the right compute and storage configuration for your MongoDB workloa
98
98
-**Concurrency**: Assess the number of concurrent operations your database needs to handle.
99
99
100
100
2.**Monitor current performance**
101
-
-**Resource utilization**: Use MongoDB monitoring tools to track CPU, memory, disk I/O, and network usage before you move your MongoDB workload to Azure and [monitoring metrics](./how-to-monitor-diagnostics-logs.md) and MongoDB monitoring tools once you start running your MongoDB workload on an Azure Cosmos DB for MongoDB vCore cluster.
101
+
-**Resource utilization**: Use monitoring tools to track CPU, memory, disk I/O, and network usage before you move your workload to Azure and [monitoring metrics](./how-to-monitor-diagnostics-logs.md) once you start running your MongoDB workload on an Azure Cosmos DB for MongoDB vCore cluster.
102
102
-**Performance metrics**: Monitor key performance metrics such as latency, throughput, and cache hit ratios.
103
103
-**Bottlenecks**: Identify any existing performance bottlenecks, such as high CPU usage, memory pressure, or slow disk I/O.
104
104
@@ -107,38 +107,38 @@ Determining the right compute and storage configuration for your MongoDB workloa
107
107
-**CPU**: Choose a CPU configuration that can handle your query load and concurrency requirements. CPU-intensive workloads may require more cores. Use 'CPU percent' metric with 'Max' aggregation on your Azure Cosmos DB for MongoDB vCore cluster to see historical compute usage patterns.
108
108
-**Storage IOPS**: Select storage with sufficient IOPS to handle your read and write operations. Use 'IOPS' metric with 'Max' aggregation on your cluster to see historical storage IOPS usage.
109
109
-**Network**: Ensure adequate network bandwidth to handle data transfer between your application and the database, especially for distributed setups. Make sure you configured host for your MongoDB application to support [accelerated networking](../../../virtual-network/accelerated-networking-overview.md) technologies such as SR-IOV.
110
-
110
+
111
111
4.**Scale appropriately**
112
112
-**Vertical scaling**: Scale compute / RAM up and down and scale storage up.
113
-
- Compute: Increase the vCore / RAM on a cluster if your workload requires temporary increase or is often crossing over 90% of CPU utilization for prolonged periods.
114
-
- Make sure you have appropriate data retention in your MongoDB database. Retention allows you to avoid unnecessary storage use. Monitor storage usage by setting alerts on the 'Storage percent' and/or 'Storage used' metrics with 'Max' aggregation. Consider increase storage as your workload size crosses 70% usage.
115
-
-**Horizontal scaling**: Consider using multiple shards for your cluster to distribute your data across multiple MongoDB nodes for performance gains and better capacity management as your workload grows. This is especially useful for large datasets (over 2-4 TiB) and high-throughput applications.
116
-
117
-
6.**Test and iterate**
113
+
- Compute: Increase the vCore / RAM on a cluster if your workload requires temporary increase or is often crossing over 70% of CPU utilization for prolonged periods.
114
+
- Make sure you have appropriate data retention in your Azure Cosmos DB for MongoDB vCore database. Retention allows you to avoid unnecessary storage use. Monitor storage usage by setting alerts on the 'Storage percent' and/or 'Storage used' metrics with 'Max' aggregation. Consider increase storage as your workload size crosses 70% usage.
115
+
-**Horizontal scaling**: Consider using multiple shards for your cluster to distribute your data across multiple Azure Cosmos DB for MongoDB vCore nodes for performance gains and better capacity management as your workload grows. This is especially useful for large datasets (over 2-4 TiB) and high-throughput applications.
116
+
117
+
5.**Test and iterate**
118
118
-**Benchmarking**: Perform measurement for the most frequently used queries with different configurations to determine the impact on performance. Use CPU/RAM and IOPS metrics and application-level benchmarking.
119
119
-**Load testing**: Conduct load testing to simulate production workloads and validate the performance of your chosen configuration.
120
-
-**Continuous monitoring**: Continuously monitor your MongoDB deployment and adjust resources as needed based on changing workloads and usage patterns.
121
-
120
+
-**Continuous monitoring**: Continuously monitor your Azure Cosmos DB for MongoDB vCore deployment and adjust resources as needed based on changing workloads and usage patterns.
121
+
122
122
By systematically evaluating these factors and continuously monitoring and adjusting your configuration, you can ensure that your MongoDB deployment is well-optimized for your specific workload.
123
123
124
124
### Considerations for storage
125
125
126
-
Deciding on the appropriate storage size for your MongoDB workload involves several considerations to ensure optimal performance and scalability. Here are considerations for the storage size in Azure Cosmos DB for MongoDB vCore:
126
+
Deciding on the appropriate storage size for your workload involves several considerations to ensure optimal performance and scalability. Here are considerations for the storage size in Azure Cosmos DB for MongoDB vCore:
127
127
128
128
1.**Estimate data size:**
129
-
- Calculate the expected size of your MongoDB data. Consider:
130
-
-**Current data size:** If migrating from an existing MongoDB instance.
129
+
- Calculate the expected size of your Azure Cosmos DB for MongoDB vCore data. Consider:
130
+
-**Current data size:** If migrating from an existing database.
131
131
-**Growth rate:** Estimate how much data will be added over time.
132
132
-**Document size and structure:** Understand your data schema and document sizes, as they affect storage efficiency.
133
133
134
134
2.**Factor in indexes:**
135
-
- MongoDB uses **[indexes](./indexing.md)** for efficient querying. Indexes consume extra disk space.
135
+
-Azure Cosmos DB for MongoDB vCore uses **[indexes](./indexing.md)** for efficient querying. Indexes consume extra disk space.
136
136
- Estimate the size of indexes based on:
137
137
-**Number of indexes**.
138
138
-**Size of indexed fields**.
139
139
140
140
3.**Performance considerations:**
141
-
- Disk performance impacts MongoDB operations, especially for workloads that can't fit their [working set](#working-set-and-memory-considerations) into RAM. Consider:
141
+
- Disk performance impacts database operations, especially for workloads that can't fit their [working set](#working-set-and-memory-considerations) into RAM. Consider:
142
142
-**I/O throughput:** IOPS, or Input/Output Operations Per Second, is the number of requests that are sent to storage disks in one second. The larger storage size comes with more IOPS. Ensure adequate throughput for read/write operations. Use 'IOPS' metric with 'Max' aggregation to monitor used IOPS on your cluster.
143
143
-**Latency:** Latency is the time it takes an application to receive a single request, send it to storage disks, and send the response to the client. Latency is a critical measure of an application's performance in addition to IOPS and throughput. Latency is largely defined by the type of storage used and storage configuration. In a managed service like Azure Cosmos DB for MongoDB, the fast storage such as Premium SSD disks is used with settings optimized to reduce latency.
0 commit comments