Skip to content

Commit ff5d8b7

Browse files
committed
remove titles in postgresql tuning and fix typos
Signed-off-by: usamoi <usamoi@outlook.com>
1 parent aa2d2df commit ff5d8b7

File tree

12 files changed

+32
-29
lines changed

12 files changed

+32
-29
lines changed

src/cloud/manage/backup-restore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ If you want to do a PITR for a cluster, you can follow the steps below:
5757
- Select the target time that you want to restore to.
5858
![](../images/target-time.png)
5959
::: warning
60-
The target time should be within the first first recoverability point and last archived wal time.
60+
The target time should be within the first recoverability point and last archived wal time.
6161
:::
6262

6363

src/cloud/manage/terraform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Terraform Integration Overview with VectorChord Cloud
22

3-
This guide walks you through the process of installing and configuring the PGVetco.rs Cloud provider.
3+
This guide walks you through the process of installing and configuring the PGVecto.rs Cloud provider.
44

55
## 1. Prerequisites
66

src/pgvecto_rs/admin/fdw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ services:
2424
networks:
2525
localnet:
2626
27-
forigen_db:
27+
foreign_db:
2828
image: tensorchord/pgvecto-rs:pg15-v0.2.0
2929
ports:
3030
- "5433:5432"

src/pgvecto_rs/admin/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ SHOW search_path;
6262
SET search_path = "$user, public";
6363
```
6464
65-
#### 2. Check exist indexes
65+
#### 2. Check existing indexes
6666
6767
For indexes created at vector columns, please retrieve the definition and record it in a convenient location. This information is necessary for the recovery of the indexes at a later stage.
6868

src/pgvecto_rs/admin/upgrading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ You may get this error if some [indexes](../usage/indexing.md) were created befo
5555

5656
```
5757
ERROR: index public.this_is_index depends on operator class vector_cos_ops for access method vectors
58-
index public.this_is_index depends on operator class vector_cos_ops for access method vectorscannot drop operator class vector_cos_ops for access method vectors because other objects depend on it
58+
index public.this_is_index depends on operator class vector_cos_ops for access method vectors cannot drop operator class vector_cos_ops for access method vectors because other objects depend on it
5959
6060
ERROR: cannot drop operator class vector_cos_ops for access method vectors because other objects depend on it
6161
SQL state: 2BP01

src/pgvecto_rs/integration/langchain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Score: 0.29536954
135135
- 💃 **Easy to use**: pgvecto.rs is a Postgres extension, which means that you can use it directly within your existing database. This makes it easy to integrate into your existing workflows and applications.
136136
- 🔗 **Async indexing**: pgvecto.rs's index is asynchronously constructed by the background threads and does not block insertions and always ready for new queries.
137137
- 🥅 **Filtering**: pgvecto.rs supports filtering. You can set conditions when searching or retrieving points. This is the missing feature of other postgres extensions.
138-
- 🧮 **Quantization**: pgvecto.rs supports scalar quantization and product qutization up to 64x.
138+
- 🧮 **Quantization**: pgvecto.rs supports scalar quantization and product quantization up to 64x.
139139
- 🦀 **Rewrite in Rust**: Rust's strict compile-time checks ensure memory safety, reducing the risk of bugs and security issues commonly associated with C extensions.
140140
141141
## Comparison with pgvector

src/pgvecto_rs/use-case/adaptive-retrieval.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ But you could safely remove some numbers from the end of the sequence and still
1414

1515
::: details
1616

17-
You may need normalization to ensure that the shortened embeddings compatible with some distance calculation e.g. dot poroduct. OpenAI's API will help you on this if you are calling `text-embedding-3-large` to generate a lower dimension embedding directly, instead of truncating the original embeddings on your own.
17+
You may need normalization to ensure that the shortened embeddings compatible with some distance calculation e.g. dot product. OpenAI's API will help you on this if you are calling `text-embedding-3-large` to generate a lower dimension embedding directly, instead of truncating the original embeddings on your own.
1818

1919
```python
2020
embedding_3072_dim_from_openai = [-0.00611, -0.00269, ...]

src/vectorchord/admin/kubernetes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ You can use `kubectl port-forward` to connect to PostgreSQL cluster.
146146
```shell
147147
$ kubectl port-forward services/vchord-rw 5432:5432
148148
$ psql -h 127.0.0.1 -d tensorchord -U tensorchord
149-
ttensorchord=> \dx
149+
tensorchord=> \dx
150150
List of installed extensions
151151
Name | Version | Schema | Description
152152
---------+---------+------------+---------------------------------------------------------------------------------------------
@@ -225,7 +225,7 @@ spec:
225225
- "vchord"
226226
```
227227

228-
We can check the extension is alroady installed successfully.
228+
We can check the extension is already installed successfully.
229229

230230
```shell
231231
$ kubectl port-forward services/vchord-rw 5432:5432

