You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by 熊云昆 <xi...@163.com> on 2021/02/27 08:49:23 UTC

回复:Flink checkpoint 速度慢问题请教

你的checkpoint是用rocksdb还是filesystem?磁盘不同确实会影响checkpoint速度的


| |
熊云昆
|
|
邮箱:xiongyunkun@163.com
|

签名由 网易邮箱大师 定制

在2021年02月27日 14:14,Jacob 写道:
Hi All,

生产环境有一个Job,在hadoopA集群运行稳定正常,checkpoint速度也很快(checkpoint间隔时间是30s,每一个checkpoint大小几十kb,做一次checkpoint耗时为毫秒级别)                                        
相同的job,代码没有任何变化,将job迁移到另一个hadoopB集群,checkpoint就非常慢,做一次耗时10几分钟,导致job运行瘫痪,大部分时间和资源都在做checkpoint,而没有处理我们的业务逻辑。              

       
目前我所了解到的这两个hadoop集群唯一不同的是,A集群是SSD,B集群机器是机械硬盘。


job的checkpoint存储是在hdfs,是否是因为磁盘性能问题,导致B集群checkpoint速度过慢呢?是否应该使用内存作为checkpoint存储?请指教。



-----
Thanks!
Jacob
--
Sent from: http://apache-flink.147419.n8.nabble.com/

Reply:回复:Flink checkpoint 速度慢问题请教

Posted by smq <37...@qq.com>.
我之前遇到过ck&nbsp;时间长,是因为反压比较高,你可以看看有没有反压的情况




发自我的iPhone


------------------ 原始邮件 ------------------
From: Jacob <17691150986@163.com&gt;
发送时间: 03/02/2021, 18:02
To: user-zh <user-zh@flink.apache.org&gt;
Subject: Reply:回复:Flink checkpoint 速度慢问题请教



谢谢回复

看了数次checkpoint慢的情况,发现大多是async阶段耗时,如果是这样,那这应该是那个时刻网络原因导致的慢吧?
但是我还是觉得跟磁盘有一定关系



-----
Thanks!
Jacob
--
Sent from: http://apache-flink.147419.n8.nabble.com/

Reply:回复:Flink checkpoint 速度慢问题请教

Posted by smq <37...@qq.com>.
我之前遇到过ck 时间长,是因为反压比较高,你可以看看有没有反压的情况







------------------ 原始邮件 ------------------
From: Jacob <17691150986@163.com&gt;
发送时间: 03/02/2021, 18:02
To: user-zh <user-zh@flink.apache.org&gt;
Subject: Reply:回复:Flink checkpoint 速度慢问题请教



谢谢回复

看了数次checkpoint慢的情况,发现大多是async阶段耗时,如果是这样,那这应该是那个时刻网络原因导致的慢吧?
但是我还是觉得跟磁盘有一定关系



-----
Thanks!
Jacob
--
Sent from: http://apache-flink.147419.n8.nabble.com/

Reply:回复:Flink checkpoint 速度慢问题请教

Posted by smq <37...@qq.com>.
我之前遇到过ck&nbsp;时间长,是因为反压比较高,你可以看看有没有反压的情况



发自我的iPhone


------------------ 原始邮件 ------------------
From: Jacob <17691150986@163.com&gt;
发送时间: 03/02/2021, 18:02
To: user-zh <user-zh@flink.apache.org&gt;
Subject: Reply:回复:Flink checkpoint 速度慢问题请教



谢谢回复

看了数次checkpoint慢的情况,发现大多是async阶段耗时,如果是这样,那这应该是那个时刻网络原因导致的慢吧?
但是我还是觉得跟磁盘有一定关系



-----
Thanks!
Jacob
--
Sent from: http://apache-flink.147419.n8.nabble.com/

Reply:回复:Flink checkpoint 速度慢问题请教

Posted by smq <37...@qq.com>.
我之前遇到过ck&nbsp;时间长,是因为反压比较高,你可以看看有没有反压的情况




发自我的iPhone


------------------ 原始邮件 ------------------
From: Jacob <17691150986@163.com&gt;
发送时间: 03/02/2021, 18:02
To: user-zh <user-zh@flink.apache.org&gt;
Subject: Reply:回复:Flink checkpoint 速度慢问题请教



