-
Notifications
You must be signed in to change notification settings - Fork 91
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
Node startup performance #337
Comments
- "ChainedBlocksDataBytes" was not really used, but required loading of all headers on startup. Removed to improve performance from 52 seconds to 42 seconds. - This was discovered independent of stratisproject/StratisFullNode#233, but linking to that issue to help Stratis and Blockcore-based blockchains to take the improvement. - #337
- This is a small improvement on the performance, there are alternative ways to do this than using Dictionary, which is a little bit faster still. This is the cleanest example, please suggest and try out improvements. - Only the LevelDB implementation has been verified. - #337
- The deployment flags are cached when calculated as new blocks come in. - The deployment flags are read from cache at startup, as they cannot have changed since shutdown. - This gives a very big improvement on node startup. - #337
I ran always in debug mode, one warmup before recording two runs: Before any changes: [2021-05-18 07:43:43.7133 1] INFO: Blockcore.FullNode.Initialize Full node initialized on EXOSMain. 52 seconds [2021-05-18 07:46:15.7802 1] INFO: Blockcore.FullNode.Initialize Full node initialized on EXOSMain. 51 seconds Fix: #338 [2021-05-18 07:51:31.1402 1] INFO: Blockcore.FullNode.Initialize Full node initialized on EXOSMain. 40 seconds [2021-05-18 07:53:29.6883 1] INFO: Blockcore.FullNode.Initialize Full node initialized on EXOSMain. 42 seconds Fix: #339 [2021-05-18 08:51:56.1037 1] INFO: Blockcore.FullNode.Initialize Full node initialized on EXOSMain. 49 seconds [2021-05-18 08:52:59.8231 1] INFO: Blockcore.FullNode.Initialize Full node initialized on EXOSMain. 51 seconds Fix: #340 [2021-05-18 11:51:44.4608 1] INFO: Blockcore.FullNode.Initialize Full node initialized on EXOSMain. 35 seconds [2021-05-18 11:52:32.8144 1] INFO: Blockcore.FullNode.Initialize Full node initialized on EXOSMain. 34 seconds Total: ~32 seconds of 52 seconds saved, had startups at 17-20 seconds on EXOS with all fixes applied. |
This is pretty good I agree |
- "ChainedBlocksDataBytes" was not really used, but required loading of all headers on startup. Removed to improve performance from 52 seconds to 42 seconds. - This was discovered independent of stratisproject/StratisFullNode#233, but linking to that issue to help Stratis and Blockcore-based blockchains to take the improvement. - #337
* Cache the deployment flags to improve startup - The deployment flags are cached when calculated as new blocks come in. - The deployment flags are read from cache at startup, as they cannot have changed since shutdown. - This gives a very big improvement on node startup. - #337 * Add empty constructor - Needed for tests. * Add null check for integration tests * Move persisting of flags to BaseFeature - Check the flags every minute and persist if needed. - This only validates ScriptFlags, not BIP30/BIP34/LockTimeFlags.
The text was updated successfully, but these errors were encountered: