From: crbsram (@crbsram) <noreply+crbsram@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #766: High LWLock Contention During Concurrent HNSW Index Scans
Date: Sat, 22 Feb 2025 05:05:10 +0000
Message-ID: <gh-pgvector-pgvector-766-c2676018689@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-766@github.com>
References: <gh-pgvector-pgvector-766@github.com>
> I've made a few attempts to reproduce this. I can replicate the high LWLock:LockManager waits, but only with CPU Saturation. LWLock waits are worse when you have high efc, low efs and a small dimension (I tested with the bigann dataset, 10m records, dimensions 128). I curious why are you using such a large efc when you are only using efs of >= 10. A smaller efc would provide a faster index build and should provide close to the same recall.
>
> FYI, my most reset test was on a r5.8xlarge, pg 17.3.
It is interesting to see the same reproducible in pg17.3
We are using pgvector with 512 dimension with default settings. we have not experienced it.
Ours running in a bare metal machine with 512GBRAM with NVMeSSD disks and 64 core processor on RHEL 9.
Indexing using HNSW.
We are not observing the same with 30 concurrent sessions. (the sessions are managed by connection pooler by the App layer)
The original writers of this library has to check on this, whether this is should be fixed and a new patching to be released or not to mitigate this shared lock.
Thanks
C.R.Bala