| From: | Потапов Александр <a(dot)potapov(at)postgrespro(dot)ru> | 
|---|---|
| To: | Потапов Александр <a(dot)potapov(at)postgrespro(dot)ru> | 
| Cc: | "Matthias van de Meent" <boekewurm+postgres(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: Init connection time grows quadratically | 
| Date: | 2025-06-16 08:56:58 | 
| Message-ID: | 3b7e5e-684fdc80-f-48e15c80@193664207 | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
To be more precise I used constant number of threads (128 and 1024) to compare with previous results. The quadratic dependency exists everywhere, see new graph.
> Q: Did you check that pgbench or the OS does not have
> O(n_active_connections) or O(n_active_threads) overhead per worker
> during thread creation or connection establishment, e.g. by varying
> the number of threads used to manage these N clients? I wouldn't be
> surprised if there are inefficiencies in e.g. the threading- or
> synchronization model that cause O(N) per-thread overhead, or O(N^2)
> overall when you have one thread per connection.
 
| Attachment | Content-Type | Size | 
|---|---|---|
| init_time_2caa85f4aae_const_threads_2.png | image/png | 89.1 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vaibhav Dalvi | 2025-06-16 08:59:23 | Re: pg_upgrade fails with an error "object doesn't exist" | 
| Previous Message | Evgeniy Gorbanev | 2025-06-16 08:52:08 | Re: No error checking when reading from file using zstd in pg_dump |