The number of logical replication slot or wal sender recommend

From: 胡常齐 <huchangqiqi(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: The number of logical replication slot or wal sender recommend
Date: 2020-08-20 02:49:46
Message-ID: CAMcCukgwPp6tOCs4ktndEQP0GgX4iSY7FqqpCgiJhtvBQofDpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

I have a publisher instance, cpu 32 core, ram 64GB, with SSD and installed
PostgreSQL 10 on it. I want to use logical replication with it , I
create publication on it, add about 20 tables in the pub, each tables will
have about 1 million line data,.

I wonder how many subscriber instance the publisher can affort, what if i
have 100 sub,
which means there will be 100 logical replication slot and 100 wal sender
process on the publisher instance, will so many sub slow down the publisher
performance?

I have test on my own machine cpu 8core, ram 16GB as a publisher with 10
sub (anthoer machine start 10 postgres instance, every one create a sub),
and everything works fine. I test pgbench on my 8core, 16GB machine,
without sub or with 10 sub, the tps is the same. Even if there is one
million line data on the pub, and on sub side the table is empty, and when
i create subscription on the 10 postgres sub instance, it copy data from
pub is quickly enough.

I wonder how many logical replication slot or wal sender is ok for the
32core, 64GB machine. 100 sub? 500 sub?

Browse pgsql-hackers by date

  From Date Subject
Next Message Kasahara Tatsuhito 2020-08-20 02:59:20 Re: Creating a function for exposing memory usage of backend process
Previous Message Mark Dilger 2020-08-20 02:30:27 Re: new heapcheck contrib module