Skip to content

Commit

Permalink
add 2024Jan benchmark (#39)
Browse files Browse the repository at this point in the history
* add 2024Jan benchmark

Signed-off-by: Keming <kemingyang@tensorchord.ai>

* add sidebar

Signed-off-by: Keming <kemingyang@tensorchord.ai>

* Update src/faqs/benchmark.md

Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Signed-off-by: Keming <kemingyang@tensorchord.ai>

* update low precision indexing link

Signed-off-by: Keming <kemingyang@tensorchord.ai>

---------

Signed-off-by: Keming <kemingyang@tensorchord.ai>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
  • Loading branch information
kemingy and VoVAllen authored Feb 19, 2024
1 parent 5e21f72 commit 2df15bb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export default defineConfig({
items: [
// { text: 'pgvecto.rs vs. pgvector', link: '/faqs/comparison-pgvector' },
{ text: 'pgvecto.rs vs. specialized vectordb', link: '/faqs/comparison-with-specialized-vectordb' },
{ text: `benchmark`, link: '/faqs/benchmark' },
]
},
{
Expand Down
21 changes: 21 additions & 0 deletions src/faqs/benchmark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Benchmark

`pgvecto.rs` has been focused on performance from the beginning. We have continuously monitored the performance of `pgvecto.rs` and compared it with other vector search libraries. The following benchmark results are from January 2024.

The test is done on Google Cloud [n2-standard-8](https://cloud.google.com/compute/docs/general-purpose-machines#n2_series) (8 vCPUs, 32 GB RAM) with the `laion-768-5m-ip` dataset.

## `pgvecto.rs` v.s. `pgvector`

With the HNSW index, `pgvecto.rs` can achieve **2.5x** responses per second as `pgvector` can do with a slightly better precision of around 97%. This advantage increases when higher precision is required.

![pgvecto.rs_vs_pgvector](./images/2024Jan_pgvectors_compare.png)

When the `vbase` mode is enabled, `pgvecto.rs` can achieve over **2x** more responses per second compared to `pgvector` on various filter probabilities.

![pgvecto.rs_vs_pgvector_filter](./images/2024Jan_pgvectors_filter_compare.png)

## `pgvecto.rs` with different quantization methods

`pgvecto.rs` supports several [quantization methods](../usage/quantization.md) and different low precision [indexing](../usage/indexing.md). These methods can help to reduce memory usage at different scales. The following figure shows the performance of `pgvecto.rs` with different quantization methods.

![pgvecto.rs_quantization](./images/2024Jan_pgvectors_quantization.png)
Binary file added src/faqs/images/2024Jan_pgvectors_compare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2df15bb

Please sign in to comment.