From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PATCH: pgbench - remove thread fork-emulation |
Date: | 2015-07-03 08:54:52 |
Message-ID: | 55964DDC.90006@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 04/28/2015 02:18 AM, Fabien COELHO wrote:
> This patch removes the pgbench thread fork-emulation code and simplifies
> things where possible, especially around pthread_create and pthread_join.
> The stats collection for the report is done directly instead of using an
> intermediate structure.
>
> As a result, if no thread implementation is available, pgbench is
> restricted to work with only the main thread (ie "pgbench -j 1 ...").
>
>
> == Rational ==
>
> Pgbench currently provides a thread emulation through process forks. This
> feature was developed way back when it may have been common that some
> platforms were not supporting threads. This is now very rare (can you name
> one such platform?).
>
> However, the thread fork-emulation feature has drawbacks: Namely,
> processes are not threads, the memory is not shared (sure), so it hinders
> simple implementation for some features, or results in not providing these
> features with fork-emulation, or having a different behavior under
> fork-emulation:
>
> Latency collection (-r) is not supported with fork emulation.
>
> Progress (-P) is reported differently with fork emulation.
>
> For a new feature under discussion, which consist in allowing one log
> instead of per-thread logs, supporting fork-emulation requires a (heavy)
> post-processing external sort phase whereas with actual threads all
> threads can share and append to the same log file with limited overhead,
> which is significantly simpler.
I agree with all that, it's time to let the fork-emulation mode to go.
Committed.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Sawada Masahiko | 2015-07-03 08:59:03 | Re: Synch failover WAS: Support for N synchronous standby servers - take 2 |
Previous Message | David Rowley | 2015-07-03 08:49:44 | Re: PATCH:do not set Win32 server-side socket buffer size on windows 2012 |