pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: jkatz (@jkatz) <noreply+jkatz@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: Mon, 28 Oct 2024 13:45:48 +0000
Message-ID: <gh-pgvector-pgvector-700-c2441635653@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-700@github.com>
References: <gh-pgvector-pgvector-700@github.com>

When `m` is `32`, only a small portion of the upper layers of your graph (Layer 1+) will have your index (~3%) - most of the search time will be in Layer 0, and you'll be checking 32 vectors for each node you visit in the graph. With `ef_search` at `40`, let's say you converge with 40 steps (optimistically) so that's 1,280 vectors => 7.5MB of data to potentially load (assuming L1+ is cached in memory).

So on a memory constrained system, you may be constantly swapping out values, thus as @VoVAllen implies, you may need to tweak your IOPS/storage bandwidth to account for this. Additionally (and I want to do some more experimentation on this), you may be able to use huge pages to speed up memory allocation particularly when you're loading from storage.

view thread (8+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-700-c2441635653@github.com>
Permalink:  ../gh-pgvector-pgvector-700-c2441635653@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