Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

add metrics for startup #17913

Merged
merged 4 commits into from
Jun 14, 2021
Merged

Conversation

jeffwashington
Copy link
Contributor

@jeffwashington jeffwashington commented Jun 12, 2021

Problem

A goal is to speedup startup time of validator. Would be nice to have metrics over more parts.

Summary of Changes

Add metric for the major parts of preparing to start. This at least excludes snapshot download, gossip work, and initial replay.
Fixes #

@codecov
Copy link

codecov bot commented Jun 12, 2021

Codecov Report

Merging #17913 (f887db1) into master (a087223) will decrease coverage by 0.0%.
The diff coverage is 63.1%.

@@            Coverage Diff            @@
##           master   #17913     +/-   ##
=========================================
- Coverage    82.6%    82.6%   -0.1%     
=========================================
  Files         431      431             
  Lines      121295   121321     +26     
=========================================
+ Hits       100250   100271     +21     
- Misses      21045    21050      +5     

@jeffwashington
Copy link
Contributor Author

jeffwashington commented Jun 14, 2021

datapoint: bank_from_archive rebuild_bank_from_snapshots_us=60867700i untar_us=35856477i verify_snapshot_bank_us=42710792i total=139434969i
drop(bank_forks): 25041646us

@jeffwashington jeffwashington marked this pull request as ready for review June 14, 2021 03:56
@jeffwashington jeffwashington requested a review from sakridge June 14, 2021 03:58
@jeffwashington
Copy link
Contributor Author

Looks like I should move this higher still. Startup metrics are likely different than steady state metrics.

@jeffwashington jeffwashington removed the request for review from sakridge June 14, 2021 04:30
@jeffwashington jeffwashington marked this pull request as draft June 14, 2021 04:30
@jeffwashington jeffwashington force-pushed the 65k2 branch 3 times, most recently from 1d1e7af to 1b9a485 Compare June 14, 2021 18:42
let mut drop_time = Measure::start("drop_time");
drop(bank_forks);
drop_time.stop();
info!("drop(bank_forks): {}us", drop_time.as_us());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This drop coincides with a long delay after ledger-tool verify is finished. Reporting this will help the next person verify that this portion of the validator code path is capturing time correctly. Without the explicit drop, the time is when bank_forks goes out of scope and is dropped.

@jeffwashington jeffwashington force-pushed the 65k2 branch 2 times, most recently from 7ac25d6 to bc68657 Compare June 14, 2021 19:12
@jeffwashington jeffwashington marked this pull request as ready for review June 14, 2021 19:12
@jeffwashington jeffwashington requested a review from sakridge June 14, 2021 19:13
sakridge
sakridge previously approved these changes Jun 14, 2021
Copy link
Contributor

@sakridge sakridge left a comment

Choose a reason for hiding this comment

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

lgtm

@mergify mergify bot dismissed sakridge’s stale review June 14, 2021 20:47

Pull request has been modified.

@jeffwashington jeffwashington merged commit 471b341 into solana-labs:master Jun 14, 2021
mergify bot pushed a commit that referenced this pull request Jun 15, 2021
* add metrics for startup

* roll timings up higher

* fix test

* fix duplicate

(cherry picked from commit 471b341)

# Conflicts:
#	ledger/src/bank_forks_utils.rs
#	runtime/src/snapshot_utils.rs
jeffwashington added a commit that referenced this pull request Jun 15, 2021
    * add metrics for startup

    * roll timings up higher

    * fix test

    * fix duplicate

    (cherry picked from commit 471b341)

    # Conflicts:
    #       ledger/src/bank_forks_utils.rs
    #       runtime/src/snapshot_utils.rs
conflicts because #17778 is not present.
mergify bot added a commit that referenced this pull request Jun 16, 2021
* add metrics for startup

    * roll timings up higher

    * fix test

    * fix duplicate

    (cherry picked from commit 471b341)

    # Conflicts:
    #       ledger/src/bank_forks_utils.rs
    #       runtime/src/snapshot_utils.rs
conflicts because #17778 is not present.

Co-authored-by: Jeff Washington (jwash) <[email protected]>
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants