pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: knizhnik (@knizhnik) <noreply+knizhnik@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] PR #86: Ivf index prefetch
Date: Wed, 12 Apr 2023 11:11:08 +0000
Message-ID: <gh-pgvector-pgvector-86-c1505088564@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-86@github.com>
References: <gh-pgvector-pgvector-86@github.com>

> Hi @knizhnik, thanks for the PR, and sorry for the delay. Will dig into this and see how the different aspects affect performance. If you have any benchmarks, please share.

Hi @ankane !
Prefetching is most critical when working set doesn't fir in memory (neither in shared buffers, neither in file system cache).
I am adopting pgvector extension for Neon (https://neon.tech/) - it is serverless Postgres with separated compute and storage.
In this case time of roundrip between compute and pageserver is very critical. In AWS if both compute and paeserver are located in the same AZ it is about 0.2msec. In this case prefetcing of pages in ivf_index allows to increase speed about 7 times -   5198msec vs. 777 msec for [GIST](http://corpus-texmex.irisa.fr/) with 1M records each with 960 dimensions from  https://github.com/erikbern/ann-benchmarks. Unfortunately it is still ~30 times slower comparing with case when all data fits in shared buffers (23msec).


view thread (11+ messages)  latest in thread

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