Re: Logical replication very slow - Mailing list pgsql-general

From Achilleas Mantzios
Subject Re: Logical replication very slow
Date
Msg-id 858111e7-37a1-d55c-099a-c80b20aea76a@matrix.gatewaynet.com
Whole thread Raw
In response to Logical replication very slow  (Boris Sagadin <boris@infosplet.com>)
Responses Re: Logical replication very slow  (Boris Sagadin <boris@infosplet.com>)
List pgsql-general
On 25/2/19 8:52 π.μ., Boris Sagadin wrote:
Doing an initial replica and trying to find a bottleneck, Ubuntu 16.04, NVMe disks, PgSQL v10.7, AWS. With binary replication, DB is replicated at good speed, around 500MB/s. Trying LR now for a big table (about 1.4TB with 2 indexes) and the speed is only about 2MB/s.

Is logical replication subscriber in "streaming" state or in initial snapshot? What's the behavior after the initial snapshot, when it gets into streaming state?
Checked disk util with iostat and only about 20% utilized on master, 15% on target, CPU load on master is low. On slave I can see the "logical replication worker" process is taking about 70% CPU time on a single core, machine has 16 cores.

Is there a setting I am missing here? Any ideas appreciated.

Boris





-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

pgsql-general by date:

Previous
From: Boris Sagadin
Date:
Subject: Logical replication very slow
Next
From: Mike Yeap
Date:
Subject: Re: LDAP authenticated session terminated by signal 11: Segmentationfault, PostgresSQL server terminates other active server processes