Commit Graph

437 Commits

Author SHA1 Message Date
sre-ci-robot
6fa6e2f978 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-08-21 12:00:50 +00:00
sre-ci-robot
aaaffc6d53 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-08-15 12:01:10 +00:00
sre-ci-robot
6f3fcdc810 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-08-14 00:01:57 +00:00
sre-ci-robot
9abc0265c4 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-08-13 12:00:40 +00:00
sre-ci-robot
a7f7d911cf Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-08-02 12:00:48 +00:00
AnthonyTsu1984
c5da4fa094
doc: Update the description about hybrid search in README.md (#34941)
Signed-off-by: AnthonyTsu1984 <115786031+AnthonyTsu1984@users.noreply.github.com>
2024-07-24 10:17:44 +08:00
sre-ci-robot
7464ae0f2b Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-07-23 12:00:54 +00:00
sre-ci-robot
1fd477d145 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-07-17 12:00:48 +00:00
sre-ci-robot
9000c29dcd Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-07-16 12:02:21 +00:00
sre-ci-robot
2f70bbed88 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-07-10 00:01:19 +00:00
Dan Dascalescu
7cac20f836
doc: Update # of GitHub stars in README.md (#33577)
The # of stars for https://github.com/milvus-io/milvus/ is over 27k now,
though https://zilliz.com/what-is-milvus links to
https://github.com/zilliztech, and [the fork
there](https://github.com/zilliztech/milvus) has only 23 stars.
2024-07-05 14:40:10 +08:00
sre-ci-robot
006f75304a Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-06-26 12:01:23 +00:00
sre-ci-robot
e1b64e2318 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-06-22 12:00:53 +00:00
sre-ci-robot
74186091d4 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-06-18 12:00:57 +00:00
sre-ci-robot
88cca9d90f Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-06-17 12:00:53 +00:00
sre-ci-robot
f3e4cb0de9 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-06-14 00:01:27 +00:00
sre-ci-robot
64f673cb4e Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-06-11 12:01:03 +00:00
sre-ci-robot
23dedc2cbf Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-05-30 12:01:00 +00:00
sre-ci-robot
371c2d8826 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-05-28 12:00:44 +00:00
Francis
b138ae742d
fix: docs for python3 and conan (#32656)
Conan 1.x is broken for Python 3.12, since imp is deprecated in favour
of importlib, removed in 3.12.

https://github.com/milvus-io/milvus/issues/32655

Signed-off-by: light-city <455954986@qq.com>
2024-05-28 14:35:42 +08:00
sre-ci-robot
036b68e710 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-05-28 00:01:18 +00:00
shaoting-huang
de7901121f
Upgrade go from 1.20 to 1.21 (#33047)
Signed-off-by: shaoting-huang [shaoting-huang@zilliz.com]

issue: https://github.com/milvus-io/milvus/issues/32982

# Background
Go 1.21 introduces several improvements and changes over Go 1.20, which
is quite stable now. According to
[Go 1.21 Release Notes](https://tip.golang.org/doc/go1.21), the big
difference of Go 1.21 is enabling Profile-Guided Optimization by
default, which can improve performance by around 2-14%. Here are the
summary steps of PGO:
1. Build Initial Binary (Without PGO)
2. Deploying the Production Environment
3. Run the program and collect Performance Analysis Data (CPU pprof)
4. Analyze the Collected Data and Select a Performance Profile for PGO
5. Place the Performance Analysis File in the Main Package Directory and
Name It default.pgo
6. go build Detects the default.pgo File and Enables PGO
7. Build and Release the Updated Binary (With PGO)
8. Iterate and Repeat the Above Steps
<img width="657" alt="Screenshot 2024-05-14 at 15 57 01"
src="https://github.com/milvus-io/milvus/assets/167743503/b08d4300-0be1-44dc-801f-ce681dabc581">

# What does this PR do
There are three experiments, search benchmark by Zilliz test platform,
search benchmark by open-source
[VectorDBBench](https://github.com/zilliztech/VectorDBBench?tab=readme-ov-file),
and search benchmark with PGO. We do both search benchmarks by Zilliz
test platform and by VectorDBBench to reduce reliance on a single
experimental result. Besides, we validate the performance enhancement
with PGO.

## Search Benchmark Report by Zilliz Test Platform
An upgrade to Go 1.21 was conducted on a Milvus Standalone server,
equipped with 16 CPUs and 64GB of memory. The search performance was
evaluated using a 1 million entry local dataset with an L2 metric type
in a 768-dimensional space. The system was tested for concurrent
searches with 50 concurrent tasks for 1 hour, each with a 20-second
interval. The reason for using one server rather than two servers to
compare is to guarantee the same data source and same segment state
after compaction.

Test Sequence:
1. Go 1.20 Initial Run: Insert data, build index, load index, and
search.
2. Go 1.20 Rebuild: Rebuild the index with the same dataset, load index,
and search.
3. Go 1.21 Load: Upload to Go 1.21 within the server. Then load the
index from the second run, and search.
4. Go 1.21 Rebuild: Rebuild the index with the same dataset, load index,
and search.

Search Metrics: 
| Metric | Go 1.20 | Go 1.20 Rebuild Index | Go 1.21 | Go 1.21 Rebuild
Index |

|----------------------------|------------------|-----------------|------------------|-----------------|
| `search requests` | 10,942,683 | 16,131,726 | 16,200,887 | 16,331,052
|
| `search fails` | 0 | 0 | 0 | 0 |
| `search RT_avg` (ms) | 16.44 | 11.15 | 11.11 | 11.02 |
| `search RT_min` (ms) | 1.30 | 1.28 | 1.31 | 1.26 |
| `search RT_max` (ms) | 446.61 | 233.22 | 235.90 | 147.93 |
| `search TP50` (ms) | 11.74 | 10.46 | 10.43 | 10.35 |
| `search TP99` (ms) | 92.30 | 25.76 | 25.36 | 25.23 |
| `search RPS` | 3,039 | 4,481 | 4,500 | 4,536 |

### Key Findings
The benchmark tests reveal that the index build time with Go 1.20 at
340.39 ms and Go 1.21 at 337.60 ms demonstrated negligible performance
variance in index construction. However, Go 1.21 offers slightly better
performance in search operations compared to Go 1.20, with improvements
in handling concurrent tasks and reducing response times.

## Search Benchmark Report By VectorDb Bench
Follow
[VectorDBBench](https://github.com/zilliztech/VectorDBBench?tab=readme-ov-file)
to create a VectorDb Bench test for Go 1.20 and Go 1.21. We test the
search performance with Go 1.20 and Go 1.21 (without PGO) on the Milvus
Standalone system. The tests were conducted using the Cohere dataset
with 1 million entries in a 768-dimensional space, utilizing the COSINE
metric type.

Search Metrics: 
Metric | Go 1.20 | Go 1.21 without PGO
-- | -- | --
Load Duration (seconds) | 1195.95 | 976.37
Queries Per Second (QPS) | 841.62 | 875.89
99th Percentile Serial Latency (seconds) | 0.0047 | 0.0076
Recall | 0.9487 | 0.9489

### Key Findings
Go 1.21 indicates faster index loading times and larger search QPS
handling.

## PGO Performance Test
Milvus has already added
[net/http/pprof](https://pkg.go.dev/net/http/pprof) in the metrics. So
we can curl the CPU profile directly by running
`curl -o default.pgo
"http://${MILVUS_SERVER_IP}:${MILVUS_SERVER_PORT}/debug/pprof/profile?seconds=${TIME_SECOND}"`
to collect the profile as the default.pgo during the first search. Then
I build Milvus with PGO and use the same index to run the search again.
The result is as below:

Search Metrics
| Metric | Go 1.21 Without PGO | Go 1.21 With PGO | Change (%) |

|---------------------------------------------|------------------|-----------------|------------|
| `search Requests` | 2,644,583 | 2,837,726 | +7.30% |
| `search Fails` | 0 | 0 | N/A |
| `search RT_avg` (ms) | 11.34 | 10.57 | -6.78% |
| `search RT_min` (ms) | 1.39 | 1.32 | -5.18% |
| `search RT_max` (ms) | 349.72 | 143.72 | -58.91% |
| `search TP50` (ms) | 10.57 | 9.93 | -6.05% |
| `search TP99` (ms) | 26.14 | 24.16 | -7.56% |
| `search RPS`                 | 4,407       | 4,729       | +7.30%    |

### Key Findings
PGO led to a notable enhancement in search performance, particularly in
reducing the maximum response time by 58% and increasing the search QPS
by 7.3%.

### Further Analysis
Generate a diff flame graphs between two CPU profiles by running `go
tool pprof -http=:8000 -diff_base nopgo.pgo pgo.pgo -normalize`

<img width="1894" alt="goprofiling"
src="https://github.com/milvus-io/milvus/assets/167743503/ab9e91eb-95c7-4963-acd9-d1c3c73ee010">
Further insight of HnswIndexNode and Milvus Search Handler
<img width="1906" alt="hnsw"
src="https://github.com/milvus-io/milvus/assets/167743503/a04cf4a0-7c97-4451-b3cf-98afc20a0b05">
<img width="1873" alt="search_handler"
src="https://github.com/milvus-io/milvus/assets/167743503/5f4d3982-18dd-4115-8e76-460f7f534c7f">

After applying PGO to the Milvus server, the CPU utilization of the
faiss::fvec_L2 function has decreased. This optimization significantly
enhances the performance of the
[HnswIndexNode::Search::searchKnn](e0c9c41aa2/src/index/hnsw/hnsw.cc (L203))
method, which is frequently invoked by Knowhere during high-concurrency
searches. As the explanation from Go release notes, the function might
be more aggressively inlined by Go compiler during the second build with
the CPU profiling collected from the first run. As a result, the search
handler efficiency within Milvus DataNode has improved, allowing the
server to process a higher number of search queries per second (QPS).



# Conclusion
The combination of Go 1.21 and PGO has led to substantial enhancements
in search performance for Milvus server, particularly in terms of search
QPS and response times, making it more efficient for handling
high-concurrency search operations.

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2024-05-22 13:21:39 +08:00
Xiaofan
5cc38aa9f8
Update README.md 2024-05-18 22:23:00 +08:00
Xiaofan
5e6da3e994
Update README.md 2024-05-18 22:22:30 +08:00
sre-ci-robot
c81be9ed70 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-05-17 12:00:59 +00:00
Yinzuo Jiang
2cc50d80a3
fix: add openblas in install_deps.sh (#33065)
Install openblas using apt or yum in scripts/install_deps.sh, update
documentations and fix some typos related to build and installation.

issue: #33056, #33066

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-05-17 14:53:37 +08:00
sre-ci-robot
5b27a0cd2c Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-05-16 12:01:03 +00:00
sre-ci-robot
9a56cba7af Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-05-15 12:00:50 +00:00
sre-ci-robot
4577394f4f Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-05-10 12:01:00 +00:00
sre-ci-robot
5037497929 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-05-08 12:00:53 +00:00
sre-ci-robot
84a14fa8dc Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-04-29 00:01:15 +00:00
sre-ci-robot
c080dc1675 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-04-26 12:00:54 +00:00
sre-ci-robot
ad5a49e6cc Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-04-22 12:00:56 +00:00
sre-ci-robot
f0f2f11189 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-04-17 00:01:28 +00:00
Xiaofan
e26cc9bfb5
Update README.md 2024-04-14 16:29:51 -07:00
sre-ci-robot
ea624e143d Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-04-07 00:01:27 +00:00
sre-ci-robot
9243e6087e Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-03-26 00:01:16 +00:00
Xiaofan
19ee8810e8
Update README.md 2024-03-25 12:35:11 -07:00
sre-ci-robot
6bb654f23f Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-03-25 12:00:51 +00:00
sre-ci-robot
42f2425822 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-03-24 00:01:15 +00:00
sre-ci-robot
d4917b7d51 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-03-20 12:01:08 +00:00
sre-ci-robot
3c9ffdedf3 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-03-05 12:00:52 +00:00
sre-ci-robot
095cdbed59 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-02-28 12:01:10 +00:00
sre-ci-robot
bea4c3a418 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-02-26 12:00:49 +00:00
sre-ci-robot
58260864b5 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-02-23 12:00:50 +00:00
sre-ci-robot
4a1d562d4a Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-02-20 12:01:11 +00:00
sre-ci-robot
75a1610f0b Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-02-19 12:00:49 +00:00
sre-ci-robot
c7cf7c8cb5 Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-02-02 12:00:50 +00:00
sre-ci-robot
c3c9dcdc2b Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2024-01-26 12:00:52 +00:00
Xiaofan
ea44277961
Update README.md 2024-01-25 16:51:02 +08:00