谢谢回复

看了数次checkpoint慢的情况,发现大多是async阶段耗时,如果是这样,那这应该是那个时刻网络原因导致的慢吧?
但是我还是觉得跟磁盘有一定关系



-----
Thanks!
Jacob
--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: 回复:Flink checkpoint 速度慢问题请教

Posted by Jacob <17...@163.com>.
谢谢回复

看了数次checkpoint慢的情况,发现大多是async阶段耗时,如果是这样,那这应该是那个时刻网络原因导致的慢吧?
但是我还是觉得跟磁盘有一定关系



-----
Thanks!
Jacob
--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: 回复:Flink checkpoint 速度慢问题请教

Posted by tison <wa...@gmail.com>.
Hi Jacob,

能通过日志或监控判断是 checkpoint 时 snapshot 的 sync 阶段慢,还是 async 阶段慢,还是上传到 HDFS
时间长或是其他阶段的瓶颈吗?

几十 KB 的状态慢很可能是某个步骤出故障卡住了。

Best,
tison.


yidan zhao <hi...@gmail.com> 于2021年3月2日周二 下午3:58写道:

> 我比较奇怪的是再慢的磁盘,对于几十KB的状态也不至于“慢”吧。
>
> Jacob <17...@163.com> 于2021年3月2日周二 上午10:34写道:
>
> > 谢谢回复
> >
> > 我用的是filesystem,
> > 相关配置如下:
> >
> >
> > state.backend: filesystem
> > state.checkpoints.dir: hdfs://nameservice1/datafeed/prd/flink_checkpoint
> > state.savepoints.dir: hdfs://nameservice1/datafeed/prd/flink_checkpoint
> > state.backend.incremental: false
> > state.backend.fs.memory-threshold: 1024
> > state.checkpoints.num-retained: 3
> > restart-strategy: fixed-delay
> > restart-strategy.fixed-delay.attempts: 1000
> > restart-strategy.fixed-delay.delay: 30 s
> >
> >
> >
> > 后面把上面配置注释掉,然后在代码中指定了checkpoint类型为内存,但速度还是很慢。
> >
> >
> >
> > -----
> > Thanks!
> > Jacob
> > --
> > Sent from: http://apache-flink.147419.n8.nabble.com/
> >
>

Re: 回复:Flink checkpoint 速度慢问题请教

Posted by yidan zhao <hi...@gmail.com>.
我比较奇怪的是再慢的磁盘,对于几十KB的状态也不至于“慢”吧。

Jacob <17...@163.com> 于2021年3月2日周二 上午10:34写道:

> 谢谢回复
>
> 我用的是filesystem,
> 相关配置如下:
>
>
> state.backend: filesystem
> state.checkpoints.dir: hdfs://nameservice1/datafeed/prd/flink_checkpoint
> state.savepoints.dir: hdfs://nameservice1/datafeed/prd/flink_checkpoint
> state.backend.incremental: false
> state.backend.fs.memory-threshold: 1024
> state.checkpoints.num-retained: 3
> restart-strategy: fixed-delay
> restart-strategy.fixed-delay.attempts: 1000
> restart-strategy.fixed-delay.delay: 30 s
>
>
>
> 后面把上面配置注释掉,然后在代码中指定了checkpoint类型为内存,但速度还是很慢。
>
>
>
> -----
> Thanks!
> Jacob
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/
>

Re: 回复:Flink checkpoint 速度慢问题请教

Posted by Jacob <17...@163.com>.
谢谢回复

我用的是filesystem,
相关配置如下:
                  

state.backend: filesystem
state.checkpoints.dir: hdfs://nameservice1/datafeed/prd/flink_checkpoint
state.savepoints.dir: hdfs://nameservice1/datafeed/prd/flink_checkpoint
state.backend.incremental: false
state.backend.fs.memory-threshold: 1024
state.checkpoints.num-retained: 3
restart-strategy: fixed-delay
restart-strategy.fixed-delay.attempts: 1000
restart-strategy.fixed-delay.delay: 30 s



后面把上面配置注释掉,然后在代码中指定了checkpoint类型为内存,但速度还是很慢。



-----
Thanks!
Jacob
--
Sent from: http://apache-flink.147419.n8.nabble.com/