Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

configure

Blame
    • Andres Freund's avatar
      98a64d0b
      Introduce WaitEventSet API. · 98a64d0b
      Andres Freund authored
      Commit ac1d7945 ("Make idle backends exit if the postmaster dies.")
      introduced a regression on, at least, large linux systems. Constantly
      adding the same postmaster_alive_fds to the OSs internal datastructures
      for implementing poll/select can cause significant contention; leading
      to a performance regression of nearly 3x in one example.
      
      This can be avoided by using e.g. linux' epoll, which avoids having to
      add/remove file descriptors to the wait datastructures at a high rate.
      Unfortunately the current latch interface makes it hard to allocate any
      persistent per-backend resources.
      
      Replace, with a backward compatibility layer, WaitLatchOrSocket with a
      new WaitEventSet API. Users can allocate such a Set across multiple
      calls, and add more than one file-descriptor to wait on. The latter has
      been added because there's upcoming postgres features where that will be
      helpful.
      
      In addition to the previously existing poll(2), select(2),
      WaitForMultipleObjects() implementations also provide an epoll_wait(2)
      based implementation to address the aforementioned performance
      problem. Epoll is only available on linux, but that is the most likely
      OS for machines large enough (four sockets) to reproduce the problem.
      
      To actually address the aforementioned regression, create and use a
      long-lived WaitEventSet for FE/BE communication.  There are additional
      places that would benefit from a long-lived set, but that's a task for
      another day.
      
      Thanks to Amit Kapila, who helped make the windows code I blindly wrote
      actually work.
      
      Reported-By: Dmitry Vasilyev Discussion:
      CAB-SwXZh44_2ybvS5Z67p_CDz=XFn4hNAD=CnMEF+QqkXwFrGg@mail.gmail.com
      20160114143931.GG10941@awork2.anarazel.de
      98a64d0b
      History
      Introduce WaitEventSet API.
      Andres Freund authored
      Commit ac1d7945 ("Make idle backends exit if the postmaster dies.")
      introduced a regression on, at least, large linux systems. Constantly
      adding the same postmaster_alive_fds to the OSs internal datastructures
      for implementing poll/select can cause significant contention; leading
      to a performance regression of nearly 3x in one example.
      
      This can be avoided by using e.g. linux' epoll, which avoids having to
      add/remove file descriptors to the wait datastructures at a high rate.
      Unfortunately the current latch interface makes it hard to allocate any
      persistent per-backend resources.
      
      Replace, with a backward compatibility layer, WaitLatchOrSocket with a
      new WaitEventSet API. Users can allocate such a Set across multiple
      calls, and add more than one file-descriptor to wait on. The latter has
      been added because there's upcoming postgres features where that will be
      helpful.
      
      In addition to the previously existing poll(2), select(2),
      WaitForMultipleObjects() implementations also provide an epoll_wait(2)
      based implementation to address the aforementioned performance
      problem. Epoll is only available on linux, but that is the most likely
      OS for machines large enough (four sockets) to reproduce the problem.
      
      To actually address the aforementioned regression, create and use a
      long-lived WaitEventSet for FE/BE communication.  There are additional
      places that would benefit from a long-lived set, but that's a task for
      another day.
      
      Thanks to Amit Kapila, who helped make the windows code I blindly wrote
      actually work.
      
      Reported-By: Dmitry Vasilyev Discussion:
      CAB-SwXZh44_2ybvS5Z67p_CDz=XFn4hNAD=CnMEF+QqkXwFrGg@mail.gmail.com
      20160114143931.GG10941@awork2.anarazel.de
    configure 458.27 KiB