You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2023/05/31 16:51:15 UTC
[iotdb] branch rel/1.1 updated: [To rel/1.1] Set default degree of parallelism back to the num of CPU cores/2
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch rel/1.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.1 by this push:
new fab8613909d [To rel/1.1] Set default degree of parallelism back to the num of CPU cores/2
fab8613909d is described below
commit fab8613909de828e487744b49df3d6faf8e7745f
Author: Liao Lanyu <14...@qq.com>
AuthorDate: Thu Jun 1 00:51:08 2023 +0800
[To rel/1.1] Set default degree of parallelism back to the num of CPU cores/2
---
node-commons/src/assembly/resources/conf/iotdb-common.properties | 5 ++---
server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java | 7 ++++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/node-commons/src/assembly/resources/conf/iotdb-common.properties b/node-commons/src/assembly/resources/conf/iotdb-common.properties
index 643e0981b3c..76eba43576c 100644
--- a/node-commons/src/assembly/resources/conf/iotdb-common.properties
+++ b/node-commons/src/assembly/resources/conf/iotdb-common.properties
@@ -427,10 +427,9 @@ cluster_name=defaultCluster
# Datatype: int
# query_thread_count=0
-# How many pipeline drivers will be created for one fragment instance. Default dop = 1 means FI will not be further split.
-# CPU core number / 2 could be a choice.
+# How many pipeline drivers will be created for one fragment instance. When <= 0, use CPU core number / 2.
# Datatype: int
-# degree_of_query_parallelism=1
+# degree_of_query_parallelism=0
# The amount of data iterate each time in server (the number of data strips, that is, the number of different timestamps.)
# Datatype: int
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index d9484295f4d..9943d007363 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -324,8 +324,7 @@ public class IoTDBConfig {
/** How many threads can concurrently execute query statement. When <= 0, use CPU core number. */
private int queryThreadCount = Runtime.getRuntime().availableProcessors();
- /** default dop = 1 for now */
- private int degreeOfParallelism = 1;
+ private int degreeOfParallelism = Math.max(1, Runtime.getRuntime().availableProcessors() / 2);
/** How many queries can be concurrently executed. When <= 0, use 1000. */
private int maxAllowedConcurrentQueries = 1000;
@@ -1544,7 +1543,9 @@ public class IoTDBConfig {
}
public void setDegreeOfParallelism(int degreeOfParallelism) {
- this.degreeOfParallelism = Math.max(1, degreeOfParallelism);
+ if (degreeOfParallelism > 0) {
+ this.degreeOfParallelism = degreeOfParallelism;
+ }
}
public int getDegreeOfParallelism() {