This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 92cef580f3 [enhancement](memory) Reduce virtual memory used by
PaddedPODArray (#11816)
92cef580f3 is described below
commit 92cef580f32d5b8085032f16eb001f1e8512d0ef
Author: Xinyi Zou <[email protected]>
AuthorDate: Mon Aug 22 11:33:07 2022 +0800
[enhancement](memory) Reduce virtual memory used by PaddedPODArray (#11816)
---
be/src/exec/hash_join_node.cpp | 2 +-
be/src/exec/set_operation_node.cpp | 3 ++-
be/src/vec/olap/vgeneric_iterators.cpp | 3 ++-
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java | 3 ++-
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/be/src/exec/hash_join_node.cpp b/be/src/exec/hash_join_node.cpp
index f5a7fec132..53efed1113 100644
--- a/be/src/exec/hash_join_node.cpp
+++ b/be/src/exec/hash_join_node.cpp
@@ -148,7 +148,7 @@ Status HashJoinNode::prepare(RuntimeState* state) {
_is_null_safe_eq_join.end());
_hash_tbl.reset(new HashTable(_build_expr_ctxs, _probe_expr_ctxs,
_build_tuple_size,
stores_nulls, _is_null_safe_eq_join, id(),
- state->batch_size() * 2));
+
BitUtil::RoundUpToPowerOfTwo(state->batch_size())));
_probe_batch.reset(new RowBatch(child(0)->row_desc(),
state->batch_size()));
diff --git a/be/src/exec/set_operation_node.cpp
b/be/src/exec/set_operation_node.cpp
index 7e00e69fbe..882019b199 100644
--- a/be/src/exec/set_operation_node.cpp
+++ b/be/src/exec/set_operation_node.cpp
@@ -146,7 +146,8 @@ Status SetOperationNode::open(RuntimeState* state) {
}
// initial build hash table used for remove duplicated
_hash_tbl.reset(new HashTable(_child_expr_lists[0], _child_expr_lists[1],
_build_tuple_size,
- true, _find_nulls, id(), state->batch_size()
* 2));
+ true, _find_nulls, id(),
+
BitUtil::RoundUpToPowerOfTwo(state->batch_size())));
RowBatch build_batch(child(0)->row_desc(), state->batch_size());
RETURN_IF_ERROR(child(0)->open(state));
diff --git a/be/src/vec/olap/vgeneric_iterators.cpp
b/be/src/vec/olap/vgeneric_iterators.cpp
index 557ef8e057..83fdcbb105 100644
--- a/be/src/vec/olap/vgeneric_iterators.cpp
+++ b/be/src/vec/olap/vgeneric_iterators.cpp
@@ -239,7 +239,8 @@ private:
bool _valid = false;
mutable bool _skip = false;
size_t _index_in_block = -1;
- int _block_row_max = 4096;
+ // 4096 minus 16 + 16 bytes padding that in padding pod array
+ int _block_row_max = 4064;
int _num_columns;
int _num_key_columns;
std::vector<uint32_t>* _compare_columns;
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
index 7f4b2a5846..ccc7a8764d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
@@ -336,8 +336,9 @@ public class SessionVariable implements Serializable,
Writable {
@VariableMgr.VarAttr(name = CODEGEN_LEVEL)
public int codegenLevel = 0;
+ // 1024 minus 16 + 16 bytes padding that in padding pod array
@VariableMgr.VarAttr(name = BATCH_SIZE)
- public int batchSize = 1024;
+ public int batchSize = 992;
@VariableMgr.VarAttr(name = DISABLE_STREAMING_PREAGGREGATIONS)
public boolean disableStreamPreaggregations = false;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]