Compute node specifications and performance comparison
This topic describes the CU types and number of compute nodes (Query Nodes) in Vector Retrieval Service for Milvus (Milvus) to help you choose instance specifications that meet your business requirements.
CU types
Milvus compute nodes support the following CU types to meet different business scenarios and requirements:
-
Compute-optimized: Suitable for scenarios that require high queries per second (QPS) and low query latency. You can select compute-optimized instances for scenarios with high concurrency, heavy traffic, and low latency requirements, such as search, recommendation systems, generative AI, and chatbots.
Cloud disks on compute-optimized Query Nodes are used to extend the cache. HNSW indexes are loaded into memory by default. Frequently accessed hot data remains in memory, while cold data is loaded from cloud disks into memory on demand for searches. The system automatically manages the cache. You cannot manually configure hot and cold data. For the DiskANN solution used by storage-optimized CUs, see the following sections.
-
Storage-optimized: Suitable for scenarios with large datasets and relatively low requirements for search efficiency. Storage-optimized instances provide 4 times the storage capacity of compute-optimized instances and can store and manage more vector data. Storage-optimized instances also provide strong technical performance to meet the requirements of most scenarios. They are especially suitable for applications such as large-scale unstructured data retrieval, copyright identification, and model data preparation.
ImportantStorage-optimized CUs currently have the following limits:
-
Only horizontal scaling is supported. Vertical scaling is not supported. Carefully confirm the CU specifications before you make a purchase.
-
Only DiskANN indexes are recommended. This index type supports only Float vector data. Supported distance metrics are Euclidean distance (L2), inner product (IP), and cosine similarity (COSINE).
-
Storage capacity comparison
|
CU type |
Index type |
CU specifications |
Reference vector data capacity (based on 128-dimensional SIFT vectors) |
Reference vector data capacity (based on 960-dimensional GIST vectors) |
|
Compute-optimized |
HNSW M:30 efConstruction:360 |
4 vCPU 16 GiB (4 CU) |
16 million |
3 million |
|
8 vCPU 32 GiB (8 CU) |
32 million |
6 million |
||
|
16 vCPU 64 GiB (16 CU) |
64 million |
12 million |
||
|
32 vCPU 128 GiB (32 CU) |
128 million |
24 million |
||
|
Storage-optimized |
DiskANN |
8 vCPU 32 GiB (8 CU) |
120 million |
23 million |
|
16 vCPU 64 GiB (16 CU) |
240 million |
46 million |
||
|
32 vCPU 128 GiB (32 CU) |
480 million |
92 million |
-
The preceding data has been verified through testing and can be used as a reference for capacity planning.
-
The capacity test data contains only primary keys and vector data, with no scalar data. The primary keys are strings converted from integers that increment from zero. Scalar fields are essential in most production scenarios. Because scalar data also consumes storage space, the actual number of vectors that can be stored is lower than the values in the preceding table.
Benchmark environment
The search performance tests in this topic use a single Query Node with the CU specifications shown in the following search performance table. Other service nodes use the minimum specifications listed in the following table.
|
Node type |
Number of nodes |
Specifications per node |
|
Query Node |
1 |
The CU tier matches the following search performance table |
|
Metadata service |
2 |
4 vCPU, 16 GiB |
|
Proxy |
2 |
2 vCPU, 8 GiB |
|
Streaming Node |
2 |
4 vCPU, 16 GiB |
|
Data Node |
1 |
4 vCPU, 16 GiB |
Search performance comparison
|
CU type |
CU specifications |
Index type |
topk=50 |
topk=100 |
topk=250 |
topk=1000 |
||||
|
QPS |
RT_p99 |
QPS |
RT_p99 |
QPS |
RT_p99 |
QPS |
RT_p99 |
|||
|
Compute-optimized |
16 vCPU 64 GiB (16 CU) |
HNSW M:30 efConstruction:360 |
2000 |
< 10 ms |
1200 |
< 10 ms |
550 |
< 15 ms |
150 |
< 30 ms |
|
Storage-optimized |
16 vCPU 64 GiB (16 CU) |
DiskANN |
700 |
< 15 ms |
550 |
< 20 ms |
200 |
< 30 ms |
60 |
< 50 ms |
-
The preceding data is based on tests using the Cohere dataset, which contains 10 million 768-dimensional vectors. Data distribution varies across datasets and affects performance. Therefore, the data is for reference only.
-
RT_p99 is measured by running 1000 queries sequentially and sorting their response times to obtain the 99th percentile.
-
The performance test data contains only primary keys and vector data, with no scalar data. The primary keys are integers that increment from zero. Compute-optimized instances use HNSW indexes, and storage-optimized instances use DiskANN indexes.
-
Milvus periodically optimizes vector indexes in the background. Optimization is typically completed within 3 hours after data writes are complete, at which point the system reaches optimal performance.
Number of compute nodes
Milvus allows you to adjust the number of compute nodes (Query Nodes) from 1 to 50. The supported QPS increases linearly with the number of nodes. More nodes also provide higher service availability. Therefore, we recommend at least 2 nodes for production environments with high availability requirements.
Scenario analysis
Suppose you are building an image search system that contains 20 million images, each represented by a 768-dimensional vector. Your goal is to handle 2000 search requests per second and return the top 100 relevant images within 10 milliseconds. You can evaluate specifications as follows:
-
Evaluate latency: Select a CU type based on your latency requirements. For example, if you require latency below 10 milliseconds, compute-optimized CUs are the only type that can meet this requirement.
-
Consider capacity: Calculate the required number of CUs based on the data volume and vector dimensions. A compute-optimized CU with 16 vCPUs and 64 GiB of memory (16 CU) can handle 12 million 960-dimensional vectors. To accommodate 20 million 768-dimensional vectors, we recommend at least 2 such CUs, for a total of 32 CU.
-
Check throughput: Verify the throughput of each CU at the specified top-k setting. For example, at top-k=100, a compute-optimized CU provides 1200 QPS. To sustain 2000 QPS, you need to double the number of nodes.
For this scenario, we recommend compute-optimized CUs with 4 nodes, each with 16 vCPUs and 64 GiB of memory (16 CU), to meet the performance requirements.