Re: WaitLatchOrSocket optimization
От
Andres Freund
Тема
Re: WaitLatchOrSocket optimization
Дата
Msg-id
20180315172514.tm47h4do4clfmif7@alap3.anarazel.de
Ответ на
WaitLatchOrSocket optimization (Konstantin Knizhnik)
Список
Дерево обсуждения
WaitLatchOrSocket optimization Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: WaitLatchOrSocket optimization Andres Freund <andres@anarazel.de>
Re: WaitLatchOrSocket optimization Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Hi, On 2018-03-15 19:01:40 +0300, Konstantin Knizhnik wrote: > Right now function WaitLatchOrSocket is implemented in very inefficient way: > for each invocation it creates epoll instance, registers events and then > closes this instance. Right, everything performance critical should be migrated to using a persistent wait even set. > But there are still lot of places in Postgres where WaitLatchOrSocket or > WaitLatch are used. Most don't matter performancewise though. > There are two possible ways of fixing this issue: > 1. Patch postgres_fdw to store WaitEventSet in connection. > 2. Patch WaitLatchOrSocket to cache created wait event sets. I'm strongly opposed to 2). The lifetime of sockets will make this an absolute mess, it'll potentially explode the number of open file handles, and some OSs don't handle a large number of sets at the same time. Greetings, Andres Freund
В списке pgsql-hackers по дате отправления