You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Ashish Khatkar via user <us...@flink.apache.org> on 2024/06/24 17:39:14 UTC
Re: [External] Re: Backpressure issue with Flink Sql Job
Hi Penny,
1. Both the source topics have 20 partitions.
2. I have tried with taskmanager.memory.managed.fraction=0.4 and 0.25. I am
using state.backend.rocksdb.block.cache-size=64mb
and state.backend.rocksdb.writebuffer.size=128mb. Do you have any other
recommendations here?
3. The join is not a windowed join.
The sink we are using is a kafka sink, the throughput varies and the issue
is during the backfill operation and specifically when lag goes down to 5%.
At the start this is what the throughput per operator looks like, here
green is join operator and yellow is sink and others are sources and later
it flattens out to less than 50. In terms of data size, the topics have a
size of around 550Gb and 60Gb.
[image: Screenshot 2024-06-24 at 10.54.43 PM.png]
On Mon, Jun 24, 2024 at 6:59 PM Penny Rastogi <wa...@gmail.com> wrote:
> Hi Ashish,
> Can you check a few things.
> 1. Is your source broker count also 20 for both topics?
> 2. You can try increasing the state operation memory and reduce the disk
> I/O.
>
> -
> - Increase the number of CU resources in a single slot.
> - Set optimization parameters:
> - taskmanager.memory.managed.fraction=x
> - state.backend.rocksdb.block.cache-size=x
> - state.backend.rocksdb.writebuffer.size=x
> - 3. If possible, try left window join for your streams
> -
> - Please, share what sink you are using. Also, the per-operator,
> source and sink throughput, if possible?
>
>
> On Mon, Jun 24, 2024 at 3:32 PM Ashish Khatkar via user <
> user@flink.apache.org> wrote:
>
>> Hi all,
>>
>> We are facing backpressure in the flink sql job from the sink and the
>> backpressure only comes from a single task. This causes the checkpoint to
>> fail despite enabling unaligned checkpoints and using debloating buffers.
>> We enabled flamegraph and the task spends most of the time doing rocksdb
>> get and put. The sql job does a left join over two streams with a
>> parallelism of 20. The total data the topics have is 540Gb for one topic
>> and roughly 60Gb in the second topic. We are running 20 taskmanagers with 1
>> slot each with each taskmanager having 72G mem and 9 cpu.
>> Can you provide any help on how to go about fixing the pipeline? We are
>> using Flink 1.17.2. The issue is similar to this stackoverflow thread
>> <https://stackoverflow.com/questions/77762119/flink-sql-job-stops-with-backpressure-after-a-week-of-execution>,
>> instead of week it starts facing back pressure as soon as the lag comes
>> down to 4-5%.
>>
>> [image: image.png]
>>
>