What is the throughput of a single PostgreSQL instance for read and write (in MB/s)?
sobes.tech AI
Answer from AI
The throughput of a single PostgreSQL instance depends heavily on many factors: hardware (SSD or HDD disks, CPU, RAM), server configuration, workload characteristics (query complexity, parallelism), database settings, and network.
Under typical conditions on a modern server with SSD, you can expect the following benchmarks:
- Read: from 100 to 500 MB/s (e.g., sequential reading of large tables or indexes).
- Write: from 50 to 200 MB/s (WAL write, inserts, updates).
However, these figures can vary significantly. Precise measurement requires load testing using tools like pgbench or specialized benchmarks.
Example of running pgbench to assess performance:
pgbench -c 10 -j 2 -T 60 -U postgres mydb
Where -c is the number of clients, -j is the number of threads, and -T is the test duration in seconds.
In conclusion: it is not possible to specify a fixed MB/s number; it is better to focus on a specific scenario and perform testing.