<div dir="ltr"><div>Hi</div><div><br></div><div>I was trying to run Pgpool-II on Mac OS/X 10.15.7 and it was refusing to start up with a</div><div>"No Space Left on Device" error.</div><div>The reason for that was a default limit on the maximum allowed of</div><div>shared memory segments (kern.sysv.shmmni: 32).</div><div>Although increasing the limit did momentarily solved the problem until I</div><div>tried to ran the second and third Pgpool-II node on the same system (to test watchdog). </div><div><br></div><div>This made me realize that while the shared memory segment is a limited resource yet</div><div>Pgpool-II opens too many shared memory segments.</div><div><br></div><div>In total Pgpool-II opens around 20 shared memory segments and a few are just 4 bytes in length </div><font face="monospace">Shared Memory:<br>m 2031616 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2 348160  35040  35040 21:47:21 no-entry 21:47:21<br>m 720897 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2    320  35040  35040 21:47:21 no-entry 21:47:21<br>m 786434 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2     20  35040  35040 21:47:21 no-entry 21:47:21<br>m 851971 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2   5264  35040  35040 21:47:21 no-entry 21:47:21<br>m 589828 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2      4  35040  35040 21:47:21 no-entry 21:47:21<br>m 589829 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2   9216  35040  35040 21:47:21 no-entry 21:47:21<br>m 589830 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2  12288  35040  35040 21:47:21 no-entry 21:47:21<br>m 786439 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2     26  35040  35040 21:47:21 no-entry 21:47:21<br>m 589832 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2      4  35040  35040 21:47:21 no-entry 21:47:21<br>m 131081 0x02382d74 --rw------- muhammadusama    staff muhammadusama    staff      6     56  27293  27293 23:55:48 21:47:06 23:55:48<br>m 786442 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2      1  35040  35040 21:47:21 no-entry 21:47:21<br>m 27459595 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2      1  35040  35040 21:47:21 no-entry 21:47:21<br>m 4521996 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2     24  35040  35040 21:47:21 no-entry 21:47:21<br>m 3080205 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2     40  35040  35040 21:47:21 no-entry 21:47:21<br>m 3014670 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2     40  35040  35040 21:47:21 no-entry 21:47:21<br>m 3014671 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      2  80904  35040  35040 21:47:21 no-entry 21:47:21<br>m 1703967 0x00000000 --rw------- muhammadusama    staff muhammadusama    staff      0  80904  27968  27968  0:04:52  0:04:52  0:04:52</font><div></div><div><font face="monospace"><br></font></div><div><font face="monospace"><br></font></div>So I cooked up a patch to avoid creating too many shared memory segments by creating a<br>single shared memory segment big enough to hold all required shared memory<br>and put all shared memory variables within that segment one after the other.<div><br></div><div>What do you think about the changes?</div></div>