View Issue Details

IDProjectCategoryView StatusLast Update
0000762Pgpool-IIGeneralpublic2022-08-01 17:45
Reportergowu567 Assigned Tot-ishii  
PrioritynormalSeveritytrivialReproducibilityhave not tried
Status assignedResolutionopen 
Product Version4.3.2 
Summary0000762: use so_reuseport in pgpool child process
Description pgpool use so_reuseport in setsocket in watchdog and heatbeat, why did not use it in pgpool child process?
Steps To Reproduceno
Additional Informationno
TagsNo tags attached.

Activities

t-ishii

2022-07-31 21:32

developer   ~0004098

I think the heartbeat process uses SO_REUSEPORT but the watchdog process does not. Also the heartbeat process uses UDP socket while the pgpool child users TCP socket.

Anyway, what enhancements do you expect if the pgpool child process uses SO_REUSEPORT?

gowu567

2022-08-01 10:52

reporter   ~0004099

ok. I use pgpool in my project. When the number of subroutines is large, the CPU utilization of the container is high. So i guess SO_REUSEPORT could reduce cpu contention between the pgpool child process. Cause when a new connection arrives, all of the child process try to select it. I googled that SO_REUSEPORT may slove this problem.

t-ishii

2022-08-01 11:14

developer   ~0004100

Using SO_REUSEPORT in TCP/IP connection is not easy. In the meantime you can try "serialize_accept" configuration parameter.

gowu567

2022-08-01 11:34

reporter   ~0004101

Exactly, but what are these not easy caused by? I try to replcce SO_REUSEADDR by SO_REUSEPORT, but it doesn't work...

t-ishii

2022-08-01 14:20

developer   ~0004102

First of all, SO_REUSEADDR and SO_REUSEPORT are totally different things.
https://stackoverflow.com/questions/14388706/how-do-so-reuseaddr-and-so-reuseport-differ
So just replacing SO_REUSEADDR by SO_REUSEPORT will not work.

You can google to find why using SO_REUSEPORT is not easy. For example:
https://lwn.net/Articles/856393/

gowu567

2022-08-01 17:45

reporter   ~0004104

Ok, i am not just replacing SO_REUSEADDR by SO_REUSEPORT. I am going to learn more details, thanks

Issue History

Date Modified Username Field Change
2022-07-31 17:42 gowu567 New Issue
2022-07-31 21:32 t-ishii Note Added: 0004098
2022-08-01 10:52 gowu567 Note Added: 0004099
2022-08-01 11:10 t-ishii Assigned To => t-ishii
2022-08-01 11:10 t-ishii Status new => feedback
2022-08-01 11:14 t-ishii Note Added: 0004100
2022-08-01 11:34 gowu567 Note Added: 0004101
2022-08-01 11:34 gowu567 Status feedback => assigned
2022-08-01 14:20 t-ishii Note Added: 0004102
2022-08-01 17:45 gowu567 Note Added: 0004104