pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: bantmen (@bantmen) <noreply+bantmen@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #661: IVFFLAT QPS too low
Date: Mon, 26 Aug 2024 22:46:04 +0000
Message-ID: <gh-pgvector-pgvector-661-c2311237800@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-661@github.com>
References: <gh-pgvector-pgvector-661@github.com>

@jkatz Thank you, this is very helpful and your estimates are accurate.

`SHOW shared_buffers;` gives me `5463726`. Assuming that the unit is a 8 kb page, this is 43.7 gb.

I did not expect the IO to be really fast but the 6 mb/s throughput is puzzling to me. I guess this all depends on the physical layout. Let's say that we have 4200 centers and trying to find the 10 closest. I assume that the centroids will most likely be already in memory. That leaves us with 10 sets out of 4200 centers. Let's say that none of them are in memory. In that case, are we not going to have 10 memory seeks and for each of them high throughput sequential reads? Is pgvector not colocating the members of a list physically next to each other?

On that topic, does the index scan only look at the vectors in the index or does it have to fetch the vectors from the table? I am seeing about 43 gb cached in the buffer for the index and basically nothing (just 12 mb) cached for the underlying table. I am assuming that this split is fine if the scan is an index-only scan.





view thread (22+ messages)  latest in thread

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