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

File level histogram should be printed per CF, not per DB #2126

Closed
wants to merge 1 commit into from

Conversation

siying
Copy link
Contributor

@siying siying commented Apr 11, 2017

Summary:
Currently level histogram is only printed out for DB stats and for default CF. This is confusing. Change to print for every CF instead.

Test Plan:Run all existing tests. Add unit test.

@facebook-github-bot
Copy link
Contributor

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

// db's lifetime ("Sum"), and aggregated over the interval since the
// last retrieval ("Int").
// "rocksdb.cfstats" - Both of "rocksdb.cf-file-histogram" and
// "rocksdb.cf-file-histogram" together. See below for description
Copy link
Contributor

Choose a reason for hiding this comment

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

rocksdb.cfstats-no-file-histogram

void InternalStats::DumpCFFileHistogram(std::string* value) {
char buf[2000];
snprintf(buf, sizeof(buf),
"\n** File Read Latency Histogram By Level [%s] **\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for adding column family name, I think currently it doesn't specify.

Summary:
Currently level histogram is only printed out for DB stats and for default CF. This is confusing. Change to print for every CF instead.

Test Plan:Run all existing tests. Add unit test.
@facebook-github-bot
Copy link
Contributor

@siying updated the pull request - view changes - changes since last import

@siying
Copy link
Contributor Author

siying commented Apr 11, 2017

Address the comment.

@facebook-github-bot
Copy link
Contributor

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

mikhail-antonov pushed a commit to mikhail-antonov/rocksdb that referenced this pull request Apr 12, 2017
Summary:
Currently level histogram is only printed out for DB stats and for default CF. This is confusing. Change to print for every CF instead.
Closes facebook#2126

Differential Revision: D4865373

Pulled By: siying

fbshipit-source-id: 1c853e0ac66e00120ee931cabc9daf69ccc2d577
@IslamAbdelRahman
Copy link
Contributor

Actually I think per DB histogram is useful, Is there a reason for not including both ?

@ajkr
Copy link
Contributor

ajkr commented Jul 5, 2017

@IslamAbdelRahman IIRC, the histogram that was printed before in dbstats was (misleadingly) the default column family's histogram. I don't think we've implemented per-DB histogram yet.

pdillinger added a commit to pdillinger/rocksdb that referenced this pull request Jun 10, 2021
Summary:
DBImpl::DumpStats is supposed to do this:
Dump DB stats to LOG
For each CF, dump CFStatsNoFileHistogram to LOG
For each CF, dump CFFileHistogram to LOG

Instead, due to a longstanding bug from 2017 (facebook#2126), it would dump
CFStats, which includes both CFStatsNoFileHistogram and CFFileHistogram,
in both loops, resulting in near-duplicate output.

This fixes the bug.

Test Plan: Manual inspection of LOG
facebook-github-bot pushed a commit that referenced this pull request Jun 12, 2021
Summary:
DBImpl::DumpStats is supposed to do this:
Dump DB stats to LOG
For each CF, dump CFStatsNoFileHistogram to LOG
For each CF, dump CFFileHistogram to LOG

Instead, due to a longstanding bug from 2017 (#2126), it would dump
CFStats, which includes both CFStatsNoFileHistogram and CFFileHistogram,
in both loops, resulting in near-duplicate output.

This fixes the bug.

Pull Request resolved: #8380

Test Plan: Manual inspection of LOG after db_bench

Reviewed By: jay-zhuang

Differential Revision: D29017535

Pulled By: pdillinger

fbshipit-source-id: 3010604c4a629a80347f129cd746ce9b0d0cbda6
pdillinger added a commit to pdillinger/rocksdb that referenced this pull request Jul 19, 2021
Summary:
DBImpl::DumpStats is supposed to do this:
Dump DB stats to LOG
For each CF, dump CFStatsNoFileHistogram to LOG
For each CF, dump CFFileHistogram to LOG

Instead, due to a longstanding bug from 2017 (facebook#2126), it would dump
CFStats, which includes both CFStatsNoFileHistogram and CFFileHistogram,
in both loops, resulting in near-duplicate output.

This fixes the bug.

Pull Request resolved: facebook#8380

Test Plan: Manual inspection of LOG after db_bench

Reviewed By: jay-zhuang

Differential Revision: D29017535

Pulled By: pdillinger

fbshipit-source-id: 3010604c4a629a80347f129cd746ce9b0d0cbda6
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.

4 participants