-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase the default value of task writer count to 32 for partition case #14553
Increase the default value of task writer count to 32 for partition case #14553
Conversation
core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddLocalExchanges.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/SystemSessionProperties.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/SystemSessionProperties.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % comments
core/trino-main/src/main/java/io/trino/SystemSessionProperties.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/TaskManagerConfig.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java
Show resolved
Hide resolved
...rc/main/java/io/trino/sql/planner/iterative/rule/ApplyPreferredTableExecutePartitioning.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % comment
% can test be added?
core/trino-main/src/main/java/io/trino/SystemSessionProperties.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/SystemSessionProperties.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/TaskManagerConfig.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java
Show resolved
Hide resolved
I don't think we need more. There are already multiple tests for inserts (partitioned and unpartitioned) with different writer counts and for the second last commit, we are already testing that preferred partitioning should be true when stats are not available. |
core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddLocalExchanges.java
Outdated
Show resolved
Hide resolved
...rc/main/java/io/trino/sql/planner/iterative/rule/ApplyPreferredTableExecutePartitioning.java
Outdated
Show resolved
Hide resolved
...ino-main/src/test/java/io/trino/sql/planner/optimizations/TestAddLocalExchangesForMerge.java
Outdated
Show resolved
Hide resolved
...ino-main/src/test/java/io/trino/sql/planner/optimizations/TestAddLocalExchangesForMerge.java
Outdated
Show resolved
Hide resolved
...ino-main/src/test/java/io/trino/sql/planner/optimizations/TestAddLocalExchangesForMerge.java
Outdated
Show resolved
Hide resolved
...rc/main/java/io/trino/sql/planner/iterative/rule/ApplyPreferredTableExecutePartitioning.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
% comments
core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddLocalExchanges.java
Show resolved
Hide resolved
...rc/main/java/io/trino/sql/planner/iterative/rule/ApplyPreferredTableExecutePartitioning.java
Show resolved
Hide resolved
...rc/main/java/io/trino/sql/planner/iterative/rule/ApplyPreferredTableExecutePartitioning.java
Outdated
Show resolved
Hide resolved
...src/main/java/io/trino/sql/planner/iterative/rule/ApplyPreferredTableWriterPartitioning.java
Outdated
Show resolved
Hide resolved
CI hit % #14682 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddLocalExchanges.java
Outdated
Show resolved
Hide resolved
Introduce task.partitioned-writer-count with the default value of 32. This is for tables which are partitioned and prefer partitioning is used. Users can also change this config through task_partitioned_writer_count session config.
This is essential because query could write to huge amount of partition using unpartitioned writing route. Therefore, it can lead to out of memory error since each writer thread could write to all partitions while each partition per writer allocates a certain amount of memory for buffering.
Description
Problem:
Approach:
task.partitioned-writer-count
with the default value of 32. This is for tables which are partitioned and when prefer partitioning is used. Users can also change this config throughpartitioned_task_writer_count
session config.Non-technical explanation
Release notes
( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: