pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #700: HNSW QPS Degradation as Index Size Grows Beyond Memory
Date: Thu, 06 Mar 2025 23:01:18 +0000
Message-ID: <gh-pgvector-pgvector-700-c2705130148@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-700@github.com>
References: <gh-pgvector-pgvector-700@github.com>

Hi @wahajali, thanks for sharing these numbers.

The disk speed should affect the difference (local NVMe should perform better than SAN).

My general recommendation for users is:

1. Use the default `m` of 16, unless seeing poor recall, as this significantly affects query performance
2. Use [half-precision vectors](https://github.com/pgvector/pgvector?tab=readme-ov-file#half-precision-vectors) or [binary quantization with reranking](https://github.com/pgvector/pgvector?tab=readme-ov-file#binary-quantization) so more of the dataset fits into memory

For RDS specifically, you can:

1. Use a memory optimized instance type (I'd recommend this in general for larger databases, even without vectors)
2. Try optimized reads ([this article](https://aws.amazon.com/blogs/database/accelerate-generative-ai-workloads-on-amazon-aurora-with-optim...) talks about the difference on Aurora, but also looks like it's available on RDS)

I'm not sure there's anything for pgvector to do here, so closing this out, but happy to review any PRs that are able to improve performance here.

view thread (8+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-700-c2705130148@github.com>
Permalink:  ../gh-pgvector-pgvector-700-c2705130148@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox