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

Extend property map with compaction stats #2794

Closed
wants to merge 2 commits into from

Conversation

Tema
Copy link

@Tema Tema commented Aug 28, 2017

Summary:
This branch extends existing property map which keeps values in doubles to keep values in strings so that it can be used to provide wider range of properties. The immediate need for that is to provide IO stall stats in an easy parseable way to MyRocks which is also part of this branch.

Test Plan:
Modify the existing tests which uses doubles to use strings.
Added IO stall are tested thought MyRocks test.

@facebook-github-bot
Copy link
Contributor

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

Summary:
This branch extends existing property map which keeps values in doubles to keep values in strings so that it can be used to provide wider range of properties. The immediate need for that is to provide IO stall stats in an easy parseable way to MyRocks which is also part of this branch.

Test Plan:
Modify the existing tests which uses doubles to use strings.
Added IO stall are tested thought MyRocks test.
@facebook-github-bot
Copy link
Contributor

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

cf_stats_count_[LEVEL0_NUM_FILES_TOTAL] +
cf_stats_count_[SOFT_PENDING_COMPACTION_BYTES_LIMIT] +
cf_stats_count_[HARD_PENDING_COMPACTION_BYTES_LIMIT] +
cf_stats_count_[MEMTABLE_COMPACTION] + cf_stats_count_[MEMTABLE_SLOWDOWN];
Copy link
Contributor

Choose a reason for hiding this comment

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

There are 2 kinds of stalls
slow down stalls -> Writes continue but with slow down penalty
stopping stalls -> Writes totally stop

