Let's begin with a few basic calculations. Look at these following numbers that represent an estimate of interface speed after accounting for overhead:
- 1000 Mb/s * B/10 b = 100 MB/s
- 10,000 Mb/s * B/10 b = 1,000 MB/s
Next, consider how many ways this will be distributed. If we have an existing PostgreSQL setup, follow these steps:
- Execute the following query to determine the number of existing replicas:
SELECT count(1)+1 AS streams FROM pg_stat_replication;
- Multiply streams by 160 for maximum MB/s needed by replication streams.
- Execute the following queries together in a psql connection during a busy time of day on a production database:
SELECT SUM(pg_stat_get_db_tuples_fetched(oid)) AS count1 FROM pg_database; SELECT ...