You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Dongwoo Kim <do...@gmail.com> on 2023/05/16 11:55:57 UTC
Is this expected behavior when incremental snapshotting is configured?
Hi flink community,
My name is Kim, and I am currently working on a project using apache flink.
I have been using incremental snapshotting with RocksDB as the state
backend.
However, I've noticed that even though I've configured incremental
snapshotting, the size of the last checkpoint periodically matches the size
of a full snapshot. Just like the image below.
[image: image.png]
I thought incremental snapshots would only include changes from the last
snapshot, so I expected their sizes to be smaller. Is this expected
behavior?
Has anyone experienced something like this or can help me understand why
this is happening? Any thoughts or suggestions are welcome.
Thanks in advance.
Lastly, I will add my flink configurations in the below.
flink version: 1.16.1
"state.backend": "rocksdb",
"state.backend.incremental": "true",
"state.checkpoint-storage": "filesystem",
"state.checkpoints.num-retained": "10"
"execution.checkpointing.mode": "EXACTLY_ONCE",
"execution.checkpointing.interval": "30s",
"s3.endpoint": "{s3_endpoint}",
"state.checkpoints.dir": "s3://flink-checkpoint/checkpoints/****",
"state.savepoints.dir": "s3://flink-checkpoint/savepoints/****,
Best Regards.
Re: Is this expected behavior when incremental snapshotting is configured?
Posted by Dongwoo Kim <do...@gmail.com>.
Hi Matthias
Thank you for the reply, it really saved me.
As you said I think this behavior is due to rocksdb's compaction and
assuming that the reason it happens after every 4 checkpoints is because of
this default config in rocksdb.
*level0_file_num_compaction_trigger : 4*
And the new feature you mentioned seems to be change log. I guess this can
solve my issue.
Thanks again for the help on this - it's been a huge boost in getting to
the bottom of this.
Best Regards
2023년 5월 17일 (수) 오후 5:47, Schwalbe Matthias <Ma...@viseca.ch>님이
작성:
> Hi Kim,
>
>
>
> This ‘comb’ pattern is actually something to expect when you use RocksDB:
>
> - With RocksDB, plain SST files end up in the checkpoint
> - RocksDb compacts SST files ever once in a while
> - Which means the checkpoint will contain the new compacted SST
> files
> - For me this happens roughly every 3 or 4 checkpoints
> - The latest Flink version 1.17 implements a new optional feature that
> levels out the i/o traffic for these SST files
> - By asynchronously uploading them over longer time, and writing a
> WAL like stream in order to ensure exactly-once semantics
> - (unfortunately I forgot the name of this feature) ….
>
>
>
> Hope this helps
>
>
>
> Thias
>
>
>
>
>
>
>
>
>
> *From:* Dongwoo Kim <do...@gmail.com>
> *Sent:* Tuesday, May 16, 2023 1:56 PM
> *To:* user@flink.apache.org
> *Subject:* Is this expected behavior when incremental snapshotting is
> configured?
>
>
>
> ⚠*EXTERNAL MESSAGE – **CAUTION: Think Before You Click *⚠
>
>
>
> Hi flink community,
> My name is Kim, and I am currently working on a project using apache flink.
> I have been using incremental snapshotting with RocksDB as the state
> backend.
> However, I've noticed that even though I've configured incremental
> snapshotting, the size of the last checkpoint periodically matches the size
> of a full snapshot. Just like the image below.
>
>
> I thought incremental snapshots would only include changes from the last
> snapshot, so I expected their sizes to be smaller. Is this expected
> behavior?
>
> Has anyone experienced something like this or can help me understand why
> this is happening? Any thoughts or suggestions are welcome.
>
> Thanks in advance.
>
> Lastly, I will add my flink configurations in the below.
> flink version: 1.16.1
>
> "state.backend": "rocksdb",
> "state.backend.incremental": "true",
> "state.checkpoint-storage": "filesystem",
> "state.checkpoints.num-retained": "10"
> "execution.checkpointing.mode": "EXACTLY_ONCE",
> "execution.checkpointing.interval": "30s",
> "s3.endpoint": "{s3_endpoint}",
> "state.checkpoints.dir": "s3://flink-checkpoint/checkpoints/****",
> "state.savepoints.dir": "s3://flink-checkpoint/savepoints/****,
>
> Best Regards.
> Diese Nachricht ist ausschliesslich für den Adressaten bestimmt und
> beinhaltet unter Umständen vertrauliche Mitteilungen. Da die
> Vertraulichkeit von e-Mail-Nachrichten nicht gewährleistet werden kann,
> übernehmen wir keine Haftung für die Gewährung der Vertraulichkeit und
> Unversehrtheit dieser Mitteilung. Bei irrtümlicher Zustellung bitten wir
> Sie um Benachrichtigung per e-Mail und um Löschung dieser Nachricht sowie
> eventueller Anhänge. Jegliche unberechtigte Verwendung oder Verbreitung
> dieser Informationen ist streng verboten.
>
> This message is intended only for the named recipient and may contain
> confidential or privileged information. As the confidentiality of email
> communication cannot be guaranteed, we do not accept any responsibility for
> the confidentiality and the intactness of this message. If you have
> received it in error, please advise the sender by return e-mail and delete
> this message and any attachments. Any unauthorised use or dissemination of
> this information is strictly prohibited.
>
RE: Is this expected behavior when incremental snapshotting is configured?
Posted by Schwalbe Matthias <Ma...@viseca.ch>.
Hi Kim,
This ‘comb’ pattern is actually something to expect when you use RocksDB:
* With RocksDB, plain SST files end up in the checkpoint
* RocksDb compacts SST files ever once in a while
* Which means the checkpoint will contain the new compacted SST files
* For me this happens roughly every 3 or 4 checkpoints
* The latest Flink version 1.17 implements a new optional feature that levels out the i/o traffic for these SST files
* By asynchronously uploading them over longer time, and writing a WAL like stream in order to ensure exactly-once semantics
* (unfortunately I forgot the name of this feature) ….
Hope this helps
Thias
From: Dongwoo Kim <do...@gmail.com>
Sent: Tuesday, May 16, 2023 1:56 PM
To: user@flink.apache.org
Subject: Is this expected behavior when incremental snapshotting is configured?
⚠EXTERNAL MESSAGE – CAUTION: Think Before You Click ⚠
Hi flink community,
My name is Kim, and I am currently working on a project using apache flink.
I have been using incremental snapshotting with RocksDB as the state backend.
However, I've noticed that even though I've configured incremental snapshotting, the size of the last checkpoint periodically matches the size of a full snapshot. Just like the image below.
[cid:image001.png@01D988AC.EDC95F10]
I thought incremental snapshots would only include changes from the last snapshot, so I expected their sizes to be smaller. Is this expected behavior?
Has anyone experienced something like this or can help me understand why this is happening? Any thoughts or suggestions are welcome.
Thanks in advance.
Lastly, I will add my flink configurations in the below.
flink version: 1.16.1
"state.backend": "rocksdb",
"state.backend.incremental": "true",
"state.checkpoint-storage": "filesystem",
"state.checkpoints.num-retained": "10"
"execution.checkpointing.mode": "EXACTLY_ONCE",
"execution.checkpointing.interval": "30s",
"s3.endpoint": "{s3_endpoint}",
"state.checkpoints.dir": "s3://flink-checkpoint/checkpoints/****",
"state.savepoints.dir": "s3://flink-checkpoint/savepoints/****,
Best Regards.
Diese Nachricht ist ausschliesslich für den Adressaten bestimmt und beinhaltet unter Umständen vertrauliche Mitteilungen. Da die Vertraulichkeit von e-Mail-Nachrichten nicht gewährleistet werden kann, übernehmen wir keine Haftung für die Gewährung der Vertraulichkeit und Unversehrtheit dieser Mitteilung. Bei irrtümlicher Zustellung bitten wir Sie um Benachrichtigung per e-Mail und um Löschung dieser Nachricht sowie eventueller Anhänge. Jegliche unberechtigte Verwendung oder Verbreitung dieser Informationen ist streng verboten.
This message is intended only for the named recipient and may contain confidential or privileged information. As the confidentiality of email communication cannot be guaranteed, we do not accept any responsibility for the confidentiality and the intactness of this message. If you have received it in error, please advise the sender by return e-mail and delete this message and any attachments. Any unauthorised use or dissemination of this information is strictly prohibited.