Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Add stall counters to 'SHOW GLOBAL STATUS' output.#695

Closed
Tema wants to merge 10 commits into
facebook:fb-mysql-5.6.35from
Tema:io_stall_stats
Closed

Add stall counters to 'SHOW GLOBAL STATUS' output.#695
Tema wants to merge 10 commits into
facebook:fb-mysql-5.6.35from
Tema:io_stall_stats

Conversation

@Tema

@Tema Tema commented Aug 29, 2017

Copy link
Copy Markdown

@update-submodule: rocksdb

Summary:
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 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

Test plan:

  • Check that compaction level metrics are still published to
    INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS properly including real double values.
    BEFORE:
    | system | L0 | Rnp1GB | 0 |
    | system | L0 | Score | 0 |
    | system | L0 | SizeBytes | 1433 |
    AFTER:
    | system | L0 | Rnp1GB | 0 |
    | system | L0 | Score | 0.25 |
    | system | L0 | SizeBytes | 1433 |
  • 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_stop                            | 32    |
| rocksdb_stall_total_slowdown                        | 24    |
| rocksdb_stall_micros                                | 0     |
+-----------------------------------------------------+-------+
11 rows in set (0.00 sec)

(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.)

@facebook-github-bot

Copy link
Copy Markdown

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

Comment thread storage/rocksdb/ha_rocksdb.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1st arg: const ref, 2nd arg: rvalue ref?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sure. Not sure how to make a const, though, as I use iterator inside.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ok, I think I've figured out how to do that in my latest revision. Thanks.

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

Comment thread storage/rocksdb/ha_rocksdb.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can probably be a const std::string &key I think. There's probably no need for this to be a &&.

Comment thread storage/rocksdb/ha_rocksdb.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Initializing io_stall_stats and then adding counters to it might cause strange behavior if the command is run concurrently. It might be better to not initialize io_stall_stats and set the members equal to the value returned by rocksdb, similar to the other status variables in memory_usage or export stats.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It is a bit different than memory_usage or export stats methods as I need to loop through multiple calls to accumulate the final result. But I see you concern, so I can create a local struct then copy it to the global one at the end of method call.

Comment thread storage/rocksdb/ha_rocksdb.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this can just be const std::string &key.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Not sure if it possible as I pass a string directly to the method call, like
io_stall_stats.level0_slowdown += io_stall_prop_value(props, "level0_slowdown");

LMK if I miss something.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I tested this before when I saw your call with arguments like "level0_slowdown" and it looks to work with const std::string &key. Not clear to me if there is preference for one or the other.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I've tested it again and it turned out my original test missed 'const'. If I use it then it works indeed. I will change it according to your comment.

Comment thread storage/rocksdb/rdb_i_s.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What additional keys are returned when switching to the string version of GetMapProperty? The information schema table is still returning a double though, so the additional keys would need to have values that are doubles, which seems odd that they're not returned by the double version of GetMapProperty in the first place.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Now all keys are returned with some prefixes. The old values now have "compaction." key prefix and new ones have "io_stalls." prefix. This method now skips keys with prefixes other than "compaction."

I've tested INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS table and see that it contains the same data it contained before.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What would be returned in I_S.COMPACTION_STATS without this change? Does calling GetMapProperty() using std::map<std::string, std::double> not return all of the keys with "compaction." key prefix?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I've updated summary to highlight what rocksdb changes were done relevant to this PR.

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@hermanlee hermanlee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good overall.

Comment thread storage/rocksdb/rdb_i_s.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since this doesn't change, can probably declare this outside the for loop and make it const.

Comment thread storage/rocksdb/rdb_i_s.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did you intend to remove the true indicating the value is unsigned?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, the overridden method with boolean accept longlong but the value we pass is actually double. Essentially this diff fixes a bug here. Please see a Test Plan note in "Check that compaction level metrics are still published to
INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS properly including real double values" section where previously the Score was displayed as 0 and now it is 0.25.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If there are non-deterministic results from this query, you can add an order by clause to this select.

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

@facebook-github-bot

Copy link
Copy Markdown

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

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 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 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 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 subscribe to this conversation on GitHub. Already have an account? Sign in.

4 participants