Обсуждение: Scaling / Number of simultanous connections

Поиск
Список
Период
Сортировка

Scaling / Number of simultanous connections

От
Nico Callewaert
Дата:
Hi,

I'm about to start porting a Firebird DB to Postgres. Next thing will be upgrading all customers. Most of our customers have around 30 users or less. We have a few 'bigger' customers that maybe have 50 users or a bit more still. The application is a Delphi application that is in fact a 'fat' client that uses a permanent connection to the DB. I've read that Postgres uses 1 process per user. So that means 30-50 processes at the same time. 

I have 2 questions about this
- I guess this situation is not really a heavy workload? Or is it?
- And is it correct that a single process cannot access multiple CPU cores, so things are not multi threaded? I guess MySQL used that argument somewhere, but I'm not sure, forgive me if I'm mistaken.

The whole thing boils down to this question: Am I save with 30-50 simultanous users for speed and scaling?

Thanks a lot in advance!
Best regards, Nico

Re: Scaling / Number of simultanous connections

От
Andreas Kretschmer
Дата:

Am 07.02.19 um 18:43 schrieb Nico Callewaert:
> Hi,
>
> I'm about to start porting a Firebird DB to Postgres. Next thing will 
> be upgrading all customers. Most of our customers have around 30 users 
> or less. We have a few 'bigger' customers that maybe have 50 users or 
> a bit more still. The application is a Delphi application that is in 
> fact a 'fat' client that uses a permanent connection to the DB. I've 
> read that Postgres uses 1 process per user. So that means 30-50 
> processes at the same time.
>
> I have 2 questions about this
> - I guess this situation is not really a heavy workload? Or is it?

not really, assuming not all connections are active the same time.

> - And is it correct that a single process cannot access multiple CPU 
> cores, so things are not multi threaded? I guess MySQL used that 
> argument somewhere, but I'm not sure, forgive me if I'm mistaken.

yes and no, since 9.6 we can use multiple cores for one query, using 
multiple processes.


>
> The whole thing boils down to this question: Am I save with 30-50 
> simultanous users for speed and scaling?
>

most likely yes, on modern hardware.


Regards, Andreas

-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com



Re: Scaling / Number of simultanous connections

От
Dwayne A
Дата:
You could also look at pgbouncer for connection pooling.


Cheers,
Dwayne


On Thu., Feb. 7, 2019, 9:57 a.m. Andreas Kretschmer, <andreas@a-kretschmer.de> wrote:


Am 07.02.19 um 18:43 schrieb Nico Callewaert:
> Hi,
>
> I'm about to start porting a Firebird DB to Postgres. Next thing will
> be upgrading all customers. Most of our customers have around 30 users
> or less. We have a few 'bigger' customers that maybe have 50 users or
> a bit more still. The application is a Delphi application that is in
> fact a 'fat' client that uses a permanent connection to the DB. I've
> read that Postgres uses 1 process per user. So that means 30-50
> processes at the same time.
>
> I have 2 questions about this
> - I guess this situation is not really a heavy workload? Or is it?

not really, assuming not all connections are active the same time.

> - And is it correct that a single process cannot access multiple CPU
> cores, so things are not multi threaded? I guess MySQL used that
> argument somewhere, but I'm not sure, forgive me if I'm mistaken.

yes and no, since 9.6 we can use multiple cores for one query, using
multiple processes.


>
> The whole thing boils down to this question: Am I save with 30-50
> simultanous users for speed and scaling?
>

most likely yes, on modern hardware.


Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com


Re: Scaling / Number of simultanous connections

От
Nico Callewaert
Дата:
Hi,

Thanks to everybody for the answers. Indeed, not all the time there is traffic on all those connections.

Thanks, best regards, Nico

Op ma 11 feb. 2019 om 12:40 schreef Nico Callewaert <app.development1972@gmail.com>:
Hi,

Thanks to everybody for the answers. Indeed, not all the time there is traffic on all those connections.

Thanks, best regards, Nico

Op vr 8 feb. 2019 om 22:24 schreef Dwayne A <dwayne.albuquerque@gmail.com>:
You could also look at pgbouncer for connection pooling.


Cheers,
Dwayne


On Thu., Feb. 7, 2019, 9:57 a.m. Andreas Kretschmer, <andreas@a-kretschmer.de> wrote:


Am 07.02.19 um 18:43 schrieb Nico Callewaert:
> Hi,
>
> I'm about to start porting a Firebird DB to Postgres. Next thing will
> be upgrading all customers. Most of our customers have around 30 users
> or less. We have a few 'bigger' customers that maybe have 50 users or
> a bit more still. The application is a Delphi application that is in
> fact a 'fat' client that uses a permanent connection to the DB. I've
> read that Postgres uses 1 process per user. So that means 30-50
> processes at the same time.
>
> I have 2 questions about this
> - I guess this situation is not really a heavy workload? Or is it?

not really, assuming not all connections are active the same time.

> - And is it correct that a single process cannot access multiple CPU
> cores, so things are not multi threaded? I guess MySQL used that
> argument somewhere, but I'm not sure, forgive me if I'm mistaken.

yes and no, since 9.6 we can use multiple cores for one query, using
multiple processes.


>
> The whole thing boils down to this question: Am I save with 30-50
> simultanous users for speed and scaling?
>

most likely yes, on modern hardware.


Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com