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

don't start extra threads for shrink/clean/hash #23858

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

jeffwashington
Copy link
Contributor

Problem

Summary of Changes

Fixes #

@jeffwashington jeffwashington marked this pull request as ready for review March 23, 2022 02:32
@jeffwashington jeffwashington requested a review from HaoranYi March 23, 2022 16:24
Copy link
Contributor

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

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

looks good. just a few small suggestions.

/// startup (not steady state execution)
/// but also requesting additional threads to be running to flush the acct idx to disk asap
/// The idea is that the best perf to ssds will be with multiple threads,
/// but during steady state, we can't allocate as many threads because we'd starve the rest of the system.
Copy link
Contributor

Choose a reason for hiding this comment

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

fix indent?

pub fn set_startup(&self, value: bool) {
if value {
pub fn set_startup(&self, startup: Startup) {
let value = !matches!(startup, Startup::Normal);
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe, make it an associated method on Startup enum for checking if it is normal start?

if value {
pub fn set_startup(&self, startup: Startup) {
let value = !matches!(startup, Startup::Normal);
if matches!(startup, Startup::StartupWithExtraThreads) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above. add a method on enum to check if it is with extrathreads?

@jeffwashington jeffwashington merged commit 7b89222 into solana-labs:master Mar 23, 2022
giogam pushed a commit to giogam/solana that referenced this pull request Mar 30, 2022
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.

2 participants