You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by pn...@apache.org on 2024/02/20 14:41:22 UTC
(flink) branch master updated: [FLINK-34386][state] Add RocksDB bloom filter metrics
This is an automated email from the ASF dual-hosted git repository.
pnowojski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 890a9951ea7 [FLINK-34386][state] Add RocksDB bloom filter metrics
890a9951ea7 is described below
commit 890a9951ea7ec8f0b9348f4fa745bf9671d31947
Author: hejufang <he...@bytedance.com>
AuthorDate: Tue Feb 6 17:10:12 2024 +0800
[FLINK-34386][state] Add RocksDB bloom filter metrics
---
.../rocksdb_native_metric_configuration.html | 18 ++++++++++++++++
.../state/RocksDBNativeMetricOptions.java | 25 ++++++++++++++++++++++
2 files changed, 43 insertions(+)
diff --git a/docs/layouts/shortcodes/generated/rocksdb_native_metric_configuration.html b/docs/layouts/shortcodes/generated/rocksdb_native_metric_configuration.html
index 2edd8387d08..dc03be5ff25 100644
--- a/docs/layouts/shortcodes/generated/rocksdb_native_metric_configuration.html
+++ b/docs/layouts/shortcodes/generated/rocksdb_native_metric_configuration.html
@@ -50,6 +50,24 @@
<td>Boolean</td>
<td>Monitor the memory size for the entries residing in block cache.</td>
</tr>
+ <tr>
+ <td><h5>state.backend.rocksdb.metrics.bloom-filter-full-positive</h5></td>
+ <td style="word-wrap: break-word;">false</td>
+ <td>Boolean</td>
+ <td>Monitor the total count of reads not avoided by bloom full filter.</td>
+ </tr>
+ <tr>
+ <td><h5>state.backend.rocksdb.metrics.bloom-filter-full-true-positive</h5></td>
+ <td style="word-wrap: break-word;">false</td>
+ <td>Boolean</td>
+ <td>Monitor the total count of reads not avoided by bloom full filter and the data actually exists in RocksDB.</td>
+ </tr>
+ <tr>
+ <td><h5>state.backend.rocksdb.metrics.bloom-filter-useful</h5></td>
+ <td style="word-wrap: break-word;">false</td>
+ <td>Boolean</td>
+ <td>Monitor the total count of reads avoided by bloom filter.</td>
+ </tr>
<tr>
<td><h5>state.backend.rocksdb.metrics.bytes-read</h5></td>
<td style="word-wrap: break-word;">false</td>
diff --git a/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBNativeMetricOptions.java b/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBNativeMetricOptions.java
index f6fc5c759ae..7975f5f059c 100644
--- a/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBNativeMetricOptions.java
+++ b/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBNativeMetricOptions.java
@@ -262,6 +262,26 @@ public class RocksDBNativeMetricOptions implements Serializable {
.withDescription(
"Monitor the total count of block cache misses in RocksDB (BLOCK_CACHE_MISS == BLOCK_CACHE_INDEX_MISS + BLOCK_CACHE_FILTER_MISS + BLOCK_CACHE_DATA_MISS).");
+ public static final ConfigOption<Boolean> MONITOR_BLOOM_FILTER_USEFUL =
+ ConfigOptions.key("state.backend.rocksdb.metrics.bloom-filter-useful")
+ .booleanType()
+ .defaultValue(false)
+ .withDescription("Monitor the total count of reads avoided by bloom filter.");
+
+ public static final ConfigOption<Boolean> MONITOR_BLOOM_FILTER_FULL_POSITIVE =
+ ConfigOptions.key("state.backend.rocksdb.metrics.bloom-filter-full-positive")
+ .booleanType()
+ .defaultValue(false)
+ .withDescription(
+ "Monitor the total count of reads not avoided by bloom full filter.");
+
+ public static final ConfigOption<Boolean> MONITOR_BLOOM_FILTER_FULL_TRUE_POSITIVE =
+ ConfigOptions.key("state.backend.rocksdb.metrics.bloom-filter-full-true-positive")
+ .booleanType()
+ .defaultValue(false)
+ .withDescription(
+ "Monitor the total count of reads not avoided by bloom full filter and the data actually exists in RocksDB.");
+
public static final ConfigOption<Boolean> MONITOR_BYTES_READ =
ConfigOptions.key("state.backend.rocksdb.metrics.bytes-read")
.booleanType()
@@ -435,6 +455,11 @@ public class RocksDBNativeMetricOptions implements Serializable {
{
put(MONITOR_BLOCK_CACHE_HIT, TickerType.BLOCK_CACHE_HIT);
put(MONITOR_BLOCK_CACHE_MISS, TickerType.BLOCK_CACHE_MISS);
+ put(MONITOR_BLOOM_FILTER_USEFUL, TickerType.BLOOM_FILTER_USEFUL);
+ put(MONITOR_BLOOM_FILTER_FULL_POSITIVE, TickerType.BLOOM_FILTER_FULL_POSITIVE);
+ put(
+ MONITOR_BLOOM_FILTER_FULL_TRUE_POSITIVE,
+ TickerType.BLOOM_FILTER_FULL_TRUE_POSITIVE);
put(MONITOR_BYTES_READ, TickerType.BYTES_READ);
put(MONITOR_ITER_BYTES_READ, TickerType.ITER_BYTES_READ);
put(MONITOR_BYTES_WRITTEN, TickerType.BYTES_WRITTEN);