-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make max-rate configurable when running pg_basebackup #649
Comments
Hi @aswinkarthik ! I think the integration of The option |
This bit us today. We use small workstations and the almost-1-Gbps recovery rate was pushing latencies above the roof and causing timeouts on top of putting a very heavy burden on the node we were replicating from. We had to manually patch Stolon to rale-limit the recovery and allow the replica to initialize the 40GB database without timeouts in the
The solution ultimately involved:
As much as I agree that adding more configuration option is not something to do lightly, |
I think the real fix would be to configure the network to not stall even when one process writes a big stream fast. In practice, this might mean using If you're running an older distro with defaults such as Note that the congestion control algorithm of the sender is the important part of this equation. If sender pushes the pipes full with |
Submission type
Enhancement Description
In
pg_basebackup
, there is a flag--max-rate
to limit the transfer of data directory when runningpg_basebackup
. This is useful to limit the load put on the primary server when resyncing.We have had couple of issues, where we have a slave doing a resync causing huge load on the primary server. What is your opinion on making it configurable?
I would like to contribute this as a PR.
If you are okay with this, could you review this implementation idea?
pgBasebackupMaxRate
in clusterdatapostgresql.Manager
store this value in itself which is constantly updated from clusterdatapostgresKeeper.postgresKeeperSM()
manager.SyncFromFollowed
, we can pass-r
flag ifpgBasebackupMaxRate
is set when startingpg_basebackup
.pgBasebackupMaxRate
based on PostgreSQL docs.As per PostgreSQL docs,
source
The text was updated successfully, but these errors were encountered: