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
Fix block size throttle #1999
Conversation
SebastianMarian
commented
Jun 23, 2020
•
edited
edited
- 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
@@ -18,7 +18,7 @@ import ( | |||
"github.com/ElrondNetwork/elrond-go/sharding" | |||
) | |||
|
|||
const numGoRoutines = 2000 | |||
const numGoRoutines = 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dramatic decrease :)
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System tests passed.