Merge branch 'io_uring' of https://github.com/qdrant/landing_page into io_uring

This commit is contained in:
David Sertic
2023-06-23 10:22:19 +02:00
committed by Andre Bogus
3 changed files with 33 additions and 35 deletions
+6 -34
View File
@@ -121,38 +121,10 @@ entry or setting the value to `false`.
To run the benchmark, use a test instance of Qdrant; if necessary spin up a
docker container and load a snapshot of the collection you want to benchmark
with. You can copy and edit the following bash script to run the benchmark.
```bash
export QDRANT_URL="<qdrant url>"
export COLLECTION="<collection name>"
export CONCURRENCY=4 # or 8
export OVERSAMPLING=1 # or 4
time seq 1000 | xargs -P ${CONCURRENCY} -I {} curl -L -X POST \
"http://${QDRANT_URL}/collections/${COLLECTION}/points/recommend" \
-H 'Content-Type: application/json' --data-raw \
"{ \"limit\": 10, \"positive\": [{}], \"params\": { \"quantization\": \
{ \"rescore\": true, \"oversampling\": ${OVERSAMPLING} } } }" \
-s | jq .status | wc -l
time seq 1000 2000 | xargs -P ${CONCURRENCY} -I {} curl -L -X POST \
"${QDRANT_URL}/collections/${COLLECTION}/points/recommend" \
-H 'Content-Type: application/json' --data-raw \
"{ \"limit\": 10, \"positive\": [{}], \"params\": { \"quantization\": \
{ \"rescore\": true, \"oversampling\": ${OVERSAMPLING} } } }" \
-s | jq .status | wc -l
time seq 2000 3000 | xargs -P ${CONCURRENCY} -I {} curl -L -X POST \
"${QDRANT_URL}/collections/${COLLECTION}/points/recommend" \
-H 'Content-Type: application/json' --data-raw \
"{ \"limit\": 10, \"positive\": [{}], \"params\": { \"quantization\": \
{ \"rescore\": true, \"oversampling\": ${OVERSAMPLING} } } }" \
-s | jq .status | wc -l
```
Run this script with and without enabling `storage.async_scorer` and once. You
can measure IO usage with `iostat` from another console.
with. You can copy and edit our [benchmark script](/articles_data/io_uring/rescore-benchmark.sh)
to run the benchmark. Run the script with and without enabling
`storage.async_scorer` and once. You can measure IO usage with `iostat` from
another console.
For our benchmark, we chose the laion dataset picking 5 million 768d entries.
We enabled scalar quantization + HNSW with m=16 and ef_construct=512.
@@ -212,6 +184,6 @@ Therefore before you roll out io\_uring, perform the above or a similar
benchmark with both mmap and io\_uring and measure both wall time and IOps).
Benchmarks are always highly use-case dependent, so your mileage may vary.
Still, doing that benchmark once is a small price for the possible performance
wins. Also please
[tell us](https://discord.com/channels/907569970500743200/907569971079569410)
wins. Also please
[tell us](https://discord.com/channels/907569970500743200/907569971079569410)
about your benchmark results!
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

@@ -0,0 +1,26 @@
#!/bin/bash
export QDRANT_URL="<qdrant url>"
export COLLECTION="<collection name>"
export CONCURRENCY=4 # or 8
export OVERSAMPLING=1 # or 4
time seq 1000 | xargs -P ${CONCURRENCY} -I {} curl -L -X POST \
"http://${QDRANT_URL}/collections/${COLLECTION}/points/recommend" \
-H 'Content-Type: application/json' --data-raw \
"{ \"limit\": 10, \"positive\": [{}], \"params\": { \"quantization\": \
{ \"rescore\": true, \"oversampling\": ${OVERSAMPLING} } } }" \
-s | jq .status | wc -l
time seq 1000 2000 | xargs -P ${CONCURRENCY} -I {} curl -L -X POST \
"${QDRANT_URL}/collections/${COLLECTION}/points/recommend" \
-H 'Content-Type: application/json' --data-raw \
"{ \"limit\": 10, \"positive\": [{}], \"params\": { \"quantization\": \
{ \"rescore\": true, \"oversampling\": ${OVERSAMPLING} } } }" \
-s | jq .status | wc -l
time seq 2000 3000 | xargs -P ${CONCURRENCY} -I {} curl -L -X POST \
"${QDRANT_URL}/collections/${COLLECTION}/points/recommend" \
-H 'Content-Type: application/json' --data-raw \
"{ \"limit\": 10, \"positive\": [{}], \"params\": { \"quantization\": \
{ \"rescore\": true, \"oversampling\": ${OVERSAMPLING} } } }" \
-s | jq .status | wc -l