Re: PGBench on Windows - connections are subprocesses?

From: Durumdara <durumdara(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: PGBench on Windows - connections are subprocesses?
Date: 2020-07-20 14:08:57
Message-ID: CAEcMXhkZCZtj3nsT1d4KVD6w0XZ3qEOULaYozOSwzFAm0tVcUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear Tom!

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> ezt írta (időpont: 2020. júl. 20., H, 15:38):

>
> There are -j threads in the pgbench process, and -c connections to
> the server (hence -c backend processes on the server side). Each
> of the pgbench threads is responsible for sending queries to a subset
> of the connections. Setting -j more than -c is useless (I forget
> if it's actually an error). If you set -j to, say, half of -c then
> each thread has exactly two connections to manage. If -j is too
> small compared to -c then pgbench itself tends to become the bottleneck.
>

Without -j, we have N connections, but one thread.
So this thread serves all of the connections one by one? The 1. and 2. and
3. connection while others do nothing (standing by)?
Or like Round Robin: a job from C1, next job from C2, .... job from CN -
then job from C1.... and no more jobs?

And if J = C means realtime parallel test?
Because each thread has only one connection, and they work concurrently as
real users do?

Then if I want to simulate 500 users heavy work, I need to set J=C=500?

Thank you for the information!

BW
DD

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2020-07-20 14:22:00 Re: Logical replication from 11.x to 12.x and "unique key violations"
Previous Message Durumdara 2020-07-20 13:38:14 Re: PGBench on Windows - connections are subprocesses?