src/vectorchord/admin/migration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ CREATE EXTENSION vchord CASCADE;
5555

5656
::: info
5757

58-
This will install vectorchord and pgvector at public schema, if other schema is picked, please subsititue `public` with your schema at the migration command.
58+
This will install vectorchord and pgvector at public schema, if other schema is picked, please substitute `public` with your schema at the migration command.
5959

6060
:::
6161

@@ -80,7 +80,7 @@ postgres=# \dx
8080
8181
:::
8282
83-
#### 2. Check exist indexes
83+
#### 2. Check existing indexes
8484
8585
For indexes created at vector columns, please retrieve the definition and record it in a convenient location.
8686
This information is necessary for the recovery of the indexes at a later stage.
@@ -145,7 +145,7 @@ spherical_centroids = false
145145
$$);
146146
```
147147
148-
For more information of create index at `VectorChord`, see [indexing](../usage/indexing).
148+
For more information on creating index at `VectorChord`, see [indexing](../usage/indexing).
149149
150150
#### 5. Clean the environment
151151

src/vectorchord/usage/postgresql-tuning.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# PostgreSQL Tuning
22

3-
## Indexing
4-
53
Indexing may be parallelized. Parallelism increases server load and is therefore not enabled by default in PostgreSQL. To enable it, refer to the following SQL.
64

75
```sql
86
-- Sets the maximum number of background processes that the cluster can support.
9-
-- It's recommended to set it to the sum of your desired parallelism plus 8.
10-
-- For example, if you want to use 16 threads for parallel processing, set the value to 24.
7+
-- It's recommended to set it to at least the sum of your desired parallelism plus 8.
8+
-- For example, if you want to use 16 threads for parallel processing, set the value at least to 24.
9+
-- Depending on your workload, this value might be useful to be higher.
1110
-- Note: A restart is required for this setting to take effect.
1211
ALTER SYSTEM SET max_worker_processes = 24;
1312

@@ -28,27 +27,31 @@ The number of parallel workers also depends on the table's configuration. By def
2827
ALTER TABLE items set (parallel_workers = 15);
2928
```
3029

31-
## Search
32-
33-
To ensure the search performs efficiently, you may need to adjust some PostgreSQL parameters.
30+
You need to tune a few settings to improve I/O performance.
3431

3532
```sql
36-
-- Sets the amount of memory the database server uses for shared memory buffers.
37-
-- For typical database workloads, this value is recommended to be 40% of the total memory.
38-
-- For vector database workloads, this value is recommended to be 80% of the total memory.
39-
-- Note: A restart is required for this setting to take effect.
40-
ALTER SYSTEM SET shared_buffers = '16GB';
41-
4233
-- Sets the number of concurrent disk I/O operations that PostgreSQL expects can be executed simultaneously.
4334
-- It's recommended to set it to 200 when using SSDs for storage.
4435
SET effective_io_concurrency = 200;
4536
SET maintenance_io_concurrency = 200;
37+
```
38+
39+
We have observed that in certain cases, malfunctioning JIT can negatively impact performance. If you do not rely on it, you may choose to disable it.
4640

47-
-- We have observed that in certain cases, malfunctioning JIT can negatively impact performance.
48-
-- If you do not rely on it, you may choose to disable it.
41+
```sql
4942
SET jit = off;
5043
```
5144

45+
Finally, you need to set the size of PostgreSQL's shared buffers.
46+
47+
```sql
48+
-- Sets the amount of memory the database server uses for shared memory buffers.
49+
-- Depending on your workload, this value is recommended to be 25%~40% of the total memory.
50+
-- For vector database workloads, this value might be useful to be 80% of the total memory.
51+
-- Note: A restart is required for this setting to take effect.
52+
ALTER SYSTEM SET shared_buffers = '16GB';
53+
```
54+
5255
## Asynchronous I/O {#asynchronous-i-o}
5356

5457
PostgreSQL 17 introduced the streaming I/O API for the first time. Building on this, PostgreSQL 18 introduces asynchronous I/O. With asynchronous I/O, PostgreSQL can initiate multiple read operations and continue processing while waiting for the results. This can improve the performance of queries that need to read large amounts of data from disk. PostgreSQL offers multiple asynchronous I/O methods. You can adjust them as needed.

0 commit comments

Comments
 (0)