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

Multithreaded wallet syncing #821

Merged
merged 8 commits into from May 20, 2019

Conversation

Projects
None yet
2 participants
@zpalmtree
Copy link
Collaborator

commented May 17, 2019

Multi-threads the wallet syncing progress. Threads are configurable via command line option.

  • I have encountered a couple of rare crashes with std::bad_alloc. Have not managed to track down or have a good method to reproduce, hence marked WIP. If anyone is bored and wants to do some performance testing or debugging and could figure out how to reproduce it, that would be grand.

  • I don't have any performance numbers right now. It was not much faster than with block prefetch when I tested, due to being bottlenecked by the daemon. Planning on looking for some performance improvements there, but do not expect to find many. I also plan on doing a full sync from zero comparison, but the daemon is not playing ball right now.

  • This should help lower powered devices which are not bottlenecked on the daemon so much (for example, arm devices and phones) to sync with more speed by utilizing their threads more effectively.

Program Node Type Block Pre Fetch Time To Sync From Zero Blocks Per Second Threads
zedwallet-beta Local Yes 57:40 minutes 440 12
zedwallet-beta Local Yes 108:36 minutes 232 1
C++ on Phone Cache Yes 280:44 minutes 89 1
C++ on Phone Cache Yes 275:43 minutes 91 8
zedwallet Local Unknown 85:00 minutes 295 Unknown
@zpalmtree

This comment has been minimized.

Copy link
Collaborator Author

commented May 19, 2019

The build now passes. I believe I have also fixed the crashes.

@zpalmtree zpalmtree changed the title WIP: Multithreaded wallet syncing Multithreaded wallet syncing May 19, 2019

@zpalmtree

This comment has been minimized.

Copy link
Collaborator Author

commented May 19, 2019

Working on performance numbers now for a few different configurations and devices...

@zpalmtree zpalmtree requested a review from brandonlehmann May 19, 2019

@brandonlehmann
Copy link
Collaborator

left a comment

Aside from possibly re-ordering the help option(s) this looks good to go.

@zpalmtree zpalmtree requested a review from brandonlehmann May 20, 2019

@zpalmtree zpalmtree force-pushed the zpalmtree:multithreaded-sync branch from 8b38856 to aa9a5aa May 20, 2019

@brandonlehmann brandonlehmann merged commit 1070fc9 into turtlecoin:development May 20, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.