-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Conversation
@siying has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
include/rocksdb/db.h
Outdated
// 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 |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
@siying updated the pull request - view changes - changes since last import |
Address the comment. |
@siying has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
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
Actually I think per DB histogram is useful, Is there a reason for not including both ? |
@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. |
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
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
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
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.