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

Add Options::DisableExtraChecks, clarify force_consistency_checks #9363

Closed
wants to merge 4 commits into from

Conversation

pdillinger
Copy link
Contributor

Summary: In response to #9354, this PR adds a way for users to "opt out"
of extra checks that can impact peak write performance, which
currently only includes force_consistency_checks. I considered including
some other options but did not see a db_bench performance difference.

Also clarify in comment for force_consistency_checks that it can "slow
down saturated writing."

Test Plan: basic coverage in unit tests

Using my perf test in #9354 comment, I see

force_consistency_checks=true -> 725360 ops/s
force_consistency_checks=false -> 783072 ops/s

Summary: In response to facebook#9354, this PR adds a way for users to "opt out"
of extra checks that can impact peak write performance, which
currently only includes force_consistency_checks. I considered including
some other options but did not see a db_bench performance difference.

Also clarify in comment for force_consistency_checks that it can "slow
down saturated writing."

Test Plan: basic coverage in unit tests

Using my perf test in facebook#9354 comment, I see

force_consistency_checks=true -> 725360 ops/s
force_consistency_checks=false -> 783072 ops/s
Copy link
Contributor

@mrambacher mrambacher left a comment

Choose a reason for hiding this comment

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

I do not know what the standard is supposed to be here, but shouldn't these options also be disabled in OldDefaults if prior to 6.11? I would guess there are other options to be considered for OldDefaults as well...

@pdillinger
Copy link
Contributor Author

OldDefaults is not maintained and I would not trust it to be unless we had some automated way of validating it. Lack of PRs/issues suggests either people aren't too interested in using it or aren't sensitive to its inaccuracy.

I'm more inclined to mark it as "unmaintained" than to fix this one case so long after the change.

Copy link
Contributor

@mrambacher mrambacher left a comment

Choose a reason for hiding this comment

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

Please add a comment to OldDefaults about not being maintained and address the nit. Otherwise, LGTM.


DEFINE_bool(check_flush_compaction_key_order,
ROCKSDB_NAMESPACE::Options().check_flush_compaction_key_order,
"During flush or compaction, check whether keys inserted to "
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: "inserted into"

@facebook-github-bot
Copy link
Contributor

@pdillinger has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@mrambacher mrambacher left a comment

Choose a reason for hiding this comment

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

Approved, but would recommend toning down the comment on "OldDefaults" prior to checkin

// DEPRECATED: This function might be removed in a future release.
// In general, defaults are changed to suit broad interests. Opting
// out of a change on upgrade should be deliberate and considered
// rather than automatic and thoughtless.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we end the comment after "considered". The rest of sounds mean and condescending.

// The function recovers options to the option as in version 4.6.
// Change to some default settings from an older version.
// NOT MAINTAINED: This function has not been and is not maintained.
// DEPRECATED: This function might be removed in a future release.
Copy link
Contributor

Choose a reason for hiding this comment

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

Personally, I am sad that this is not better maintained but know that it has not been and it would be hard to recreate. This function could be a good way to test (via db_bench or db_stress) whether or not options were causing performance or other regressions.

Having said that, I can see how this function would be very difficult to maintain. Perhaps instead there should be a section in HISTORY (or some clear markings there) to indicate what options were added or defaults were changed in a given release. This should allow better correlation of running tests/regressions of functionality between releases.

@facebook-github-bot
Copy link
Contributor

@pdillinger has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@pdillinger has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot pushed a commit that referenced this pull request Feb 18, 2022
Summary:
`ColumnFamilyOptions::OldDefaults` and `DBOptions::OldDefaults`
now deprecated. Were previously overlooked with `Options::OldDefaults` in #9363

Pull Request resolved: #9594

Test Plan: comments only

Reviewed By: jay-zhuang

Differential Revision: D34318592

Pulled By: pdillinger

fbshipit-source-id: 773c97a61e2a8290ae154f363dd61c1f35a9dd16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants