This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 18f185c261 change default settings (#6153)
18f185c261 is described below
commit 18f185c261ea9cc5ed01fc3ca14ff9b207c6dfe1
Author: Alan Choo <[email protected]>
AuthorDate: Thu Jun 2 22:52:39 2022 +0800
change default settings (#6153)
---
.../resources/conf/iotdb-engine.properties | 41 +++++++++++-----------
.../java/org/apache/iotdb/db/conf/IoTDBConfig.java | 24 ++++++-------
2 files changed, 33 insertions(+), 32 deletions(-)
diff --git a/server/src/assembly/resources/conf/iotdb-engine.properties
b/server/src/assembly/resources/conf/iotdb-engine.properties
index 97c4335e49..01f12621fa 100644
--- a/server/src/assembly/resources/conf/iotdb-engine.properties
+++ b/server/src/assembly/resources/conf/iotdb-engine.properties
@@ -104,17 +104,32 @@ config_nodes=127.0.0.1:22277
# The write performance order is DISABLE > ASYNC > SYNC, but only SYNC mode
can ensure data durability.
# wal_mode=ASYNC
-# Duration a wal flush operation will wait before calling fsync
-# A duration greater than 0 batches multiple wal fsync calls into one. This is
useful when disks are slow or WAL write contention exists.
-# Notice: this value affects write performance significantly when wal mode is
SYNC. For non-SSD disks, values in the range of 0ms-100ms are recommended.
-# Datatype: long
-# fsync_wal_delay_in_ms=10
+# wal dirs
+# If this property is unset, system will save the data in the default relative
path directory under the IoTDB folder(i.e., %IOTDB_HOME%/data).
+# If it is absolute, system will save the data in the exact location it points
to.
+# If it is relative, system will save the data in the relative path directory
it indicates under the IoTDB folder.
+# If there are more than one directory, please separate them by commas ",".
+# Note: If wal_dirs is assigned an empty string(i.e.,zero-size), it will be
handled as a relative path.
+# For windows platform
+# If its prefix is a drive specifier followed by "\\", or if its prefix is
"\\\\", then the path is absolute. Otherwise, it is relative.
+# wal_dirs=data\\wal
+# For Linux platform
+# If its prefix is "/", then the path is absolute. Otherwise, it is relative.
+# wal_dirs=data/wal
# Max number of wal nodes, each node corresponds to one wal directory
# The default value 0 means twice the number of wal dirs.
+# Notice: this value affects write performance significantly.
+# For non-SSD disks, values between one third and half of storage groups
number are recommended.
# Datatype: int
# max_wal_nodes_num=0
+# Duration a wal flush operation will wait before calling fsync
+# A duration greater than 0 batches multiple wal fsync calls into one. This is
useful when disks are slow or WAL write contention exists.
+# Notice: this value affects write performance significantly, values in the
range of 0ms-10ms are recommended.
+# Datatype: long
+# fsync_wal_delay_in_ms=3
+
# Buffer size of each wal node
# If it's a value smaller than 0, use the default value 16 * 1024 * 1024 bytes
(16MB).
# Datatype: int
@@ -122,7 +137,7 @@ config_nodes=127.0.0.1:22277
# Blocking queue capacity of each wal buffer, restricts maximum number of
WALEdits cached in the blocking queue.
# Datatype: int
-# wal_buffer_queue_capacity=10000
+# wal_buffer_queue_capacity=50
# Size threshold of each wal file
# When a wal file's size exceeds this, the wal file will be closed and a new
wal file will be created.
@@ -197,20 +212,6 @@ config_nodes=127.0.0.1:22277
# For this property, fully-qualified class name (include package name) and
simple class name are both acceptable.
# multi_dir_strategy=MaxDiskUsableSpaceFirstStrategy
-
-# wal dirs
-# If this property is unset, system will save the data in the default relative
path directory under the IoTDB folder(i.e., %IOTDB_HOME%/data).
-# If it is absolute, system will save the data in the exact location it points
to.
-# If it is relative, system will save the data in the relative path directory
it indicates under the IoTDB folder.
-# If there are more than one directory, please separate them by commas ",".
-# Note: If wal_dirs is assigned an empty string(i.e.,zero-size), it will be
handled as a relative path.
-# For windows platform
-# If its prefix is a drive specifier followed by "\\", or if its prefix is
"\\\\", then the path is absolute. Otherwise, it is relative.
-# wal_dirs=data\\wal
-# For Linux platform
-# If its prefix is "/", then the path is absolute. Otherwise, it is relative.
-# wal_dirs=data/wal
-
# consensus dir
# If this property is unset, system will save the data in the default relative
path directory under the IoTDB folder(i.e., %IOTDB_HOME%/data).
# If it is absolute, system will save the data in the exact location it points
to.
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 35a09d359d..50bc44f4a9 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
@@ -164,12 +164,12 @@ public class IoTDBConfig {
IoTDBConstant.DEFAULT_BASE_DIR + File.separator +
IoTDBConstant.WAL_FOLDER_NAME
};
- /** Duration a wal flush operation will wait before calling fsync. Unit:
millisecond */
- private volatile long fsyncWalDelayInMs = 10;
-
/** Max number of wal nodes, each node corresponds to one wal directory */
private int maxWalNodesNum = 0;
+ /** Duration a wal flush operation will wait before calling fsync. Unit:
millisecond */
+ private volatile long fsyncWalDelayInMs = 3;
+
/** Buffer size of each wal node. Unit: byte */
private int walBufferSize = 16 * 1024 * 1024;
@@ -177,7 +177,7 @@ public class IoTDBConfig {
private int walBufferEntrySize = 16 * 1024;
/** Blocking queue capacity of each wal buffer */
- private int walBufferQueueCapacity = 10_000;
+ private int walBufferQueueCapacity = 50;
/** Size threshold of each wal file. Unit: byte */
private volatile long walFileSizeThresholdInByte = 10 * 1024 * 1024;
@@ -1490,14 +1490,6 @@ public class IoTDBConfig {
this.walDirs = walDirs;
}
- public long getFsyncWalDelayInMs() {
- return fsyncWalDelayInMs;
- }
-
- void setFsyncWalDelayInMs(long fsyncWalDelayInMs) {
- this.fsyncWalDelayInMs = fsyncWalDelayInMs;
- }
-
public int getMaxWalNodesNum() {
return maxWalNodesNum;
}
@@ -1506,6 +1498,14 @@ public class IoTDBConfig {
this.maxWalNodesNum = maxWalNodesNum;
}
+ public long getFsyncWalDelayInMs() {
+ return fsyncWalDelayInMs;
+ }
+
+ void setFsyncWalDelayInMs(long fsyncWalDelayInMs) {
+ this.fsyncWalDelayInMs = fsyncWalDelayInMs;
+ }
+
public int getWalBufferSize() {
return walBufferSize;
}