I think we should have two different counters ("total_slowdown_stall", "total_stop_stall"

Also applied clang-format for modified code
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

uint64_t total_stop =
cf_stats_count_[LEVEL0_NUM_FILES_TOTAL] +
cf_stats_count_[HARD_PENDING_COMPACTION_BYTES_LIMIT] +
cf_stats_count_[MEMTABLE_COMPACTION];
Copy link
Contributor

Choose a reason for hiding this comment

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

we should rename these constants (unrelated to your diff), they aren't descriptive at all.

Copy link
Contributor

@ajkr ajkr left a comment

Choose a reason for hiding this comment

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

note the double-to-string conversion is done while holding the db mutex. I think it's ok as GetMapProperty is already expensive for populating a map and not called internally.

Copy link
Contributor

@IslamAbdelRahman IslamAbdelRahman left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks!

@facebook-github-bot
Copy link
Contributor

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

Copy link
Contributor

@ajkr ajkr left a comment

Choose a reason for hiding this comment

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

suggested new names

void InternalStats::DumpCFMapStatsIOStalls(
std::map<std::string, std::string>* cf_stats) {
(*cf_stats)["io_stalls.level0_slowdown"] =
std::to_string(cf_stats_count_[LEVEL0_SLOWDOWN_TOTAL]);
Copy link
Contributor

@ajkr ajkr Sep 1, 2017

Choose a reason for hiding this comment

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

L0_FILE_COUNT_LIMIT_SLOWDOWNS

(*cf_stats)["io_stalls.level0_slowdown"] =
std::to_string(cf_stats_count_[LEVEL0_SLOWDOWN_TOTAL]);
(*cf_stats)["io_stalls.level0_slowdown_with_compaction"] =
std::to_string(cf_stats_count_[LEVEL0_SLOWDOWN_WITH_COMPACTION]);
Copy link
Contributor

@ajkr ajkr Sep 1, 2017

Choose a reason for hiding this comment

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

LOCKED_L0_FILE_COUNT_LIMIT_SLOWDOWNS

(*cf_stats)["io_stalls.level0_slowdown_with_compaction"] =
std::to_string(cf_stats_count_[LEVEL0_SLOWDOWN_WITH_COMPACTION]);
(*cf_stats)["io_stalls.level0_numfiles"] =
std::to_string(cf_stats_count_[LEVEL0_NUM_FILES_TOTAL]);
Copy link
Contributor

@ajkr ajkr Sep 1, 2017

Choose a reason for hiding this comment

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

L0_FILE_COUNT_LIMIT_STOPS

(*cf_stats)["io_stalls.level0_numfiles"] =
std::to_string(cf_stats_count_[LEVEL0_NUM_FILES_TOTAL]);
(*cf_stats)["io_stalls.level0_numfiles_with_compaction"] =
std::to_string(cf_stats_count_[LEVEL0_NUM_FILES_WITH_COMPACTION]);
Copy link
Contributor

@ajkr ajkr Sep 1, 2017

Choose a reason for hiding this comment

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

LOCKED_L0_FILE_COUNT_LIMIT_STOPS

(*cf_stats)["io_stalls.level0_numfiles_with_compaction"] =
std::to_string(cf_stats_count_[LEVEL0_NUM_FILES_WITH_COMPACTION]);
(*cf_stats)["io_stalls.stop_for_pending_compaction_bytes"] =
std::to_string(cf_stats_count_[HARD_PENDING_COMPACTION_BYTES_LIMIT]);
Copy link
Contributor

Choose a reason for hiding this comment

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

PENDING_COMPACTION_LIMIT_STOPS

(*cf_stats)["io_stalls.stop_for_pending_compaction_bytes"] =
std::to_string(cf_stats_count_[HARD_PENDING_COMPACTION_BYTES_LIMIT]);
(*cf_stats)["io_stalls.slowdown_for_pending_compaction_bytes"] =
std::to_string(cf_stats_count_[SOFT_PENDING_COMPACTION_BYTES_LIMIT]);
Copy link
Contributor

Choose a reason for hiding this comment

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

PENDING_COMPACTION_LIMIT_SLOWDOWNS

(*cf_stats)["io_stalls.slowdown_for_pending_compaction_bytes"] =
std::to_string(cf_stats_count_[SOFT_PENDING_COMPACTION_BYTES_LIMIT]);
(*cf_stats)["io_stalls.memtable_compaction"] =
std::to_string(cf_stats_count_[MEMTABLE_COMPACTION]);
Copy link
Contributor

Choose a reason for hiding this comment

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

MEMTABLE_LIMIT_STOPS

(*cf_stats)["io_stalls.memtable_compaction"] =
std::to_string(cf_stats_count_[MEMTABLE_COMPACTION]);
(*cf_stats)["io_stalls.memtable_slowdown"] =
std::to_string(cf_stats_count_[MEMTABLE_SLOWDOWN]);
Copy link
Contributor

Choose a reason for hiding this comment

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

MEMTABLE_LIMIT_SLOWDOWNS

facebook-github-bot pushed a commit to facebook/mysql-5.6 that referenced this pull request Sep 12, 2017
Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes #695

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 21b4c50
george-lorch pushed a commit to george-lorch/percona-server that referenced this pull request Oct 26, 2017
Upstream commit ID : fb-mysql-5.6.35/3f9ff433589a3ab5cb94e249fa649835ee077321

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook/mysql-5.6#695

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 21b4c50
george-lorch pushed a commit to george-lorch/percona-server that referenced this pull request Oct 26, 2017
Upstream commit ID : fb-mysql-5.6.35/3f9ff433589a3ab5cb94e249fa649835ee077321

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook/mysql-5.6#695

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 21b4c50
george-lorch pushed a commit to george-lorch/percona-server that referenced this pull request Oct 27, 2017
Upstream commit ID : fb-mysql-5.6.35/3f9ff433589a3ab5cb94e249fa649835ee077321

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook/mysql-5.6#695

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 21b4c50
george-lorch pushed a commit to george-lorch/percona-server that referenced this pull request Oct 27, 2017
Upstream commit ID : fb-mysql-5.6.35/3f9ff433589a3ab5cb94e249fa649835ee077321

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook/mysql-5.6#695

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 21b4c50
george-lorch pushed a commit to george-lorch/percona-server that referenced this pull request Oct 30, 2017
Upstream commit ID : fb-mysql-5.6.35/3f9ff433589a3ab5cb94e249fa649835ee077321

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook/mysql-5.6#695

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 21b4c50
george-lorch pushed a commit to george-lorch/percona-server that referenced this pull request Oct 31, 2017
Upstream commit ID : fb-mysql-5.6.35/3f9ff433589a3ab5cb94e249fa649835ee077321

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook/mysql-5.6#695

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 21b4c50
george-lorch pushed a commit to george-lorch/percona-server that referenced this pull request Nov 1, 2017
Upstream commit ID : fb-mysql-5.6.35/3f9ff433589a3ab5cb94e249fa649835ee077321

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook/mysql-5.6#695

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 21b4c50
facebook-github-bot pushed a commit to facebook/mysql-5.6 that referenced this pull request Dec 23, 2019
Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes #695

Test Plan:
* Check that compaction level metrics are still published to
INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS properly
* Check the output of the command:
```
mysql> show status like 'rocksdb_stall_%';
+-----------------------------------------------------+-------+
| Variable_name                                       | Value |
+-----------------------------------------------------+-------+
| rocksdb_stall_level0_slowdown                       | 2     |
| rocksdb_stall_level0_slowdown_with_compaction       | 4     |
| rocksdb_stall_level0_numfiles                       | 10    |
| rocksdb_stall_level0_numfiles_with_compaction       | 12    |
| rocksdb_stall_stop_for_pending_compaction_bytes     | 16    |
| rocksdb_stall_slowdown_for_pending_compaction_bytes | 14    |
| rocksdb_stall_memtable_compaction                   | 6     |
| rocksdb_stall_memtable_slowdown                     | 8     |
| rocksdb_stall_total_count                           | 56    |
| rocksdb_stall_micros                                | 0     |
+-----------------------------------------------------+-------+
```
(In order to have some non-zero numbers, I've initialized internal
RocksDB stall stats with 1-8 numbers. They all doubled in output as
there are two column families in my instance: default and system.
The stall_micros has been introduced previously. total_count doesn't
include level0_slowdown_with_compaction and numfiles_with_compaction
as only their total counterparts are included in this counter.)

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 1977338
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 12, 2020
Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Test Plan:
* Check that compaction level metrics are still published to
INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS properly
* Check the output of the command:
```
mysql> show status like 'rocksdb_stall_%';
+-----------------------------------------------------+-------+
| Variable_name                                       | Value |
+-----------------------------------------------------+-------+
| rocksdb_stall_level0_slowdown                       | 2     |
| rocksdb_stall_level0_slowdown_with_compaction       | 4     |
| rocksdb_stall_level0_numfiles                       | 10    |
| rocksdb_stall_level0_numfiles_with_compaction       | 12    |
| rocksdb_stall_stop_for_pending_compaction_bytes     | 16    |
| rocksdb_stall_slowdown_for_pending_compaction_bytes | 14    |
| rocksdb_stall_memtable_compaction                   | 6     |
| rocksdb_stall_memtable_slowdown                     | 8     |
| rocksdb_stall_total_count                           | 56    |
| rocksdb_stall_micros                                | 0     |
+-----------------------------------------------------+-------+
```
(In order to have some non-zero numbers, I've initialized internal
RocksDB stall stats with 1-8 numbers. They all doubled in output as
there are two column families in my instance: default and system.
The stall_micros has been introduced previously. total_count doesn't
include level0_slowdown_with_compaction and numfiles_with_compaction
as only their total counterparts are included in this counter.)

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 1977338
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Sep 9, 2020
Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Test Plan:
* Check that compaction level metrics are still published to
INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS properly
* Check the output of the command:
```
mysql> show status like 'rocksdb_stall_%';
+-----------------------------------------------------+-------+
| Variable_name                                       | Value |
+-----------------------------------------------------+-------+
| rocksdb_stall_level0_slowdown                       | 2     |
| rocksdb_stall_level0_slowdown_with_compaction       | 4     |
| rocksdb_stall_level0_numfiles                       | 10    |
| rocksdb_stall_level0_numfiles_with_compaction       | 12    |
| rocksdb_stall_stop_for_pending_compaction_bytes     | 16    |
| rocksdb_stall_slowdown_for_pending_compaction_bytes | 14    |
| rocksdb_stall_memtable_compaction                   | 6     |
| rocksdb_stall_memtable_slowdown                     | 8     |
| rocksdb_stall_total_count                           | 56    |
| rocksdb_stall_micros                                | 0     |
+-----------------------------------------------------+-------+
```
(In order to have some non-zero numbers, I've initialized internal
RocksDB stall stats with 1-8 numbers. They all doubled in output as
there are two column families in my instance: default and system.
The stall_micros has been introduced previously. total_count doesn't
include level0_slowdown_with_compaction and numfiles_with_compaction
as only their total counterparts are included in this counter.)

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 1977338
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Sep 16, 2020
Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Test Plan:
* Check that compaction level metrics are still published to
INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS properly
* Check the output of the command:
```
mysql> show status like 'rocksdb_stall_%';
+-----------------------------------------------------+-------+
| Variable_name                                       | Value |
+-----------------------------------------------------+-------+
| rocksdb_stall_level0_slowdown                       | 2     |
| rocksdb_stall_level0_slowdown_with_compaction       | 4     |
| rocksdb_stall_level0_numfiles                       | 10    |
| rocksdb_stall_level0_numfiles_with_compaction       | 12    |
| rocksdb_stall_stop_for_pending_compaction_bytes     | 16    |
| rocksdb_stall_slowdown_for_pending_compaction_bytes | 14    |
| rocksdb_stall_memtable_compaction                   | 6     |
| rocksdb_stall_memtable_slowdown                     | 8     |
| rocksdb_stall_total_count                           | 56    |
| rocksdb_stall_micros                                | 0     |
+-----------------------------------------------------+-------+
```
(In order to have some non-zero numbers, I've initialized internal
RocksDB stall stats with 1-8 numbers. They all doubled in output as
there are two column families in my instance: default and system.
The stall_micros has been introduced previously. total_count doesn't
include level0_slowdown_with_compaction and numfiles_with_compaction
as only their total counterparts are included in this counter.)

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 1977338
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Oct 5, 2020
Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Test Plan:
* Check that compaction level metrics are still published to
INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS properly
* Check the output of the command:
```
mysql> show status like 'rocksdb_stall_%';
+-----------------------------------------------------+-------+
| Variable_name                                       | Value |
+-----------------------------------------------------+-------+
| rocksdb_stall_level0_slowdown                       | 2     |
| rocksdb_stall_level0_slowdown_with_compaction       | 4     |
| rocksdb_stall_level0_numfiles                       | 10    |
| rocksdb_stall_level0_numfiles_with_compaction       | 12    |
| rocksdb_stall_stop_for_pending_compaction_bytes     | 16    |
| rocksdb_stall_slowdown_for_pending_compaction_bytes | 14    |
| rocksdb_stall_memtable_compaction                   | 6     |
| rocksdb_stall_memtable_slowdown                     | 8     |
| rocksdb_stall_total_count                           | 56    |
| rocksdb_stall_micros                                | 0     |
+-----------------------------------------------------+-------+
```
(In order to have some non-zero numbers, I've initialized internal
RocksDB stall stats with 1-8 numbers. They all doubled in output as
there are two column families in my instance: default and system.
The stall_micros has been introduced previously. total_count doesn't
include level0_slowdown_with_compaction and numfiles_with_compaction
as only their total counterparts are included in this counter.)

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 1977338
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Nov 11, 2020
Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Test Plan:
* Check that compaction level metrics are still published to
INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS properly
* Check the output of the command:
```
mysql> show status like 'rocksdb_stall_%';
+-----------------------------------------------------+-------+
| Variable_name                                       | Value |
+-----------------------------------------------------+-------+
| rocksdb_stall_level0_slowdown                       | 2     |
| rocksdb_stall_level0_slowdown_with_compaction       | 4     |
| rocksdb_stall_level0_numfiles                       | 10    |
| rocksdb_stall_level0_numfiles_with_compaction       | 12    |
| rocksdb_stall_stop_for_pending_compaction_bytes     | 16    |
| rocksdb_stall_slowdown_for_pending_compaction_bytes | 14    |
| rocksdb_stall_memtable_compaction                   | 6     |
| rocksdb_stall_memtable_slowdown                     | 8     |
| rocksdb_stall_total_count                           | 56    |
| rocksdb_stall_micros                                | 0     |
+-----------------------------------------------------+-------+
```
(In order to have some non-zero numbers, I've initialized internal
RocksDB stall stats with 1-8 numbers. They all doubled in output as
there are two column families in my instance: default and system.
The stall_micros has been introduced previously. total_count doesn't
include level0_slowdown_with_compaction and numfiles_with_compaction
as only their total counterparts are included in this counter.)

Differential Revision: D5723305

Pulled By: Tema

fbshipit-source-id: 1977338
facebook-github-bot pushed a commit to facebook/mysql-5.6 that referenced this pull request Mar 8, 2021
Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes #695

Differential Revision: D5723305 (3f9ff43)

Pulled By: Tema

fbshipit-source-id: 688fb48f15f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 16, 2021
…cebook#695)

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305 (facebook@3f9ff43)

Pulled By: Tema

fbshipit-source-id: 688fb48f15f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 17, 2021
…cebook#695)

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305 (facebook@3f9ff43)

Pulled By: Tema

fbshipit-source-id: 688fb48f15f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 30, 2021
…cebook#695)

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305 (facebook@3f9ff43)

Pulled By: Tema

fbshipit-source-id: 688fb48f15f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 30, 2021
…cebook#695)

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305 (facebook@3f9ff43)

Pulled By: Tema

fbshipit-source-id: 688fb48f15f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 31, 2021
…cebook#695)

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305 (facebook@3f9ff43)

Pulled By: Tema

fbshipit-source-id: 688fb48f15f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Sep 1, 2021
…cebook#695)

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305 (facebook@3f9ff43)

Pulled By: Tema

fbshipit-source-id: 688fb48f15f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Sep 2, 2021
…cebook#695)

Summary:
update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305 (facebook@3f9ff43)

Pulled By: Tema

fbshipit-source-id: 688fb48f15f
hermanlee pushed a commit to facebook/mysql-5.6 that referenced this pull request Jan 10, 2022
Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes #695

Differential Revision: D5723305

Pulled By: Tema
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jan 17, 2022
…cebook#695)

Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305

Pulled By: Tema
ldonoso pushed a commit to ldonoso/percona-server that referenced this pull request Mar 15, 2022
…cona#695)

Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook/mysql-5.6#695

Differential Revision: D5723305

Pulled By: Tema
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 20, 2022
…cebook#695)

Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305

Pulled By: Tema
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 23, 2022
…cebook#695)

Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305

Pulled By: Tema
laurynas-biveinis pushed a commit to laurynas-biveinis/mysql-5.6 that referenced this pull request Aug 11, 2022
…cebook#695)

Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305

Pulled By: Tema
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Mar 25, 2023
…cebook#695)

Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305

Pulled By: Tema
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Mar 28, 2023
…cebook#695)

Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305

Pulled By: Tema
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 1, 2023
…cebook#695)

Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305

Pulled By: Tema
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 14, 2023
…cebook#695)

Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook#695

Differential Revision: D5723305

Pulled By: Tema
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 9, 2024
…cona#695)

Summary:
@update-submodule: rocksdb

The stall counters are already shown in 'SHOW ENGINE ROCKSDB STATUS
output' but this command is a bit expensive to run and you have to parse
the output to monitor these values. This branch adds these counters to
structured output of SHOW GLOBAL STATUS command.
Also fixed the bug in INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS  which showed only integer values but not float.

The rocksdb module was updated to bring [this](facebook/rocksdb#2794 (review)) change  which has the following changes to GetMapProperty method:
1. Changed values from double to string
2. Change existing keys to start with "compaction." prefix for all keys returned by old version of GetMapProperty.
3. Added stall values with keys starting with "io_stall." prefix
Closes facebook/mysql-5.6#695

Differential Revision: D5723305

Pulled By: Tema
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.

None yet

4 participants