You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/vectorchord/usage/postgresql-tuning.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,16 +57,27 @@ This section applies only to PostgreSQL 18.
57
57
58
58
### `io_uring`
59
59
60
-
`io_uring` method uses Linux's `io_uring`, which can reduce the overhead of context switches. This interface is available in kernel 5.1 and later. If you are using a newer kernel, it is recommended. You can enable this method through the GUC `io_method`.
60
+
`io_uring` method uses Linux's `io_uring`, which can reduce the overhead of context switches. This interface is available in kernel 5.1 and later. You can enable this method through the GUC `io_method`.
61
61
62
62
```sql
63
63
-- Note: A restart is required for this setting to take effect.
64
64
ALTER SYSTEM SET io_method ='io_uring';
65
65
```
66
66
67
-
Because`io_uring` uses additional file descriptors, PostgreSQL may reach `RLIMIT_NOFILE`limit. You may need to increase this limit on your system.
67
+
Since`io_uring` uses additional file descriptors and locked memory, PostgreSQL may reach `RLIMIT_NOFILE`and `RLIMIT_MEMLOCK` limits. You may need to increase these limits on your system. See also
68
68
69
-
For security reasons, container runtimes, cloud providers, and system administrators may disable `io_uring`. If this happens, check with your vendor for details. See also [Consider removing io_uring syscalls in from RuntimeDefault](https://github.com/containerd/containerd/issues/9048).
*[Set ulimits in container (Docker)](https://docs.docker.com/reference/cli/docker/container/run/#ulimit)
72
+
73
+
For security reasons, container runtimes, cloud providers, and system administrators may disable `io_uring`. If this happens, check with your vendor for details. See also
74
+
75
+
*[Consider removing io_uring syscalls in from RuntimeDefault (containerd)](https://github.com/containerd/containerd/issues/9048)
76
+
77
+
`io_uring` is often considered recommended. However, performance depends on your workload. See also
78
+
79
+
*[Tuning AIO in PostgreSQL 18 (Tomas Vondra)](https://vondra.me/posts/tuning-aio-in-postgresql-18/)
80
+
*[Benchmarking Postgres 17 vs 18 (planetscale)](https://planetscale.com/blog/benchmarking-postgres-17-vs-18)
70
81
71
82
This section applies only to Linux.
72
83
@@ -79,8 +90,9 @@ This is the default in PostgreSQL 18. PostgreSQL avoids blocking backend by send
79
90
ALTER SYSTEM SET io_method ='worker';
80
91
81
92
-- Selects the number of I/O worker processes to use.
82
-
-- It's recommended to set it to your parallelism.
93
+
-- It's recommended to set it to the minimum of your parallelism and maximum value.
83
94
-- For example, if your parallelism is 16, set the value to 16.
95
+
-- The maximum value is 32, so you can't set it to anything higher.
84
96
-- Note: A restart is required for this setting to take effect.
0 commit comments