Skip to content
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

Ledger replicate supports throttle #2778

Merged
merged 2 commits into from
Dec 13, 2021

Conversation

gaozhangmin
Copy link
Contributor

@gaozhangmin gaozhangmin commented Aug 27, 2021

Motivation

Ledger replicating puts heavy loads on cluster.
Now, ledger replicate only supports split fragments into small pieces.
But, throttling is not supported.

Changes

Add a confiuration replicationRateByBytes

support throttling read rate in bytes.

Also bookkeeper shell recover command supports throttle.

@gaozhangmin gaozhangmin changed the title Throttle replicate rate in bytes Ledger replicate supports throttle Aug 27, 2021
@gaozhangmin gaozhangmin marked this pull request as draft August 30, 2021 05:22
@gaozhangmin gaozhangmin marked this pull request as ready for review August 30, 2021 16:19
@gaozhangmin
Copy link
Contributor Author

gaozhangmin commented Aug 31, 2021

below is the throttle results. with replicationRateByBytes = 50MB
image

@eolivelli @hangc0276 PTAL

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I support this patch.
I wonder if it is possible to not add new constructors and pass ServerConfiguration down to the various components.

@gaozhangmin
Copy link
Contributor Author

@eolivelli PTAL, thanks

@gaozhangmin gaozhangmin force-pushed the replication-throttle branch 3 times, most recently from 8c3ae00 to 60305e2 Compare September 16, 2021 04:56
@gaozhangmin
Copy link
Contributor Author

@dlg99 @hangc0276 @nicoloboschi PTAL

Copy link
Contributor

@hangc0276 hangc0276 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@hangc0276
Copy link
Contributor

@gaozhangmin You'd better use one parameter to control read and write throttle by bytes, which will simplify the configuration for users.

@hangc0276
Copy link
Contributor

@gaozhangmin You can just use read throttle by bytes to control replication, maybe no need write throttle.

@gaozhangmin gaozhangmin force-pushed the replication-throttle branch 4 times, most recently from 463bc15 to 3a16ee7 Compare December 3, 2021 09:50
@gaozhangmin
Copy link
Contributor Author

@hangc0276 @eolivelli @zymap PTAL again

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@zymap zymap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me. Left some minor comments.

@gaozhangmin
Copy link
Contributor Author

@hangc0276 @zymap @nicoloboschi PTAL again, Thx.

@gaozhangmin
Copy link
Contributor Author

image
image

throttle results updated as above replicationRateByBytes = 50MB

Copy link
Contributor

@hangc0276 hangc0276 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@hangc0276
Copy link
Contributor

rerun-failure-tests

@zymap
Copy link
Member

zymap commented Dec 7, 2021

rerun failure checks

@zymap
Copy link
Member

zymap commented Dec 13, 2021

@gaozhangmin Could you please take a look at the conflicts? I want to merge this PR

@gaozhangmin
Copy link
Contributor Author

@gaozhangmin Could you please take a look at the conflicts? I want to merge this PR

done.

@gaozhangmin
Copy link
Contributor Author

@zymap

@zymap zymap merged commit a2d7341 into apache:master Dec 13, 2021
zymap pushed a commit that referenced this pull request Jan 19, 2022
Descriptions of the changes in this PR:


### Motivation

improve the throttle function : old pr: #2778 
1. duplicate definition for replicationRateByBytes
2.make sure this update safety when different callback run averageEntrySize updating

### Changes

1.clean code for duplicate definition for replicationRateByBytes
2.add a lock to make sure data safety for updateAverageEntrySize
@zymap zymap added this to the 4.16.0 milestone Apr 27, 2022
zymap pushed a commit that referenced this pull request Aug 1, 2022
Ledger replicating puts  heavy loads on cluster.
Now,  ledger replicate only supports split fragments into small pieces.
 But, throttling is not supported.

Add a confiuration `replicationRateByBytes `

support throttling  read rate in bytes.

Also bookkeeper shell recover command supports throttle.

(cherry picked from commit a2d7341)
hangc0276 pushed a commit to hangc0276/bookkeeper that referenced this pull request Nov 5, 2022
### Motivation

Ledger replicating puts  heavy loads on cluster.
Now,  ledger replicate only supports split fragments into small pieces.
 But, throttling is not supported.

### Changes

Add a confiuration `replicationRateByBytes `

support throttling  read rate in bytes.

Also bookkeeper shell recover command supports throttle.

(cherry picked from commit a2d7341)
hangc0276 pushed a commit to hangc0276/bookkeeper that referenced this pull request Nov 5, 2022
Descriptions of the changes in this PR:

improve the throttle function : old pr: apache#2778
1. duplicate definition for replicationRateByBytes
2.make sure this update safety when different callback run averageEntrySize updating

1.clean code for duplicate definition for replicationRateByBytes
2.add a lock to make sure data safety for updateAverageEntrySize

(cherry picked from commit 7f31748)
hangc0276 pushed a commit to hangc0276/bookkeeper that referenced this pull request Nov 7, 2022
### Motivation

Ledger replicating puts  heavy loads on cluster.
Now,  ledger replicate only supports split fragments into small pieces.
 But, throttling is not supported.

### Changes

Add a confiuration `replicationRateByBytes `

support throttling  read rate in bytes.

Also bookkeeper shell recover command supports throttle.

(cherry picked from commit a2d7341)
hangc0276 pushed a commit to hangc0276/bookkeeper that referenced this pull request Nov 7, 2022
Descriptions of the changes in this PR:

improve the throttle function : old pr: apache#2778
1. duplicate definition for replicationRateByBytes
2.make sure this update safety when different callback run averageEntrySize updating

1.clean code for duplicate definition for replicationRateByBytes
2.add a lock to make sure data safety for updateAverageEntrySize

(cherry picked from commit 7f31748)
nicoloboschi pushed a commit to datastax/bookkeeper that referenced this pull request Jan 11, 2023
### Motivation

Ledger replicating puts  heavy loads on cluster.
Now,  ledger replicate only supports split fragments into small pieces.
 But, throttling is not supported.

### Changes

Add a confiuration `replicationRateByBytes `

support throttling  read rate in bytes.

Also bookkeeper shell recover command supports throttle.

(cherry picked from commit a2d7341)
(cherry picked from commit 7267058)
nicoloboschi pushed a commit to datastax/bookkeeper that referenced this pull request Jan 11, 2023
Descriptions of the changes in this PR:

improve the throttle function : old pr: apache#2778
1. duplicate definition for replicationRateByBytes
2.make sure this update safety when different callback run averageEntrySize updating

1.clean code for duplicate definition for replicationRateByBytes
2.add a lock to make sure data safety for updateAverageEntrySize

(cherry picked from commit 7f31748)
(cherry picked from commit a13dfce)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants