Skip to content
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

docs(env):change docs about memory #118

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/UserGuide/Master/FAQ/Frequently-asked-questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,4 @@ not affect normal operations. We will fix this message in the incoming releases.

#### 3. How to decrease the memory usage of ConfigNode/DataNode?

- Adjust the MAX_HEAP_SIZE、MAX_DIRECT_MEMORY_SIZE options in conf/confignode-env.sh and conf/datanode-env.sh.
- Adjust the ON_HEAP_MEMORY、OFF_HEAP_MEMORY options in conf/confignode-env.sh and conf/datanode-env.sh.
2 changes: 1 addition & 1 deletion src/UserGuide/Master/QuickStart/ClusterQuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Port:

**illustration:**
- We could use IP address or hostname/domain to set up an IoTDB cluster, then we would take IP address. If using hostname/domain, `/etc/hosts` must be set well.
- JVM memory configuration: `MAX_HEAP_SIZE` in `confignode-env.sh` and `datanode-env.sh`, equal to or greater than 1G is recommended. It's enough for ConfigNode taking 1~2G. The memory taking of DataNode is decided by the inputing and querying data.
- JVM memory configuration: `ON_HEAP_MEMORY` in `confignode-env.sh` and `datanode-env.sh`, equal to or greater than 1G is recommended. It's enough for ConfigNode taking 1~2G. The memory taking of DataNode is decided by the inputing and querying data.

### 1.1 download
In every computer, [Download](https://iotdb.apache.org/Download/) the IoTDB install package and extract it to working directory of `/data/iotdb`.
Expand Down
24 changes: 12 additions & 12 deletions src/UserGuide/Master/Reference/ConfigNode-Config-Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,31 @@ The environment configuration file is mainly used to configure the Java environm

The details of each parameter are as follows:

* MAX\_HEAP\_SIZE
* MEMORY\_SIZE

|Name|MAX\_HEAP\_SIZE|
|Name|MEMORY\_SIZE|
|:---:|:---|
|Description|The maximum heap memory size that IoTDB can use |
|Description|The memory size that IoTDB ConfigNode will use when startup |
|Type|String|
|Default| On Linux or MacOS, the default is one quarter of the memory. On Windows, the default value for 32-bit systems is 512M, and the default for 64-bit systems is 2G.|
|Default|The default is three-tenths of the memory, with a maximum of 16G.|
|Effective|After restarting system|

* HEAP\_NEWSIZE
* ON\_HEAP\_MEMORY

|Name|HEAP\_NEWSIZE|
|Name|ON\_HEAP\_MEMORY|
|:---:|:---|
|Description|The minimum heap memory size that IoTDB will use when startup |
|Description|The heap memory size that IoTDB ConfigNode can use |
|Type|String|
|Default| On Linux or MacOS, the default is min{cores * 100M, one quarter of MAX\_HEAP\_SIZE}. On Windows, the default value for 32-bit systems is 512M, and the default for 64-bit systems is 2G.|
|Default| Calculate based on MEMORY\_SIZE.|
|Effective|After restarting system|

* MAX\_DIRECT\_MEMORY\_SIZE
* OFF\_HEAP\_MEMORY

|Name|MAX\_DIRECT\_MEMORY\_SIZE|
|Name|OFF\_HEAP\_MEMORY|
|:---:|:---|
|Description|The max direct memory that IoTDB could use|
|Description|The direct memory that IoTDB ConfigNode can use|
|Type|String|
|Default| Equal to the MAX\_HEAP\_SIZE|
|Default| Calculate based on MEMORY\_SIZE.|
|Effective|After restarting system|


Expand Down
24 changes: 12 additions & 12 deletions src/UserGuide/Master/Reference/DataNode-Config-Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,31 @@ The environment configuration file is mainly used to configure the Java environm

The details of each parameter are as follows:

* MAX\_HEAP\_SIZE
* MEMORY\_SIZE

|Name|MAX\_HEAP\_SIZE|
|Name|MEMORY\_SIZE|
|:---:|:---|
|Description|The maximum heap memory size that IoTDB can use |
|Description|The minimum heap memory size that IoTDB DataNode will use when startup |
|Type|String|
|Default| On Linux or MacOS, the default is one quarter of the memory. On Windows, the default value for 32-bit systems is 512M, and the default for 64-bit systems is 2G.|
|Default| The default is a half of the memory.|
|Effective|After restarting system|

* HEAP\_NEWSIZE
* ON\_HEAP\_MEMORY

|Name|HEAP\_NEWSIZE|
|Name|ON\_HEAP\_MEMORY|
|:---:|:---|
|Description|The minimum heap memory size that IoTDB will use when startup |
|Description|The heap memory size that IoTDB DataNode can use |
|Type|String|
|Default| On Linux or MacOS, the default is min{cores * 100M, one quarter of MAX\_HEAP\_SIZE}. On Windows, the default value for 32-bit systems is 512M, and the default for 64-bit systems is 2G.|
|Default| Calculate based on MEMORY\_SIZE.|
|Effective|After restarting system|

* MAX\_DIRECT\_MEMORY\_SIZE
* OFF\_HEAP\_MEMORY

|Name|MAX\_DIRECT\_MEMORY\_SIZE|
|Name|OFF\_HEAP\_MEMORY|
|:---:|:---|
|Description|The max direct memory that IoTDB could use|
|Description|The direct memory that IoTDB DataNode can use|
|Type|String|
|Default| Equal to the MAX\_HEAP\_SIZE|
|Default| Calculate based on MEMORY\_SIZE.|
|Effective|After restarting system|

* JMX\_LOCAL
Expand Down
2 changes: 1 addition & 1 deletion src/zh/UserGuide/Master/FAQ/Frequently-asked-questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,5 +237,5 @@ IoTDB 客户端默认显示的时间是人类可读的(比如:```1970-01-01T

#### 3. 如何降低ConfigNode、DataNode使用的内存?

- 在conf/confignode-env.sh、conf/datanode-env.sh文件可通过调整MAX_HEAP_SIZE、MAX_DIRECT_MEMORY_SIZE等选项可以调整ConfigNode、DataNode使用的最大堆内、堆外内存
- 在conf/confignode-env.sh、conf/datanode-env.sh文件可通过调整ON_HEAP_MEMORY、OFF_HEAP_MEMORY等选项可以调整ConfigNode、DataNode使用的最大堆内、堆外内存

2 changes: 1 addition & 1 deletion src/zh/UserGuide/Master/QuickStart/ClusterQuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ IP地址和服务角色分配如下:

**说明:**
- 可以使用`IP地址`或者`机器名/域名`来安装配置 IoTDB 集群,本文以IP地址为例。如果使用`机器名/域名`,则需要配置`/etc/hosts`。
- JVM堆内存配置: `confignode-env.sh` 和 `datanode-env.sh` 内配置`MAX_HEAP_SIZE`, 建议设置值大于等于1G。ConfigNode 1~2G就足够了,DataNode的内存配置则要取决于数据接入的数据量和查询数据量。
- JVM堆内存配置: `confignode-env.sh` 和 `datanode-env.sh` 内配置`ON_HEAP_MEMORY`, 建议设置值大于等于1G。ConfigNode 1~2G就足够了,DataNode的内存配置则要取决于数据接入的数据量和查询数据量。

### 1.1 下载安装包
在每个节点,将安装包[下载](https://iotdb.apache.org/Download/)后,解压到安装目录,这里为`/data/iotdb`。
Expand Down
24 changes: 12 additions & 12 deletions src/zh/UserGuide/Master/Reference/ConfigNode-Config-Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ IoTDB ConfigNode 配置文件均位于 IoTDB 安装目录:`conf`文件夹下

环境配置项主要用于对 ConfigNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。ConfigNode 启动时,此部分配置会被传给 JVM,详细配置项说明如下:

* MAX\_HEAP\_SIZE
* MEMORY\_SIZE

|名字|MAX\_HEAP\_SIZE|
|名字|MEMORY\_SIZE|
|:---:|:---|
|描述|IoTDB 能使用的最大堆内存大小 |
|描述|IoTDB ConfigNode 启动时分配的内存大小 |
|类型|String|
|默认值|取决于操作系统和机器配置。在 Linux 或 MacOS 系统下默认为机器内存的四分之一。在 Windows 系统下,32 位系统的默认值是 512M,64 位系统默认值是 2G。|
|默认值|取决于操作系统和机器配置。默认为机器内存的十分之三,最多会被设置为 16G。|
|改后生效方式|重启服务生效|

* HEAP\_NEWSIZE
* ON\_HEAP\_MEMORY

|名字|HEAP\_NEWSIZE|
|名字|ON\_HEAP\_MEMORY|
|:---:|:---|
|描述|IoTDB 启动时分配的最小堆内存大小 |
|描述|IoTDB ConfigNode 能使用的堆内内存大小 |
|类型|String|
|默认值|取决于操作系统和机器配置。在 Linux 或 MacOS 系统下默认值为机器 CPU 核数乘以 100M 的值与 MAX\_HEAP\_SIZE 四分之一这二者的最小值。在 Windows 系统下,32 位系统的默认值是 512M,64 位系统默认值是 2G。|
|默认值|取决于MEMORY\_SIZE的配置。|
|改后生效方式|重启服务生效|

* MAX\_DIRECT\_MEMORY\_SIZE
* OFF\_HEAP\_MEMORY

|名字|MAX\_DIRECT\_MEMORY\_SIZE|
|名字|OFF\_HEAP\_MEMORY|
|:---:|:---|
|描述|IoTDB 能使用的最大堆外内存大小 |
|描述|IoTDB ConfigNode 能使用的堆外内存大小 |
|类型|String|
|默认值|默认与最大堆内存相等|
|默认值|取决于MEMORY\_SIZE的配置。|
|改后生效方式|重启服务生效|

## 系统配置项(iotdb-confignode.properties)
Expand Down
24 changes: 12 additions & 12 deletions src/zh/UserGuide/Master/Reference/DataNode-Config-Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,31 @@ IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB

环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下:

* MAX\_HEAP\_SIZE
* MEMORY\_SIZE

|名字|MAX\_HEAP\_SIZE|
|名字|MEMORY\_SIZE|
|:---:|:---|
|描述|IoTDB 能使用的最大堆内存大小 |
|描述|IoTDB DataNode 启动时分配的内存大小 |
|类型|String|
|默认值|取决于操作系统和机器配置。在 Linux 或 MacOS 系统下默认为机器内存的四分之一。在 Windows 系统下,32 位系统的默认值是 512M,64 位系统默认值是 2G。|
|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。|
|改后生效方式|重启服务生效|

* HEAP\_NEWSIZE
* ON\_HEAP\_MEMORY

|名字|HEAP\_NEWSIZE|
|名字|ON\_HEAP\_MEMORY|
|:---:|:---|
|描述|IoTDB 启动时分配的最小堆内存大小 |
|描述|IoTDB DataNode 能使用的堆内内存大小 |
|类型|String|
|默认值|取决于操作系统和机器配置。在 Linux 或 MacOS 系统下默认值为机器 CPU 核数乘以 100M 的值与 MAX\_HEAP\_SIZE 四分之一这二者的最小值。在 Windows 系统下,32 位系统的默认值是 512M,64 位系统默认值是 2G。|
|默认值|取决于MEMORY\_SIZE的配置。|
|改后生效方式|重启服务生效|

* MAX\_DIRECT\_MEMORY\_SIZE
* OFF\_HEAP\_MEMORY

|名字|MAX\_DIRECT\_MEMORY\_SIZE|
|名字|OFF\_HEAP\_MEMORY|
|:---:|:---|
|描述|IoTDB 能使用的最大堆外内存大小 |
|描述|IoTDB DataNode 能使用的堆外内存大小 |
|类型|String|
|默认值|默认与最大堆内存相等|
|默认值|取决于MEMORY\_SIZE的配置|
|改后生效方式|重启服务生效|

* JMX\_LOCAL
Expand Down