pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #720: Can the performance of index creation be improved?
5+ messages / 3 participants
[nested] [flat]

* [pgvector/pgvector] issue #720: Can the performance of index creation be improved?
@ 2024-11-28 08:17  "frg01 (@frg01)" <noreply+frg01@github.com>
  0 siblings, 0 replies; 5+ messages in thread

From: frg01 (@frg01) @ 2024-11-28 08:17 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

When will it be possible to parallelize the work of creating an index? Now only one logical processor will be used to create the index.

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #720: Can the performance of index creation be improved?
@ 2024-11-28 12:48  "lfloeer (@lfloeer)" <noreply+lfloeer@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: lfloeer (@lfloeer) @ 2024-11-28 12:48 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Did increasing the maintenance workers help to speed up the index creation?
https://github.com/pgvector/pgvector?tab=readme-ov-file#index-build-time

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #720: Can the performance of index creation be improved?
@ 2024-11-28 13:13  "frg01 (@frg01)" <noreply+frg01@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: frg01 (@frg01) @ 2024-11-28 13:13 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

> Did increasing the maintenance workers help to speed up the index creation? https://github.com/pgvector/pgvector?tab=readme-ov-file#index-build-time

I learned about the usage of this parameter and practiced it. as follows:
```
SET maintenance_work_mem = '32GB';

SET max_parallel_maintenance_workers = 32;

CREATE INDEX ON pg_vector_collection USING hnsw (embedding vector_cosine_ops) WITH (m = 16, ef_construction = 64);
```


Judging from the CPU situation, it is still only a single postgres process that uses up a single logical processor, and no other logical processors are used.
```
  PID      USER      PR  NI    VIRT    RES    SHR S        %CPU  %MEM     TIME+ COMMAND                              
 2859799 postgres  20   0  480644 387724 155904 R         100.0     0.6   2:12.22 postgres
```

And I learned from this link that this parameter is only for B-tree use 
https://postgresqlco.nf/doc/en/param/max_parallel_maintenance_workers/


^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #720: Can the performance of index creation be improved?
@ 2024-11-29 10:15  "ankane (@ankane)" <noreply+ankane@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: ankane (@ankane) @ 2024-11-29 10:15 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hi @frg01, make sure you're on pgvector 0.6.0+ and don't have any other settings that limit parallel workers.

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #720: Can the performance of index creation be improved?
@ 2024-11-29 10:15  "ankane (@ankane)" <noreply+ankane@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: ankane (@ankane) @ 2024-11-29 10:15 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2024-11-29 10:15 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-28 08:17 [pgvector/pgvector] issue #720: Can the performance of index creation be improved? "frg01 (@frg01)" <noreply+frg01@github.com>
2024-11-28 12:48 ` "lfloeer (@lfloeer)" <noreply+lfloeer@github.com>
2024-11-28 13:13 ` "frg01 (@frg01)" <noreply+frg01@github.com>
2024-11-29 10:15 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-11-29 10:15 ` "ankane (@ankane)" <noreply+ankane@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