[pgpool-hackers: 3248] Re: select(2) storm

Jesper Pedersen jesper.pedersen at redhat.com
Thu Feb 21 06:24:44 JST 2019


Hi,

On 2/19/19 8:33 PM, Tatsuo Ishii wrote:
> Attached is a patch trying eliminate calls to pool_check_fd() (the
> same one I sent to you privately. I just wanted to share with other
> developers).
> 
> The idea is checking select(2) timeout parameter set in a static
> variable in pool_read() and pool_read2(). If it's -1, it means no
> select timeout will be set in pool_check_fd(), which implies we can
> avoid to call pool_check_fd().
> 
> Also I moved pool_check_fd() and friends to pool_stream.c from a
> modularity point of view.
> 


I see a minor speed up and the patch looks good, so I think it is a win 
overall. Please, merge.

> I heard from you that the patch did no performance improvement.  I am
> thinking about it and came to an idea; even if we avoid to call
> pool_check_fd(), subsequent read(2) has to wait for packets from
> frontend or backend. So the total time for processing has not been
> changed by the patch. Of course this is just my guess. I need a proof
> of the theory...
> 

Apparently, 4.20.8 is broken for perf but should be fixed in 4.20.11. 
I'll try and get that installed ASAP.

Then we can look at anything that pops up.

Best regards,
  Jesper


More information about the pgpool-hackers mailing list