This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ock-time-offset-us & last-block-cpu-duty-cycle-pct together. These config options now specify the amount of time of the 500ms block interval to use for producing a block. The existing options produce-time-offset-us & last-block-time-offset-us are now restricted to the 500ms block interval; they no longer allow positive offsets. Offsets are now always in term of the block time.
Can we automatically calculate the percentage based on the CPU performance, and we can control that by setting below configuration in eosio.
|
@jjzhangg We would like to explore automatically adjusting this setting in a running system. However, tying it to cpu frequency I don't think is any different than this pull request of just setting a percentage. Instead it would be nice to adjust according to latency/load/forks or other heuristics. |
…y-cyle-pct to last-block-cpu-effort-percent to better describe the options.
arhag
approved these changes
Feb 4, 2020
arhag
approved these changes
Feb 4, 2020
This was referenced Feb 5, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Description
CPU block effort provides a mechanism to restrict the amount of time a producer is processing transactions for inclusion into a block. It also controls the time a producer will finalize/produce and transmit a block. Block construction now always begins at whole or half seconds for the next block.
Added new options
cpu-effort-percent
&last-block-cpu-effort-percent
defaulted to 80%. Percentage of cpu block production time used to produce block. Whole number percentages, e.g. 80 for 80%.These options allow time outside of
start_block
for other system activity such as net_plugin sending/receiving blocks, signing of block, etc.Existing options
produce-time-offset-us
&last-block-time-offset-us
have been modified to constrain configurable values from0 .. -block_time_interval
where currently block_time_interval is 500,000us. Positive values are no longer allowed.The default value of
produce-time-offset-us
is now effectively-100000
sincecpu-effort-percent
is defaulted to80%
.These four options now all fold into restricting the amount of time spent processing transactions into a block. The
last-block-*
options constrain the final 12th block of the producer's round. The other two options constrain the remaining blocks of the round, 1-11. The more constraining amount is used. For example,--cpu-effort-percent 80 --produce-time-offset-us -300000
will constrain transaction processing to200ms
as80% x 500ms = 400ms
and500ms - 300ms = 200ms
.Other examples:
--cpu-effort-percent 70 --produce-time-offset-us -100000
provides 350ms for transaction processing.--last-block-cpu-effort-percent 70 --last-block-time-offset-us -400000
provides 100ms for transaction processing for the last block of the roundConsensus Changes
API Changes
Documentation Additions
See above.