flink1.9.1 如何配置RocksDB的block-cache-usage参

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

flink1.9.1 如何配置RocksDB的block-cache-usage参

bradyMk
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: flink1.9.1 如何配置RocksDB的block-cache-usage参

Yun Tang
Hi

write buffer的指标可以看 cur-size-all-mem-tables,由于1.9没有block cache的指标,如果不自行将代码[1]pick回去的话,暂时没办法通过内置的方式监控了。


[1] https://issues.apache.org/jira/browse/FLINK-15387

祝好
唐云
________________________________
From: bradyMk <[hidden email]>
Sent: Wednesday, December 16, 2020 12:03
To: [hidden email] <[hidden email]>
Subject: flink1.9.1 如何配置RocksDB的block-cache-usage参数

Hi~想请教一下大家:

最近使用flink1.9版本用RocksDB做增量ck,我想配置如下两个内容的指标来监控任务的内存情况:
  ①block-cache-usage
  ②write buffer

但是在官网[1]并没有找到相关指标,通过查阅资料得知:
  write buffer对应的指标为:state.backend.rocksdb.metrics.cur-size-all-mem-tables
  而block-cache-usage的指标是1.10版本之后才有的,1.9版本没有这个指标;

问:
①write buffer是否对应这个指标 ->
state.backend.rocksdb.metrics.cur-size-all-mem-tables
②如果1.9没有监控block-cache-usage的直接指标,那么该如何监控block-cache-usage呢?

[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.9/ops/config.html#rocksdb-native-metrics
<https://ci.apache.org/projects/flink/flink-docs-release-1.9/ops/config.html#rocksdb-native-metrics>






-----
Best Wishes
--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: flink1.9.1 如何配置RocksDB的block-cache-usage参

bradyMk
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: flink1.9.1 如何配置RocksDB的block-cache-usage参

Yun Tang
Hi

这些metrics启用的配置是放到flink conf里面的,不是让你直接在代码里面调用的。

祝好
唐云
________________________________
From: bradyMk <[hidden email]>
Sent: Thursday, December 17, 2020 20:56
To: [hidden email] <[hidden email]>
Subject: Re: flink1.9.1 如何配置RocksDB的block-cache-usage参数

谢谢 Yun Tang 大佬的解答~

另外,还想请教一下:我在代码中设置开启了cur-size-all-mem-tables的监控,代码如下:
    //设置RocksDB状态后端,且开启增量ck
    val backend = new RocksDBStateBackend(path, true)

    //监控配置项
    val metricOptions = new RocksDBNativeMetricOptions
    metricOptions.enableSizeAllMemTables()

    //设置预选项
    backend.setPredefinedOptions(PredefinedOptions.SPINNING_DISK_OPTIMIZED)

    //开启RocksDB
    env.setStateBackend(backend.asInstanceOf[StateBackend])

但是发现这个监控指标并没有成功发送,请问是我在代码里开启的方式不对么?



-----
Best Wishes
--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: flink1.9.1 如何配置RocksDB的block-cache-usage参

bradyMk
CONTENTS DELETED
The author has deleted this message.