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

Increase default transientstoreMaxBlockRetention #4569

Merged

Conversation

yeasy
Copy link
Member

@yeasy yeasy commented Dec 8, 2023

Increase the default value of transientstoreMaxBlockRetention

Change-Id: I24eb6a6c4be38fbb964970b518d40c72e02e12ff

Type of change

  • Improvement (improvement to code, performance, etc)

Description

transientstoreMaxBlockRetention is used to trigger the purge of private data in the transient store.

The current default value is 1000, which is OK for simple cases with several blocks per second. Howerver, in our test with 10K tps case, it is possible to purge the private data too early before the peer gets a chance to commit the tx into the ledger.

With a larger retention window, the only cost is a larger transient database in the peer node, which is not a big deal.

Hence, this patchset suggest to increase the default value to a larger value of 100000, and it is open to have other reasonable value too.

Additional details

N/A

Related issues

N/A

Release Note

N/A

@yeasy yeasy requested a review from a team as a code owner December 8, 2023 18:57
@denyeart
Copy link
Contributor

denyeart commented Dec 8, 2023

How often are you cutting blocks when running at 10k tps?

If you cut a block once a second, the current setting would keep transient data for 1000 seconds (16 minutes), which seems reasonable given that the intention is to only store the transient data for the brief period of time between endorsement and commit.

If you are cutting blocks much more frequently though, I can see where 1000 could become a problem (but at the same time, if you cut blocks too frequently you start to lose some efficiencies). Would 10000 be a sufficient setting for your use case?

@yeasy
Copy link
Member Author

yeasy commented Dec 8, 2023

The CI error is related to the gateway testing, should have nothing to do with the PR.

@yeasy
Copy link
Member Author

yeasy commented Dec 15, 2023

How often are you cutting blocks when running at 10k tps?

If you cut a block once a second, the current setting would keep transient data for 1000 seconds (16 minutes), which seems reasonable given that the intention is to only store the transient data for the brief period of time between endorsement and commit.

If you are cutting blocks much more frequently though, I can see where 1000 could become a problem (but at the same time, if you cut blocks too frequently you start to lose some efficiencies). Would 10000 be a sufficient setting for your use case?

The block is cut frequently in order to reduce the latency. And in some case, the commit can be seconds later after the endorsement.

@denyeart
Copy link
Contributor

@yeasy Would 10000 be a sufficient setting for your use case?

@yeasy
Copy link
Member Author

yeasy commented Dec 15, 2023

@yeasy Would 10000 be a sufficient setting for your use case?

100,000 is more safe, but I'm OK to accept 10,000 or other larger value as the default value.
1000 is too small by default.

@denyeart
Copy link
Contributor

@yeasy How about if you update the PR to 10,000 (or maybe 20,000 if you prefer).

transientstoreMaxBlockRetention is used to trigger the purge of private
data in the transient store.

The current default value is 1000, which is OK for simple cases with
several blocks per second. Howerver, in our test with 10K tps case, it
is possible to purge the private data too early before the peer gets a
chance to commit the tx into the ledger.

With a larger retention window, the only cost is a larger transient
database in the peer node, which is not a big deal.

Hence, this patchset suggest to increase the default value to a larger
value of 100000, and it is open to have other reasonable value too.

Change-Id: I24eb6a6c4be38fbb964970b518d40c72e02e12ff
Signed-off-by: Baohua Yang <yangbaohua@gmail.com>
Signed-off-by: Baohua Yang <baohua.yang@oracle.com>
@yeasy yeasy force-pushed the increase_transientstoreMaxBlockRetention branch from ee86195 to b993d90 Compare January 22, 2024 19:13
@yeasy
Copy link
Member Author

yeasy commented Jan 22, 2024

@yeasy How about if you update the PR to 10,000 (or maybe 20,000 if you prefer).

Sure, just pick 20,000 as the new value.

@denyeart denyeart merged commit c2e608c into hyperledger:main Jan 22, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants