-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: Add auto scale writer support #11702
Conversation
This pull request was exported from Phabricator. Differential Revision: D66380785 |
✅ Deploy Preview for meta-velox canceled.
|
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Differential Revision: D66380785
61fd2ce
to
6e0df03
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Differential Revision: D66380785
6e0df03
to
bbe7480
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Differential Revision: D66380785
bbe7480
to
d3a8e5f
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Differential Revision: D66380785
d3a8e5f
to
d2c82c3
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Differential Revision: D66380785
d2c82c3
to
2274648
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Differential Revision: D66380785
2274648
to
2be3e70
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Differential Revision: D66380785
2be3e70
to
4760146
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Differential Revision: D66380785
4760146
to
f47d919
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
210a913
to
b36708b
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Differential Revision: D66380785
b36708b
to
bf6cac0
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Reviewed By: oerling Differential Revision: D66380785
bf6cac0
to
141a3cd
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Reviewed By: arhimondr, oerling, zation99 Differential Revision: D66380785
141a3cd
to
258e9a3
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Reviewed By: arhimondr, oerling, zation99 Differential Revision: D66380785
258e9a3
to
7148d31
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Reviewed By: arhimondr, oerling, zation99 Differential Revision: D66380785
7148d31
to
b7197a0
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
Summary: This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Reviewed By: arhimondr, oerling, zation99 Differential Revision: D66380785
b7197a0
to
30706ee
Compare
This pull request was exported from Phabricator. Differential Revision: D66380785 |
This pull request has been merged in e40259f. |
LocalPartitionNode( | ||
const PlanNodeId& id, | ||
Type type, | ||
bool scaleWriter, |
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.
@xiaoxmeng how about putting this arg in the end, w/ a default value false
?
It seems this feature is disabled by default.
Summary: Pull Request resolved: facebookincubator#11702 This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions. We add two customized local partition operators: ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing if the exchange queue has >50% memory buffering until scale to all the table writer threads; ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling the busy logical table partition by assigning more table writer threads. Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning scheme, and the coordinator needs to configure the query plan accordingly. Reviewed By: arhimondr, oerling, zation99 Differential Revision: D66380785 fbshipit-source-id: 87a414516cc5011a26309db104c6d133c179e959
Summary:
This change adds local scale writer partition support to improve memory efficiency in case of a large number of partitions.
We add two customized local partition operators:
ScaleWriterLocalPartition for non-partitioned table write. It starts with single table writer thread and scale the writer processing
if the exchange queue has >50% memory buffering until scale to all the table writer threads;
ScaleWriterPartitioningLocalPartition for partitioned table writer. It starts with assigning a single table writer thread to each logical
table partition. Multiple physical table partitions could be mapped to a single logical partition based on the partition keys of the
written table. Similar, if the exchange queue has > 50% memory buffering, we leverage the skewed partition balancer by scaling
the busy logical table partition by assigning more table writer threads.
Meta internal shadow results show this could prevent query write OOM pattern, reduce the peak memory usage which benefits the
resource usage accounting which takes into account of accumulated memory usage, it also reduces >2x of written files
The followup is to investigate the more reliable rebalance signal such as consumer/producer queuing delay in the exchange
queue. To complete this feature, we need a Prestissimo change to setup scale writer local partition based on arbitrary partitioning
scheme, and the coordinator needs to configure the query plan accordingly.
Differential Revision: D66380785