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

Performance degradation for v1.6.15 fix #5899

Merged
merged 4 commits into from Feb 14, 2024

Conversation

iulianpascalau
Copy link
Contributor

@iulianpascalau iulianpascalau commented Jan 31, 2024

Reasoning behind the pull request

  • the number of go routines that the node launched for resolving the trie nodes requests interfered with the processing go routine

Proposed changes

  • added a critical section in the trie nodes resolvers and a different throttler
  • the results for trie sync performance benchmark was carried on a small & decoupled network containing mainnet data containing a full squad and a node from shard 0 that performed a trie sync. This is the worse case scenario as there is a single node that responds to trie requests data and the output antiflooder will severely limit the trie node responses.

The trie sync result when running with v1.6.15 version is this:

INFO [2024-01-31 16:28:36.340]   finished trie sync                       name = user accounts for shard 0 time elapsed = 40m59s num processed = 15668259 num large nodes = 0 num missing = 0 state data size = 2.16 GB total iterations = 4904541 total CPU time = 1h16m58.021939181s peak processing speed = 3.53 MB/s average processing speed = 919.48 KB/s 

The trie sync result when running with this branch is the following:

INFO [2024-01-31 17:18:46.782]   finished trie sync                       name = user accounts for shard 0 time elapsed = 44m30s num processed = 15668259 num large nodes = 0 num missing = 0 state data size = 2.16 GB total iterations = 5194380 total CPU time = 1h14m28.877860401s peak processing speed = 2.61 MB/s average processing speed = 846.79 KB/s 

Testing procedure

  • standard system test

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (34e2f28) 80.18% compared to head (1dfc18f) 80.18%.

Files Patch % Lines
...esolverscontainer/baseResolversContainerFactory.go 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           rc/v1.6.next1    #5899      +/-   ##
=================================================
- Coverage          80.18%   80.18%   -0.01%     
=================================================
  Files                709      709              
  Lines              94172    94191      +19     
=================================================
+ Hits               75509    75523      +14     
- Misses             13315    13319       +4     
- Partials            5348     5349       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

miiu96
miiu96 previously approved these changes Feb 7, 2024
AdoAdoAdo
AdoAdoAdo previously approved these changes Feb 7, 2024
NumConcurrentResolvingJobs: 10,
DataPacker: dataPacker,
TriesContainer: e.trieContainer,
SizeCheckDelta: 0,
InputAntifloodHandler: disabled.NewAntiFloodHandler(),
OutputAntifloodHandler: disabled.NewAntiFloodHandler(),
MainPreferredPeersHolder: disabled.NewPreferredPeersHolder(),
FullArchivePreferredPeersHolder: disabled.NewPreferredPeersHolder(),
PayloadValidator: payloadValidator,
ShardCoordinator: e.shardCoordinator,
MainMessenger: e.mainMessenger,
FullArchiveMessenger: e.fullArchiveMessenger,
Store: storageService,
Marshalizer: e.coreComponentsHolder.InternalMarshalizer(),
DataPools: e.dataPool,
Uint64ByteSliceConverter: uint64ByteSlice.NewBigEndianConverter(),
NumConcurrentResolvingJobs: 10,
Copy link
Contributor

Choose a reason for hiding this comment

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

we should create a task to remove the magic numbers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done: MX-15149

@iulianpascalau iulianpascalau changed the base branch from rc/sirius-patch-2 to rc/v1.6.next1 February 12, 2024 07:03
@iulianpascalau iulianpascalau dismissed stale reviews from AdoAdoAdo, miiu96, and BeniaminDrasovean February 12, 2024 07:03

The base branch was changed.

Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

Normal allin test: v1.6.15-dev-config-eb2e06c06d -> trie-resolvers-critical-se-0bba37f502

--- Specific errors ---

block hash does not match 1569
wrong nonce in block 689
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 0
receipts hash missmatch 0

/------/

--- Statistics ---

Nr. of all ERRORS: 0
Nr. of all WARNS: 1094
Nr. of new ERRORS: 0
Nr. of new WARNS: 0
Nr. of PANICS: 0

/------/

--- ERRORS ---

/------/

--- WARNINGS ---

/------/

@gabi-vuls gabi-vuls merged commit b5be263 into rc/v1.6.next1 Feb 14, 2024
7 of 8 checks passed
@gabi-vuls gabi-vuls deleted the trie-resolvers-critical-section branch February 14, 2024 09:21
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