From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Васильев Дмитрий <d(dot)vasilyev(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Performance degradation in commit ac1d794 |
Date: | 2015-12-25 21:13:26 |
Message-ID: | 20151225211326.z4umuafvv27nczya@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2015-12-25 13:28:55 -0500, Tom Lane wrote:
> Hmm. And all those FDs point to the same pipe. I wonder if we're looking
> at contention for some pipe-related data structure inside the kernel.
Sounds fairly likely - and not too surprising. In this scenario we've a
couple 100k registrations/unregistrations to a pretty fundamentally
shared resource (the wait queue for changes to the pipe). Not that
surprising that it becomes a problem.
There's a couple solutions I can think of to that problem:
1) Use epoll()/kqueue, or other similar interfaces that don't require
re-registering fds at every invocation. My guess is that that'd be
desirable for performance anyway.
2) Create a pair of fds between postmaster/backend for each
backend. While obviously increasing the the number of FDs noticeably,
it's interesting for other features as well: If we ever want to do FD
passing from postmaster to existing backends, we're going to need
that anyway.
3) Replace the postmaster_alive_fds socketpair by some other signalling
mechanism. E.g. sending a procsignal to each backend, which sets the
latch and a special flag in the latch structure.
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-12-25 21:29:53 | Re: Performance degradation in commit ac1d794 |
Previous Message | David Fetter | 2015-12-25 19:55:54 | Re: Commit fest status for 2015-11 |