You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2023/04/16 14:21:48 UTC

[iotdb] branch optimize_query_sub_thread created (now 52d1e0cd19)

This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a change to branch optimize_query_sub_thread
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 52d1e0cd19 release the thread of sub query, default is cpu cores

This branch includes the following new commits:

     new 52d1e0cd19 release the thread of sub query, default is cpu cores

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: release the thread of sub query, default is cpu cores

Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch optimize_query_sub_thread
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 52d1e0cd19edeba632f1becfdf6eee8916bffd0e
Author: qiaojialin <64...@qq.com>
AuthorDate: Sun Apr 16 22:21:33 2023 +0800

    release the thread of sub query, default is cpu cores
---
 server/src/assembly/resources/conf/iotdb-engine.properties           | 2 +-
 server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java       | 2 +-
 .../org/apache/iotdb/db/query/pool/RawQueryReadTaskPoolManager.java  | 5 +----
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/server/src/assembly/resources/conf/iotdb-engine.properties b/server/src/assembly/resources/conf/iotdb-engine.properties
index ac166426b3..849d195ba1 100644
--- a/server/src/assembly/resources/conf/iotdb-engine.properties
+++ b/server/src/assembly/resources/conf/iotdb-engine.properties
@@ -281,7 +281,7 @@ timestamp_precision=ms
 
 # How many threads can concurrently read data for raw data query. When <= 0, use CPU core number.
 # Datatype: int
-# concurrent_sub_rawQuery_thread=8
+# concurrent_sub_rawQuery_thread=0
 
 # Blocking queue size for read task in raw data query. Must >= 1.
 # 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 b195d3df55..c629a1bda7 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
@@ -282,7 +282,7 @@ public class IoTDBConfig {
   /**
    * How many threads can concurrently read data for raw data query. When <= 0, use CPU core number.
    */
-  private int concurrentSubRawQueryThread = 8;
+  private int concurrentSubRawQueryThread = 0;
 
   /** Blocking queue size for read task in raw data query. */
   private int rawQueryBlockingQueueCapacity = 5;
diff --git a/server/src/main/java/org/apache/iotdb/db/query/pool/RawQueryReadTaskPoolManager.java b/server/src/main/java/org/apache/iotdb/db/query/pool/RawQueryReadTaskPoolManager.java
index 7ce306fac2..82699c7a9c 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/pool/RawQueryReadTaskPoolManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/pool/RawQueryReadTaskPoolManager.java
@@ -40,10 +40,7 @@ public class RawQueryReadTaskPoolManager extends AbstractPoolManager {
   private static final Logger LOGGER = LoggerFactory.getLogger(RawQueryReadTaskPoolManager.class);
 
   private RawQueryReadTaskPoolManager() {
-    int threadCnt =
-        Math.min(
-            Runtime.getRuntime().availableProcessors(),
-            IoTDBDescriptor.getInstance().getConfig().getConcurrentSubRawQueryThread());
+    int threadCnt = IoTDBDescriptor.getInstance().getConfig().getConcurrentSubRawQueryThread();
     pool =
         IoTDBThreadPoolFactory.newFixedThreadPool(
             threadCnt, ThreadName.SUB_RAW_QUERY_SERVICE.getName());