Maximum number of Postgres clients per node? #12901
-
Is there any guidance as to how many Postgres clients a crate instance can handle depending on the heap size set? If I'm using a 2gb heap size on an 8gb system how many clients could I expect to have connected before needing a larger system? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It depends on your data set and query workload. Overall connections have a low footprint. There is some per connection book-keeping, but that should be in the order of a few hundred bytes to a couple of kBs per connection. And connections require file-descriptors/sockets, but the bootstrap checks would already warn/error if there are low system limits active (See https://crate.io/docs/crate/howtos/en/latest/admin/bootstrap-checks.html) |
Beta Was this translation helpful? Give feedback.
It depends on your data set and query workload. Overall connections have a low footprint.
Opposed to PostgreSQL which spawns a sub-process per connection, CrateDB uses an event-loop model which should allow for far more connections.
There is some per connection book-keeping, but that should be in the order of a few hundred bytes to a couple of kBs per connection.
Information like prepared statements are also per connection, so that could affect memory usage too if you're using a lot of them.
And connections require file-descriptors/sockets, but the bootstrap checks would already warn/error if there are low system limits active (See https://crate.io/docs/crate/howtos/en/latest/admin/bootst…