Thread: Replication causing publisher node to use excessive cpu over time

Replication causing publisher node to use excessive cpu over time

From
Martin Moore
Date:
I’ve got two Postgres 10/Debian stretch systems and have added a publish/subscribe on a single table that isn’t updated
veryoften. The subscriber node is doing very little else. 

After a few days, it’s noticeable that the Postgres on the publisher node is constantly using a lot of cpu (26% today)
andhaving a big impact on the system performance even when doing very little. Logging on to the subscriber and removing
thesubscription sees this value drop to an expect small value.  

I can’t see that this can be anything but a bug, but happy for any thoughts :)



Martin Moore






Re: Replication causing publisher node to use excessive cpu over time

From
Michael Paquier
Date:
On Mon, Dec 4, 2017 at 9:03 PM, Martin Moore <martin.moore@avbrief.com> wrote:
> After a few days, it’s noticeable that the Postgres on the publisher node is constantly using a lot of cpu (26%
today)and having a big impact on the system performance even when doing very little. Logging on to the subscriber and
removingthe subscription sees this value drop to an expect small value. 

When debugging such issues, it is critical to know where the resources
are spent, and you are giving no information that can help in
understanding where CPU cycles are spent. You can do such measurements
by using perf for example.
--
Michael


Re: Replication causing publisher node to use excessive cpu over time

From
Martin Moore
Date:
OK, have installed perf and will report back when the problem gets noticeable.

Martin.


On 04/12/2017, 12:40, "Michael Paquier" <michael.paquier@gmail.com> wrote:

    On Mon, Dec 4, 2017 at 9:03 PM, Martin Moore <martin.moore@avbrief.com> wrote:
    > After a few days, it’s noticeable that the Postgres on the publisher node is constantly using a lot of cpu (26%
today)and having a big impact on the system performance even when doing very little. Logging on to the subscriber and
removingthe subscription sees this value drop to an expect small value. 

    When debugging such issues, it is critical to know where the resources
    are spent, and you are giving no information that can help in
    understanding where CPU cycles are spent. You can do such measurements
    by using perf for example.
    --
    Michael