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

Fix block size throttle #1999

Merged
merged 5 commits into from Jun 25, 2020
Merged

Conversation

SebastianMarian
Copy link
Contributor

@SebastianMarian SebastianMarian commented Jun 23, 2020

  • Optimized mutex Lock/Unlock in txsPoolsCleaner component
  • Tweaked some parameters in createAndProcessCrossMiniBlocksDstMe (how many shard/meta headers could be included in one block)
  • Reduced number of go routines from 2000 to 100
  • Tweaked some parameters in blockSizeThrottle component to speed up adaptivity to the network conditions
  • Fixed a situation when block max size, from blockSizeThrottle component, is increased to slow after a network problem

* Tweaked some parameters in createAndProcessCrossMiniBlocksDstMe (how many shard/meta headers should be included in one block)
* Reduced number of go routines from 2000 to 100
* Tweaked some parameters in blockSizeThrottle component to speed up adaptivity to the network conditions
* Fixed a situation when block max size, from blockSizeThrottle component,  is increased to slow after a network problem
@SebastianMarian SebastianMarian added the type:feature New feature or request label Jun 23, 2020
@SebastianMarian SebastianMarian self-assigned this Jun 23, 2020
@sasurobert sasurobert self-requested a review June 23, 2020 11:12
@@ -18,7 +18,7 @@ import (
"github.com/ElrondNetwork/elrond-go/sharding"
)

const numGoRoutines = 2000
const numGoRoutines = 100
Copy link
Collaborator

Choose a reason for hiding this comment

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

Dramatic decrease :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, this was the suggested value by @iulianpascalau

@@ -178,10 +178,11 @@ func (tpc *txsPoolsCleaner) processReceivedTx(
receiverShardID uint32,
txType int8,
) {
tpc.mutMapTxsRounds.Lock()
defer tpc.mutMapTxsRounds.Unlock()
tpc.mutMapTxsRounds.RLock()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now I see that the cleaner removes each tx individually, it doesn't call the bulk operations (e.g. RemoveSetOfDataFromPool) but that should be fine nonetheless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because we don't have such a method implemented, but anyway the cleanTxsPoolsIfNeeded method is ran only once per minute.

Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

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

System tests passed.

@LucianMincu LucianMincu merged commit 13d4b2c into release-candidate Jun 25, 2020
@LucianMincu LucianMincu deleted the fix-block-size-throttle branch June 25, 2020 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants