From: michaelbautin (@michaelbautin) <noreply+michaelbautin@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #745: Automate estimation of amount of memory needed for fast HNSW index build
Date: Fri, 24 Jan 2025 20:57:57 +0000
Message-ID: <gh-pgvector-pgvector-745-c2613367672@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-745@github.com>
References: <gh-pgvector-pgvector-745@github.com>
@jkatz Regarding your suggestion in https://github.com/pgvector/pgvector/issues/745#issuecomment-2566121887 -- I don't think the memory usage for HNSW in-memory build part depends on page size at all. I've added a more precise formula in my pull request here: https://github.com/pgvector/pgvector/pull/765. This should give users a very good HNSW build memory estimation, and allow them to set maintenance_work_mem correctly and avoid surprises with index spilling to disk and HNSW build slowdown.