[
https://issues.apache.org/jira/browse/FLINK-30623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17681313#comment-17681313
]
Rui Fan commented on FLINK-30623:
---------------------------------
> It can not take advantage of the optimization we put in emitNext(...).
> Instead, it suffers the additional overhead of the operation (e.g. checking
> whether mailbox is empty and whether task is available) we put in the
> emitNext(), which leads to the 10% performance regression.
Hi [~lindong] thanks for your feedback. Sorry, I don't think it can lead to the
10% performance regression. We can take a look the benchmark of mapSink[1]. The
records/sec can reach 40k, indicating that the additional overhead is very
small. Shouldn't reduce 330 records/sec to 300.
I think FLINK-26803 is the root cause, the
execution.checkpointing.unaligned.max-subtasks-per-channel-state-file=5 by
default. It means 5 subtasks will share the same Unaligned checkpooint file. It
will reduce the number of small files, but the UC time will become larger.
I run the UNALIGNED benchmark on my Mac based on master, and check the
benchmark result after setting
execution.checkpointing.unaligned.max-subtasks-per-channel-state-file=1.
{code:java}
// execution.checkpointing.unaligned.max-subtasks-per-channel-state-file=5
Benchmark (mode) Mode Cnt
Score Error Units
CheckpointingTimeBenchmark.checkpointSingleInput UNALIGNED thrpt 30
317.063 ± 12.762 ops/s
// execution.checkpointing.unaligned.max-subtasks-per-channel-state-file=1
Benchmark (mode) Mode Cnt
Score Error Units
CheckpointingTimeBenchmark.checkpointSingleInput UNALIGNED thrpt 30
351.852 ± 6.857 ops/s {code}
>From the benchmark, I think we can ensure FLINK-26803 is the root cause.
[~pnowojski], do you think we should set
execution.checkpointing.unaligned.max-subtasks-per-channel-state-file=1 in the
flink-benchmark? Or should we add the parameters about it? We can compare the
performance impact on UC under different
execution.checkpointing.unaligned.max-subtasks-per-channel-state-file.
[1] [http://codespeed.dak8s.net:8000/timeline/?ben=mapSink.F27_UNBOUNDED&env=2]
[2]
[http://codespeed.dak8s.net:8000/timeline/#/?exe=1&ben=checkpointSingleInput.UNALIGNED&extr=on&quarts=on&equid=off&env=2&revs=200]
> Performance regression in checkpointSingleInput.UNALIGNED on 04.01.2023
> -----------------------------------------------------------------------
>
> Key: FLINK-30623
> URL: https://issues.apache.org/jira/browse/FLINK-30623
> Project: Flink
> Issue Type: Bug
> Components: Benchmarks, Runtime / Checkpointing
> Reporter: Martijn Visser
> Assignee: Rui Fan
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 1.17.0
>
>
> Performance regression
> checkpointSingleInput.UNALIGNED median=338.1445195 recent_median=67.6453005
> checkpointSingleInput.UNALIGNED_1 median=213.230041 recent_median=39.830277
> deployAllTasks.STREAMING median=168.533106 recent_median=159.8534395
> stateBackends.MEMORY median=3229.0248875 recent_median=2985.782919
> tupleKeyBy median=4155.684199 recent_median=3987.5812305
> http://codespeed.dak8s.net:8000/timeline/#/?exe=1&ben=checkpointSingleInput.UNALIGNED&extr=on&quarts=on&equid=off&env=2&revs=200
> http://codespeed.dak8s.net:8000/timeline/#/?exe=1&ben=checkpointSingleInput.UNALIGNED_1&extr=on&quarts=on&equid=off&env=2&revs=200
> http://codespeed.dak8s.net:8000/timeline/#/?exe=8&ben=deployAllTasks.STREAMING&extr=on&quarts=on&equid=off&env=2&revs=200
> http://codespeed.dak8s.net:8000/timeline/#/?exe=6&ben=stateBackends.MEMORY&extr=on&quarts=on&equid=off&env=2&revs=200
> http://codespeed.dak8s.net:8000/timeline/#/?exe=6&ben=tupleKeyBy&extr=on&quarts=on&equid=off&env=2&revs=200
--
This message was sent by Atlassian Jira
(v8.20.10#820010)