Replication causing publisher node to use excessive cpu over time

Started by Martin Mooreover 8 years ago3 messagesgeneral
Jump to latest
#1Martin Moore
martin.moore@avbrief.com

I’ve got two Postgres 10/Debian stretch systems and have added a publish/subscribe on a single table that isn’t updated very often. 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) and having a big impact on the system performance even when doing very little. Logging on to the subscriber and removing the subscription 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

#2Michael Paquier
michael@paquier.xyz
In reply to: Martin Moore (#1)
Re: Replication causing publisher node to use excessive cpu over time

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 removing the 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

#3Martin Moore
martin.moore@avbrief.com
In reply to: Michael Paquier (#2)
Re: Replication causing publisher node to use excessive cpu over time

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 removing the 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