High CPU consumption in cascade replication with large number of walsenders

2025-08-30 Thread Alexey Makhmutov
Hello hackers, This is a continuation of the thread https://www.postgresql.org/message-id/flat/076eb7bd-52e6-4a51-ba00-c744d027b15c%40postgrespro.ru, with focus only on the patch related to improving performance in case of large number of cascaded walsenders. We’ve faced an interesting situa

Re: High CPU consumption in cascade replication with large number of walsenders and ConditionVariable broadcast issues

2025-04-22 Thread Alexey Makhmutov
After playing with the patch a little more, we’ve come to the conclusion, that the idea to signal CV broadcast from the timer handler is a risky one, as it creates a large number of execution paths, which are not present in current code base. It's hard to prove correctness of application behavi

Re: High CPU consumption in cascade replication with large number of walsenders and ConditionVariable broadcast issues

2025-03-31 Thread Alexey Makhmutov
> We’ve prepared two test patches on top of current master to address both issues: > ... > * 0002-Implement-batching-for-cascade-replication.patch – test patch to implement possible batching approach in xlogreceiver.c with timer. Currently it uses GUC variables to allow testing of different bat

High CPU consumption in cascade replication with large number of walsenders and ConditionVariable broadcast issues

2025-03-29 Thread Alexey Makhmutov
Hello, Recently we’ve faced an interesting situation on a standby environment with configured cascade replication and large number (~100) of configured walsenders. We’ve noticed a very high CPU consumption on such environment with the most time-consuming operation being signal delivery from s