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

Introduce the LOTUS_CHAIN_BADGERSTORE_DISABLE_FSYNC envvar #6817

Merged
merged 1 commit into from
Jul 22, 2021

Conversation

ribasushi
Copy link
Collaborator

This is a redux of #5050

Allows the user to control the opts.SyncWrites option of BadgerDs, with the tri-state environment variable LOTUS_CHAIN_BADGERSTORE_DISABLE_FSYNC

  • unset == the default (currently fsync enabled)
  • set with a false-y value ( "", "0", "no", "false" ) == fsync enabled no matter what a future default is
  • set with any other value == fsync is disabled ignored defaults (recommended for day-to-day use)

Applying this brought @whyrusleeping's average chain validation times from "impossible to sync" ( > 30s ) down to 1~3s/tipset

Allows the user to control the opts.SyncWrites option of BadgerDs
@ribasushi ribasushi requested a review from a team as a code owner July 21, 2021 20:42
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

It would be nice if we could use the config for this.

(also should apply to the splitstore hotstore badger)

@ribasushi
Copy link
Collaborator Author

@magik6k there is opposition to this option on the team ( see previous issue ), so the suggested way forward was an undocumented envvar. I can certainly plumb this through the config, but I am not sure exposing this functionality is generally desired....

(also should apply to the splitstore hotstore badger)

@vyzo can you help with a pointer which spots should be covered? ( having a bit of trouble navigating through the new codebase )

@vyzo
Copy link
Contributor

vyzo commented Jul 22, 2021

The spllitstore badger uses the fsrepo options constructor, so we should be covered by this.

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.

3 participants