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

storage: optimize (*MemCachedStore).Persist for memory-backed ps #807

Merged
merged 1 commit into from
Mar 29, 2020

Conversation

roman-khimov
Copy link
Member

Most of the time it's persisted into the MemoryStore or MemCachedStore, when
that's the case there is no real need to go through the Batch mechanism as it
incurs multiple copies of the data.

Importing 1.5M mainnet blocks with verification turned off, before:
real 12m39,484s
user 20m48,300s
sys 2m25,022s

After:
real 11m15,053s
user 18m2,755s
sys 2m4,162s

So it's around 10% improvement which looks good enough.

Most of the time it's persisted into the MemoryStore or MemCachedStore, when
that's the case there is no real need to go through the Batch mechanism as it
incurs multiple copies of the data.

Importing 1.5M mainnet blocks with verification turned off, before:
real    12m39,484s
user    20m48,300s
sys     2m25,022s

After:
real    11m15,053s
user    18m2,755s
sys     2m4,162s

So it's around 10% improvement which looks good enough.
@roman-khimov roman-khimov added this to the v0.74.1 milestone Mar 28, 2020
@codecov
Copy link

codecov bot commented Mar 28, 2020

Codecov Report

Merging #807 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #807      +/-   ##
==========================================
+ Coverage   66.75%   66.79%   +0.03%     
==========================================
  Files         141      141              
  Lines       12963    12977      +14     
==========================================
+ Hits         8654     8668      +14     
  Misses       3899     3899              
  Partials      410      410
Impacted Files Coverage Δ
pkg/core/storage/memcached_store.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 198fffb...4758de7. Read the comment docs.

@roman-khimov roman-khimov merged commit 237de73 into master Mar 29, 2020
@roman-khimov roman-khimov deleted the optimize-memcached-persist branch March 29, 2020 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants