G
G
gremlintv22018-12-10 14:10:15
PostgreSQL
gremlintv2, 2018-12-10 14:10:15

How many connections can postgresql-9 handle?

Hello
When testing through pgbench, I noticed that the maximum number of connections that can be installed during the test is 1000:

/usr/pgsql-9.6/bin/pgbench -p 5432 -h localhost -c 900 -C -T 60 -P 1 -U dbuser

If the application rests on the connections to the database, how, in addition to pgbouncer, can I increase the number of connections to the database?
So far I see several options:
1) Use slave instances of the base
2) Try hadoop (although I have a rather superficial idea about it and is there an api for golang for it)
3) Use NOsql
What can you advise from your experience?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2018-12-10
@gremlintv2

And how many cores do you have on a piece of iron to run 1000 requests in parallel? Is there at least a hundred CPU cores for this, so that only a dozen processes fight and interfere with each other for each core?
If you want to reduce latency - save already open connections.
If you want to increase throughput - reduce the number of active processes.
Much better than both. So yes, pgbouncer. Or at least a reasonable pool on the application.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question