From a3f7cb3e27f613d9c3cbdb78fe6e893fdb522420 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 10 Jan 2023 15:44:05 +0800 Subject: [PATCH 01/21] docs: add description of multi-tier storage --- docs/en/12-taos-sql/02-database.md | 2 +- docs/zh/12-taos-sql/02-database.md | 2 +- docs/zh/14-reference/12-config/index.md | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/en/12-taos-sql/02-database.md b/docs/en/12-taos-sql/02-database.md index c3c7e5928b..4fd3fb7982 100644 --- a/docs/en/12-taos-sql/02-database.md +++ b/docs/en/12-taos-sql/02-database.md @@ -56,7 +56,7 @@ database_option: { - WAL_FSYNC_PERIOD: specifies the interval (in milliseconds) at which data is written from the WAL to disk. This parameter takes effect only when the WAL parameter is set to 2. The default value is 3000. Enter a value between 0 and 180000. The value 0 indicates that incoming data is immediately written to disk. - MAXROWS: specifies the maximum number of rows recorded in a block. The default value is 4096. - MINROWS: specifies the minimum number of rows recorded in a block. The default value is 100. -- KEEP: specifies the time for which data is retained. Enter a value between 1 and 365000. The default value is 3650. The value of the KEEP parameter must be greater than or equal to the value of the DURATION parameter. TDengine automatically deletes data that is older than the value of the KEEP parameter. You can use m (minutes), h (hours), and d (days) as the unit, for example KEEP 100h or KEEP 10d. If you do not include a unit, d is used by default. +- KEEP: specifies the time for which data is retained. Enter a value between 1 and 365000. The default value is 3650. The value of the KEEP parameter must be greater than or equal to the value of the DURATION parameter. TDengine automatically deletes data that is older than the value of the KEEP parameter. You can use m (minutes), h (hours), and d (days) as the unit, for example KEEP 100h or KEEP 10d. If you do not include a unit, d is used by default. The official version supports multi-tier storage, corresponding to multiple KEEP values(comma separated and up to 3 values keep0,keep1,keep2, and meet keep0 <= keep1 <= keep2, e.g. KEEP 100h,100d,3650d); the community version does not support multi-tier storage(although multiple keep values are configured, they do not take effect, only the maximum keep value is used as KEEP). - PAGES: specifies the number of pages in the metadata storage engine cache on each vnode. Enter a value greater than or equal to 64. The default value is 256. The space occupied by metadata storage on each vnode is equal to the product of the values of the PAGESIZE and PAGES parameters. The space occupied by default is 1 MB. - PAGESIZE: specifies the size (in KB) of each page in the metadata storage engine cache on each vnode. The default value is 4. Enter a value between 1 and 16384. - PRECISION: specifies the precision at which a database records timestamps. Enter ms for milliseconds, us for microseconds, or ns for nanoseconds. The default value is ms. diff --git a/docs/zh/12-taos-sql/02-database.md b/docs/zh/12-taos-sql/02-database.md index df52a0890b..e29b62f69c 100644 --- a/docs/zh/12-taos-sql/02-database.md +++ b/docs/zh/12-taos-sql/02-database.md @@ -56,7 +56,7 @@ database_option: { - WAL_FSYNC_PERIOD:当 WAL 参数设置为 2 时,落盘的周期。默认为 3000,单位毫秒。最小为 0,表示每次写入立即落盘;最大为 180000,即三分钟。 - MAXROWS:文件块中记录的最大条数,默认为 4096 条。 - MINROWS:文件块中记录的最小条数,默认为 100 条。 -- KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。 +- KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。企业版支持多级存储功能, 对应多个保存时间(多个以逗号分隔, 最多 3 级, 如 KEEP 100h,100d,3650d, 其中, keep0 <= keep1 <= keep2); 社区版不支持多级存储(即使配置了多个保存时间, 也不会生效, KEEP 会取最大的 keep 值)。 - PAGES:一个 VNODE 中元数据存储引擎的缓存页个数,默认为 256,最小 64。一个 VNODE 元数据存储占用 PAGESIZE \* PAGES,默认情况下为 1MB 内存。 - PAGESIZE:一个 VNODE 中元数据存储引擎的页大小,单位为 KB,默认为 4 KB。范围为 1 到 16384,即 1 KB 到 16 MB。 - PRECISION:数据库的时间戳精度。ms 表示毫秒,us 表示微秒,ns 表示纳秒,默认 ms 毫秒。 diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index c42130901f..8f0df3a0fe 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -305,6 +305,25 @@ charset 的有效值是 UTF-8。 | 适用范围 | 仅服务端适用 | | 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 缺省值 | /var/lib/taos | +``` +多级存储目录通过 dataDir 配置. 格式如下: +dataDir [path] +dataDir: 配置文件( taos.cfg )中的配置项 +path: 需要挂载的目录(不可省略) +level: 挂载等级,取值为 0,1 或 2,省略默认为 0。 最多支持 3 级, 每一级最多支持 16 个挂载点, 因此, 最多支持 48 个挂载点. +primary: 是否为主挂载点,0(否)或 1(是),默认为 1. 主挂载点只允许在 level 0, 且只允许一个主挂载点存在(level=0,primary=1). +如下,为一个正常的配置: +dataDir /mnt/data01 0 1 +dataDir /mnt/data02 0 0 +dataDir /mnt/data03 0 0 +dataDir /mnt/data10 1 0 +dataDir /mnt/data11 1 0 +dataDir /mnt/data12 1 0 +dataDir /mnt/data20 2 0 +dataDir /mnt/data21 2 0 +dataDir /mnt/data22 2 0 +``` + ### tempDir From ea13d2bc99146ed11e825e74a0da2e9f6daa3776 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 10 Jan 2023 17:03:57 +0800 Subject: [PATCH 02/21] docs: add description of keep/multi-tier storage --- docs/en/12-taos-sql/02-database.md | 2 +- docs/en/14-reference/12-config/index.md | 26 +++++++++++++++++++++++++ docs/zh/12-taos-sql/02-database.md | 2 +- docs/zh/14-reference/12-config/index.md | 21 +++++++++++++------- 4 files changed, 42 insertions(+), 9 deletions(-) diff --git a/docs/en/12-taos-sql/02-database.md b/docs/en/12-taos-sql/02-database.md index 4fd3fb7982..ce95b0a165 100644 --- a/docs/en/12-taos-sql/02-database.md +++ b/docs/en/12-taos-sql/02-database.md @@ -56,7 +56,7 @@ database_option: { - WAL_FSYNC_PERIOD: specifies the interval (in milliseconds) at which data is written from the WAL to disk. This parameter takes effect only when the WAL parameter is set to 2. The default value is 3000. Enter a value between 0 and 180000. The value 0 indicates that incoming data is immediately written to disk. - MAXROWS: specifies the maximum number of rows recorded in a block. The default value is 4096. - MINROWS: specifies the minimum number of rows recorded in a block. The default value is 100. -- KEEP: specifies the time for which data is retained. Enter a value between 1 and 365000. The default value is 3650. The value of the KEEP parameter must be greater than or equal to the value of the DURATION parameter. TDengine automatically deletes data that is older than the value of the KEEP parameter. You can use m (minutes), h (hours), and d (days) as the unit, for example KEEP 100h or KEEP 10d. If you do not include a unit, d is used by default. The official version supports multi-tier storage, corresponding to multiple KEEP values(comma separated and up to 3 values keep0,keep1,keep2, and meet keep0 <= keep1 <= keep2, e.g. KEEP 100h,100d,3650d); the community version does not support multi-tier storage(although multiple keep values are configured, they do not take effect, only the maximum keep value is used as KEEP). +- KEEP: specifies the time for which data is retained. Enter a value between 1 and 365000. The default value is 3650. The value of the KEEP parameter must be greater than or equal to the value of the DURATION parameter. TDengine automatically deletes data that is older than the value of the KEEP parameter. You can use m (minutes), h (hours), and d (days) as the unit, for example KEEP 100h or KEEP 10d. If you do not include a unit, d is used by default. The official version supports [multi-tier storage](https://docs.tdengine.com/reference/config/#datadir), corresponding to multiple KEEP values(comma separated and up to 3 values keep0,keep1,keep2 supported, and meet keep0 <= keep1 <= keep2, e.g. KEEP 100h,100d,3650d); the community version does not support multi-tier storage(although multiple keep values are configured, they do not take effect, only the maximum keep value is used as KEEP). - PAGES: specifies the number of pages in the metadata storage engine cache on each vnode. Enter a value greater than or equal to 64. The default value is 256. The space occupied by metadata storage on each vnode is equal to the product of the values of the PAGESIZE and PAGES parameters. The space occupied by default is 1 MB. - PAGESIZE: specifies the size (in KB) of each page in the metadata storage engine cache on each vnode. The default value is 4. Enter a value between 1 and 16384. - PRECISION: specifies the precision at which a database records timestamps. Enter ms for milliseconds, us for microseconds, or ns for nanoseconds. The default value is ms. diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index b6bfa4bc7d..b6e11de952 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -314,6 +314,32 @@ The charset that takes effect is UTF-8. | Applicable | Server Only | | Meaning | All data files are stored in this directory | | Default Value | /var/lib/taos | +``` +The official version supports multi-tier storage (need to cooperate with [KEEP parameter](https://docs.tdengine.com/taos-sql/database/#create-a-database)). The configuration method is as follows. + +The multi-tier storage directory is configured through dataDir, the format is: dataDir [path] + +dataDir: Configuration items in the configuration file (taos.cfg) +path: the directory to mount (cannot be omitted) +level: mount level, the value is 0, 1 or 2, if omitted, the default is 0. Up to 3 levels are supported, and each level supports up to 16 mount points, so a maximum of 48 mount points are supported. +primary: whether it is the primary mount point, 0 (no) or 1 (yes), the default is 1. The primary mount point is only allowed at level 0, and only one primary mount point is allowed (level=0, primary=1). + +Here is a normal configuration (3 storage tiers, each with 3 mount points): +Data directory /mnt/data01 0 1 +Data directory /mnt/data02 0 0 +Data directory /mnt/data03 0 0 +Data directory /mnt/data10 1 0 +Data directory /mnt/data11 1 0 +Data directory /mnt/data12 1 0 +Data directory /mnt/data20 2 0 +Data directory /mnt/data21 2 0 +Data directory /mnt/data22 2 0 + +The community version does not support multi-tier storage, and the following three configurations are acceptable: +Data directory /var/lib/taos +or dataDir /var/lib/taos 0 +or dataDir /var/lib/taos 0 1 +``` ### tempDir diff --git a/docs/zh/12-taos-sql/02-database.md b/docs/zh/12-taos-sql/02-database.md index e29b62f69c..0b0167a306 100644 --- a/docs/zh/12-taos-sql/02-database.md +++ b/docs/zh/12-taos-sql/02-database.md @@ -56,7 +56,7 @@ database_option: { - WAL_FSYNC_PERIOD:当 WAL 参数设置为 2 时,落盘的周期。默认为 3000,单位毫秒。最小为 0,表示每次写入立即落盘;最大为 180000,即三分钟。 - MAXROWS:文件块中记录的最大条数,默认为 4096 条。 - MINROWS:文件块中记录的最小条数,默认为 100 条。 -- KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。企业版支持多级存储功能, 对应多个保存时间(多个以逗号分隔, 最多 3 级, 如 KEEP 100h,100d,3650d, 其中, keep0 <= keep1 <= keep2); 社区版不支持多级存储(即使配置了多个保存时间, 也不会生效, KEEP 会取最大的 keep 值)。 +- KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。企业版支持[多级存储](https://docs.taosdata.com/reference/config/#datadir)功能, 对应多个保存时间(多个以英文逗号分隔,最多 3 级:keep0,keep1,keep2,满足 keep0 <= keep1 <= keep2,如 KEEP 100h,100d,3650d); 社区版不支持多级存储(即使配置了多个保存时间, 也不会生效, KEEP 会取最大的 keep 值)。 - PAGES:一个 VNODE 中元数据存储引擎的缓存页个数,默认为 256,最小 64。一个 VNODE 元数据存储占用 PAGESIZE \* PAGES,默认情况下为 1MB 内存。 - PAGESIZE:一个 VNODE 中元数据存储引擎的页大小,单位为 KB,默认为 4 KB。范围为 1 到 16384,即 1 KB 到 16 MB。 - PRECISION:数据库的时间戳精度。ms 表示毫秒,us 表示微秒,ns 表示纳秒,默认 ms 毫秒。 diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index 8f0df3a0fe..e3101830a1 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -306,13 +306,16 @@ charset 的有效值是 UTF-8。 | 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 缺省值 | /var/lib/taos | ``` -多级存储目录通过 dataDir 配置. 格式如下: -dataDir [path] -dataDir: 配置文件( taos.cfg )中的配置项 +企业版支持多级存储 (需要与[KEEP 参数](https://docs.taosdata.com/taos-sql/database/#%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93)配合使用). 配置方法如下。 + +多级存储目录通过 dataDir 配置。配置项格式: dataDir [path] + +dataDir: 配置文件(taos.cfg)中的配置项 path: 需要挂载的目录(不可省略) -level: 挂载等级,取值为 0,1 或 2,省略默认为 0。 最多支持 3 级, 每一级最多支持 16 个挂载点, 因此, 最多支持 48 个挂载点. -primary: 是否为主挂载点,0(否)或 1(是),默认为 1. 主挂载点只允许在 level 0, 且只允许一个主挂载点存在(level=0,primary=1). -如下,为一个正常的配置: +level: 挂载等级,取值为 0,1 或 2,省略默认为 0。最多支持 3 级, 每一级最多支持 16 个挂载点, 因此, 最多支持 48 个挂载点。 +primary: 是否为主挂载点,0(否)或 1(是),默认为 1。主挂载点只允许在 level 0,且只允许一个主挂载点存在(level = 0,primary = 1)。 + +如下,为正常的配置 ( 3 个存储层级,每个层级 3 个挂载点): dataDir /mnt/data01 0 1 dataDir /mnt/data02 0 0 dataDir /mnt/data03 0 0 @@ -322,8 +325,12 @@ dataDir /mnt/data12 1 0 dataDir /mnt/data20 2 0 dataDir /mnt/data21 2 0 dataDir /mnt/data22 2 0 -``` +社区版不支持多级存储, 以下 3 种均为正常配置: +dataDir /var/lib/taos +或 dataDir /var/lib/taos 0 +或 dataDir /var/lib/taos 0 1 +``` ### tempDir From ae1a82b0ed29afbc10446607cffa4c6aaa7e47b3 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 10 Jan 2023 17:10:33 +0800 Subject: [PATCH 03/21] docs: format optimization for dataDir --- docs/en/14-reference/12-config/index.md | 4 ++-- docs/zh/14-reference/12-config/index.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index b6e11de952..9b06263073 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -314,7 +314,7 @@ The charset that takes effect is UTF-8. | Applicable | Server Only | | Meaning | All data files are stored in this directory | | Default Value | /var/lib/taos | -``` +:::info The official version supports multi-tier storage (need to cooperate with [KEEP parameter](https://docs.tdengine.com/taos-sql/database/#create-a-database)). The configuration method is as follows. The multi-tier storage directory is configured through dataDir, the format is: dataDir [path] @@ -339,7 +339,7 @@ The community version does not support multi-tier storage, and the following thr Data directory /var/lib/taos or dataDir /var/lib/taos 0 or dataDir /var/lib/taos 0 1 -``` +::: ### tempDir diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index e3101830a1..2e3449e731 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -305,7 +305,7 @@ charset 的有效值是 UTF-8。 | 适用范围 | 仅服务端适用 | | 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 缺省值 | /var/lib/taos | -``` +:::info 企业版支持多级存储 (需要与[KEEP 参数](https://docs.taosdata.com/taos-sql/database/#%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93)配合使用). 配置方法如下。 多级存储目录通过 dataDir 配置。配置项格式: dataDir [path] @@ -330,7 +330,7 @@ dataDir /mnt/data22 2 0 dataDir /var/lib/taos 或 dataDir /var/lib/taos 0 或 dataDir /var/lib/taos 0 1 -``` +::: ### tempDir From cae3532e58cedde9a01d03eccccd389d0a5bbca0 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 10 Jan 2023 17:11:55 +0800 Subject: [PATCH 04/21] docs: format optimization for dataDir --- docs/en/14-reference/12-config/index.md | 2 ++ docs/zh/14-reference/12-config/index.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 9b06263073..51bac10f8d 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -314,6 +314,7 @@ The charset that takes effect is UTF-8. | Applicable | Server Only | | Meaning | All data files are stored in this directory | | Default Value | /var/lib/taos | + :::info The official version supports multi-tier storage (need to cooperate with [KEEP parameter](https://docs.tdengine.com/taos-sql/database/#create-a-database)). The configuration method is as follows. @@ -339,6 +340,7 @@ The community version does not support multi-tier storage, and the following thr Data directory /var/lib/taos or dataDir /var/lib/taos 0 or dataDir /var/lib/taos 0 1 + ::: ### tempDir diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index 2e3449e731..96612bf82f 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -305,6 +305,7 @@ charset 的有效值是 UTF-8。 | 适用范围 | 仅服务端适用 | | 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 缺省值 | /var/lib/taos | + :::info 企业版支持多级存储 (需要与[KEEP 参数](https://docs.taosdata.com/taos-sql/database/#%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93)配合使用). 配置方法如下。 @@ -330,6 +331,7 @@ dataDir /mnt/data22 2 0 dataDir /var/lib/taos 或 dataDir /var/lib/taos 0 或 dataDir /var/lib/taos 0 1 + ::: ### tempDir From 90fd9496066ddc5992cc798d6691583710221764 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 10 Jan 2023 17:15:09 +0800 Subject: [PATCH 05/21] docs: format optimization for dataDir --- docs/en/14-reference/12-config/index.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 51bac10f8d..1488219bcf 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -318,14 +318,15 @@ The charset that takes effect is UTF-8. :::info The official version supports multi-tier storage (need to cooperate with [KEEP parameter](https://docs.tdengine.com/taos-sql/database/#create-a-database)). The configuration method is as follows. -The multi-tier storage directory is configured through dataDir, the format is: dataDir [path] - -dataDir: Configuration items in the configuration file (taos.cfg) +The multi-tier storage directory is configured through `dataDir`, the format is: `dataDir [path] ` +``` +dataDir: Configuration items in the configuration file (`taos.cfg`) path: the directory to mount (cannot be omitted) level: mount level, the value is 0, 1 or 2, if omitted, the default is 0. Up to 3 levels are supported, and each level supports up to 16 mount points, so a maximum of 48 mount points are supported. primary: whether it is the primary mount point, 0 (no) or 1 (yes), the default is 1. The primary mount point is only allowed at level 0, and only one primary mount point is allowed (level=0, primary=1). - +``` Here is a normal configuration (3 storage tiers, each with 3 mount points): +``` Data directory /mnt/data01 0 1 Data directory /mnt/data02 0 0 Data directory /mnt/data03 0 0 @@ -335,11 +336,13 @@ Data directory /mnt/data12 1 0 Data directory /mnt/data20 2 0 Data directory /mnt/data21 2 0 Data directory /mnt/data22 2 0 - +``` The community version does not support multi-tier storage, and the following three configurations are acceptable: +``` Data directory /var/lib/taos or dataDir /var/lib/taos 0 or dataDir /var/lib/taos 0 1 +``` ::: From 3915fa6c293c3073b49dbe6ab4190c9cc3fa43dc Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 10 Jan 2023 17:53:18 +0800 Subject: [PATCH 06/21] chore: docs update for dataDir --- docs/en/14-reference/12-config/index.md | 40 ++++++------------------- docs/zh/14-reference/12-config/index.md | 2 +- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 1488219bcf..c3d5de0213 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -142,6 +142,15 @@ The parameters described in this document by the effect that they have on the sy | Meaning | Switch for allowing TDengine to collect and report service usage information | | Value Range | 0: Not allowed; 1: Allowed | | Default Value | 1 | +### crashReporting + +| Attribute | Description | +| -------- | -------------------------------------------- | +| Applicable | Server Only | +| Meaning |Switch for allowing TDengine to collect and report crash related information | +| Value Range | 0,1 0: Not allowed;1:allowed | +| Default Value | 1 | + ## Query Parameters @@ -315,37 +324,6 @@ The charset that takes effect is UTF-8. | Meaning | All data files are stored in this directory | | Default Value | /var/lib/taos | -:::info -The official version supports multi-tier storage (need to cooperate with [KEEP parameter](https://docs.tdengine.com/taos-sql/database/#create-a-database)). The configuration method is as follows. - -The multi-tier storage directory is configured through `dataDir`, the format is: `dataDir [path] ` -``` -dataDir: Configuration items in the configuration file (`taos.cfg`) -path: the directory to mount (cannot be omitted) -level: mount level, the value is 0, 1 or 2, if omitted, the default is 0. Up to 3 levels are supported, and each level supports up to 16 mount points, so a maximum of 48 mount points are supported. -primary: whether it is the primary mount point, 0 (no) or 1 (yes), the default is 1. The primary mount point is only allowed at level 0, and only one primary mount point is allowed (level=0, primary=1). -``` -Here is a normal configuration (3 storage tiers, each with 3 mount points): -``` -Data directory /mnt/data01 0 1 -Data directory /mnt/data02 0 0 -Data directory /mnt/data03 0 0 -Data directory /mnt/data10 1 0 -Data directory /mnt/data11 1 0 -Data directory /mnt/data12 1 0 -Data directory /mnt/data20 2 0 -Data directory /mnt/data21 2 0 -Data directory /mnt/data22 2 0 -``` -The community version does not support multi-tier storage, and the following three configurations are acceptable: -``` -Data directory /var/lib/taos -or dataDir /var/lib/taos 0 -or dataDir /var/lib/taos 0 1 -``` - -::: - ### tempDir | Attribute | Description | diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index 96612bf82f..8197a664ca 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -306,7 +306,7 @@ charset 的有效值是 UTF-8。 | 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 缺省值 | /var/lib/taos | -:::info + 企业版支持多级存储 (需要与[KEEP 参数](https://docs.taosdata.com/taos-sql/database/#%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93)配合使用). 配置方法如下。 多级存储目录通过 dataDir 配置。配置项格式: dataDir [path] From c1474e37464cd3db9dcbbb32926abc2c8c154cb7 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 10 Jan 2023 17:58:50 +0800 Subject: [PATCH 07/21] chore: docs update for dataDir --- docs/en/14-reference/12-config/index.md | 42 +++++++++++++++++++------ docs/zh/14-reference/12-config/index.md | 16 ++++++---- 2 files changed, 43 insertions(+), 15 deletions(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index c3d5de0213..5febda4daf 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -142,15 +142,6 @@ The parameters described in this document by the effect that they have on the sy | Meaning | Switch for allowing TDengine to collect and report service usage information | | Value Range | 0: Not allowed; 1: Allowed | | Default Value | 1 | -### crashReporting - -| Attribute | Description | -| -------- | -------------------------------------------- | -| Applicable | Server Only | -| Meaning |Switch for allowing TDengine to collect and report crash related information | -| Value Range | 0,1 0: Not allowed;1:allowed | -| Default Value | 1 | - ## Query Parameters @@ -324,6 +315,39 @@ The charset that takes effect is UTF-8. | Meaning | All data files are stored in this directory | | Default Value | /var/lib/taos | +:::info +`The official version` supports multi-tier storage (need to cooperate with [KEEP parameter](https://docs.tdengine.com/taos-sql/database/#create-a-database)). The configuration method is as follows. + +The multi-tier storage directory is configured through `dataDir`, the format is: +`dataDir [path] ` + +dataDir: Configuration items in the configuration file (`taos.cfg`) +path: the directory to mount (cannot be omitted) +level: mount level, the value is 0, 1 or 2, if omitted, the default is 0. Up to 3 levels are supported, and each level supports up to 16 mount points, so a maximum of 48 mount points are supported. +primary: whether it is the primary mount point, 0 (no) or 1 (yes), the default is 1. The primary mount point is only allowed at level 0, and only one primary mount point is allowed (level=0, primary=1). + +Here is a normal configuration (3 storage tiers, each with 3 mount points): +``` +dataDir /mnt/data01 0 1 +dataDir /mnt/data02 0 0 +dataDir /mnt/data03 0 0 +dataDir /mnt/data10 1 0 +dataDir /mnt/data11 1 0 +dataDir /mnt/data12 1 0 +dataDir /mnt/data20 2 0 +dataDir /mnt/data21 2 0 +dataDir /mnt/data22 2 0 +``` + +`The community version` does not support multi-tier storage, and the following three configurations are acceptable: +``` +dataDir /var/lib/taos +or dataDir /var/lib/taos 0 +or dataDir /var/lib/taos 0 1 +``` + +::: + ### tempDir | Attribute | Description | diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index 8197a664ca..ae1c928304 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -306,17 +306,18 @@ charset 的有效值是 UTF-8。 | 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 缺省值 | /var/lib/taos | +:::info +`企业版`支持多级存储 (需要与[KEEP 参数](https://docs.taosdata.com/taos-sql/database/#%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93)配合使用). 配置方法如下。 -企业版支持多级存储 (需要与[KEEP 参数](https://docs.taosdata.com/taos-sql/database/#%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93)配合使用). 配置方法如下。 +多级存储目录通过 `dataDir` 配置。配置项格式: dataDir [path] -多级存储目录通过 dataDir 配置。配置项格式: dataDir [path] - -dataDir: 配置文件(taos.cfg)中的配置项 +dataDir: 配置文件(`taos.cfg`)中的配置项 path: 需要挂载的目录(不可省略) level: 挂载等级,取值为 0,1 或 2,省略默认为 0。最多支持 3 级, 每一级最多支持 16 个挂载点, 因此, 最多支持 48 个挂载点。 primary: 是否为主挂载点,0(否)或 1(是),默认为 1。主挂载点只允许在 level 0,且只允许一个主挂载点存在(level = 0,primary = 1)。 -如下,为正常的配置 ( 3 个存储层级,每个层级 3 个挂载点): +如下,为正常配置 ( 3 个存储层级,每个层级 3 个挂载点): +``` dataDir /mnt/data01 0 1 dataDir /mnt/data02 0 0 dataDir /mnt/data03 0 0 @@ -326,11 +327,14 @@ dataDir /mnt/data12 1 0 dataDir /mnt/data20 2 0 dataDir /mnt/data21 2 0 dataDir /mnt/data22 2 0 +``` -社区版不支持多级存储, 以下 3 种均为正常配置: +`社区版`不支持多级存储, 以下 3 种均为正常配置: +``` dataDir /var/lib/taos 或 dataDir /var/lib/taos 0 或 dataDir /var/lib/taos 0 1 +``` ::: From 258fbcfd7d322bacffe8c3809c12cc6c116b44c5 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 10 Jan 2023 18:07:09 +0800 Subject: [PATCH 08/21] chore: dataDir docs update --- docs/en/14-reference/12-config/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 5febda4daf..54e4139645 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -339,7 +339,7 @@ dataDir /mnt/data21 2 0 dataDir /mnt/data22 2 0 ``` -`The community version` does not support multi-tier storage, and the following three configurations are acceptable: +`The community version` does not support multi-tier storage, and the following three configurations are all normal: ``` dataDir /var/lib/taos or dataDir /var/lib/taos 0 From e22271d2b9edb8d271ad25594167e4379fef790d Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Tue, 10 Jan 2023 18:33:23 +0800 Subject: [PATCH 09/21] Update index.md --- docs/zh/14-reference/12-config/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index ae1c928304..c7ce07facf 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -316,7 +316,7 @@ path: 需要挂载的目录(不可省略) level: 挂载等级,取值为 0,1 或 2,省略默认为 0。最多支持 3 级, 每一级最多支持 16 个挂载点, 因此, 最多支持 48 个挂载点。 primary: 是否为主挂载点,0(否)或 1(是),默认为 1。主挂载点只允许在 level 0,且只允许一个主挂载点存在(level = 0,primary = 1)。 -如下,为正常配置 ( 3 个存储层级,每个层级 3 个挂载点): +如下,为正常配置 (3 个存储层级,每个层级 3 个挂载点): ``` dataDir /mnt/data01 0 1 dataDir /mnt/data02 0 0 From a266f374b5efdaf06925088d14be1cc523004826 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Fri, 13 Jan 2023 14:40:36 +0800 Subject: [PATCH 10/21] Update 02-database.md --- docs/zh/12-taos-sql/02-database.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/12-taos-sql/02-database.md b/docs/zh/12-taos-sql/02-database.md index 0b0167a306..d4988e7d85 100644 --- a/docs/zh/12-taos-sql/02-database.md +++ b/docs/zh/12-taos-sql/02-database.md @@ -56,7 +56,7 @@ database_option: { - WAL_FSYNC_PERIOD:当 WAL 参数设置为 2 时,落盘的周期。默认为 3000,单位毫秒。最小为 0,表示每次写入立即落盘;最大为 180000,即三分钟。 - MAXROWS:文件块中记录的最大条数,默认为 4096 条。 - MINROWS:文件块中记录的最小条数,默认为 100 条。 -- KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。企业版支持[多级存储](https://docs.taosdata.com/reference/config/#datadir)功能, 对应多个保存时间(多个以英文逗号分隔,最多 3 级:keep0,keep1,keep2,满足 keep0 <= keep1 <= keep2,如 KEEP 100h,100d,3650d); 社区版不支持多级存储(即使配置了多个保存时间, 也不会生效, KEEP 会取最大的 keep 值)。 +- KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。企业版支持[多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8)功能, 因此, 可以设置多个保存时间(多个以英文逗号分隔,最多 3 个,满足 keep 0 <= keep 1 <= keep 2,如 KEEP 100h,100d,3650d); 社区版不支持多级存储功能(即使配置了多个保存时间, 也不会生效, KEEP 会取最大的保存时间)。 - PAGES:一个 VNODE 中元数据存储引擎的缓存页个数,默认为 256,最小 64。一个 VNODE 元数据存储占用 PAGESIZE \* PAGES,默认情况下为 1MB 内存。 - PAGESIZE:一个 VNODE 中元数据存储引擎的页大小,单位为 KB,默认为 4 KB。范围为 1 到 16384,即 1 KB 到 16 MB。 - PRECISION:数据库的时间戳精度。ms 表示毫秒,us 表示微秒,ns 表示纳秒,默认 ms 毫秒。 From d5b904e4468bbb8d95ce40483ffff6e030a5d72b Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Fri, 13 Jan 2023 14:44:15 +0800 Subject: [PATCH 11/21] Update 02-database.md --- docs/en/12-taos-sql/02-database.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/12-taos-sql/02-database.md b/docs/en/12-taos-sql/02-database.md index ce95b0a165..648719f078 100644 --- a/docs/en/12-taos-sql/02-database.md +++ b/docs/en/12-taos-sql/02-database.md @@ -56,7 +56,7 @@ database_option: { - WAL_FSYNC_PERIOD: specifies the interval (in milliseconds) at which data is written from the WAL to disk. This parameter takes effect only when the WAL parameter is set to 2. The default value is 3000. Enter a value between 0 and 180000. The value 0 indicates that incoming data is immediately written to disk. - MAXROWS: specifies the maximum number of rows recorded in a block. The default value is 4096. - MINROWS: specifies the minimum number of rows recorded in a block. The default value is 100. -- KEEP: specifies the time for which data is retained. Enter a value between 1 and 365000. The default value is 3650. The value of the KEEP parameter must be greater than or equal to the value of the DURATION parameter. TDengine automatically deletes data that is older than the value of the KEEP parameter. You can use m (minutes), h (hours), and d (days) as the unit, for example KEEP 100h or KEEP 10d. If you do not include a unit, d is used by default. The official version supports [multi-tier storage](https://docs.tdengine.com/reference/config/#datadir), corresponding to multiple KEEP values(comma separated and up to 3 values keep0,keep1,keep2 supported, and meet keep0 <= keep1 <= keep2, e.g. KEEP 100h,100d,3650d); the community version does not support multi-tier storage(although multiple keep values are configured, they do not take effect, only the maximum keep value is used as KEEP). +- KEEP: specifies the time for which data is retained. Enter a value between 1 and 365000. The default value is 3650. The value of the KEEP parameter must be greater than or equal to the value of the DURATION parameter. TDengine automatically deletes data that is older than the value of the KEEP parameter. You can use m (minutes), h (hours), and d (days) as the unit, for example KEEP 100h or KEEP 10d. If you do not include a unit, d is used by default. The Enterprise Edition supports [tiered storage](https://docs.tdengine.com/tdinternal/arch/#tiered-storage) function, thus multiple KEEP values (comma separated and up to 3 values supported, and meet keep 0 <= keep 1 <= keep 2, e.g. KEEP 100h,100d,3650d) are supported; the Community Edition does not support tiered storage (although multiple keep values are configured, they do not take effect, only the maximum keep value is used as KEEP). - PAGES: specifies the number of pages in the metadata storage engine cache on each vnode. Enter a value greater than or equal to 64. The default value is 256. The space occupied by metadata storage on each vnode is equal to the product of the values of the PAGESIZE and PAGES parameters. The space occupied by default is 1 MB. - PAGESIZE: specifies the size (in KB) of each page in the metadata storage engine cache on each vnode. The default value is 4. Enter a value between 1 and 16384. - PRECISION: specifies the precision at which a database records timestamps. Enter ms for milliseconds, us for microseconds, or ns for nanoseconds. The default value is ms. From 91e11faf8a2590a27888beef893c96cc75772f9e Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Fri, 13 Jan 2023 14:44:57 +0800 Subject: [PATCH 12/21] Update index.md --- docs/en/14-reference/12-config/index.md | 33 ------------------------- 1 file changed, 33 deletions(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 54e4139645..b6bfa4bc7d 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -315,39 +315,6 @@ The charset that takes effect is UTF-8. | Meaning | All data files are stored in this directory | | Default Value | /var/lib/taos | -:::info -`The official version` supports multi-tier storage (need to cooperate with [KEEP parameter](https://docs.tdengine.com/taos-sql/database/#create-a-database)). The configuration method is as follows. - -The multi-tier storage directory is configured through `dataDir`, the format is: -`dataDir [path] ` - -dataDir: Configuration items in the configuration file (`taos.cfg`) -path: the directory to mount (cannot be omitted) -level: mount level, the value is 0, 1 or 2, if omitted, the default is 0. Up to 3 levels are supported, and each level supports up to 16 mount points, so a maximum of 48 mount points are supported. -primary: whether it is the primary mount point, 0 (no) or 1 (yes), the default is 1. The primary mount point is only allowed at level 0, and only one primary mount point is allowed (level=0, primary=1). - -Here is a normal configuration (3 storage tiers, each with 3 mount points): -``` -dataDir /mnt/data01 0 1 -dataDir /mnt/data02 0 0 -dataDir /mnt/data03 0 0 -dataDir /mnt/data10 1 0 -dataDir /mnt/data11 1 0 -dataDir /mnt/data12 1 0 -dataDir /mnt/data20 2 0 -dataDir /mnt/data21 2 0 -dataDir /mnt/data22 2 0 -``` - -`The community version` does not support multi-tier storage, and the following three configurations are all normal: -``` -dataDir /var/lib/taos -or dataDir /var/lib/taos 0 -or dataDir /var/lib/taos 0 1 -``` - -::: - ### tempDir | Attribute | Description | From 2f4c9e51641be25b8e2007433ab42031dfe2f600 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Fri, 13 Jan 2023 14:49:37 +0800 Subject: [PATCH 13/21] Update index.md --- docs/zh/14-reference/12-config/index.md | 33 +------------------------ 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index c7ce07facf..701d7f6647 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -305,38 +305,7 @@ charset 的有效值是 UTF-8。 | 适用范围 | 仅服务端适用 | | 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 缺省值 | /var/lib/taos | - -:::info -`企业版`支持多级存储 (需要与[KEEP 参数](https://docs.taosdata.com/taos-sql/database/#%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93)配合使用). 配置方法如下。 - -多级存储目录通过 `dataDir` 配置。配置项格式: dataDir [path] - -dataDir: 配置文件(`taos.cfg`)中的配置项 -path: 需要挂载的目录(不可省略) -level: 挂载等级,取值为 0,1 或 2,省略默认为 0。最多支持 3 级, 每一级最多支持 16 个挂载点, 因此, 最多支持 48 个挂载点。 -primary: 是否为主挂载点,0(否)或 1(是),默认为 1。主挂载点只允许在 level 0,且只允许一个主挂载点存在(level = 0,primary = 1)。 - -如下,为正常配置 (3 个存储层级,每个层级 3 个挂载点): -``` -dataDir /mnt/data01 0 1 -dataDir /mnt/data02 0 0 -dataDir /mnt/data03 0 0 -dataDir /mnt/data10 1 0 -dataDir /mnt/data11 1 0 -dataDir /mnt/data12 1 0 -dataDir /mnt/data20 2 0 -dataDir /mnt/data21 2 0 -dataDir /mnt/data22 2 0 -``` - -`社区版`不支持多级存储, 以下 3 种均为正常配置: -``` -dataDir /var/lib/taos -或 dataDir /var/lib/taos 0 -或 dataDir /var/lib/taos 0 1 -``` - -::: +| 补充说明 | [KEEP](https://docs.taosdata.com/taos-sql/database/#%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E), [多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8) | ### tempDir From 97e97eb3fc283e9074995a6f455a81499de8f074 Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 13 Jan 2023 14:56:45 +0800 Subject: [PATCH 14/21] docs: note for dataDir --- docs/en/14-reference/12-config/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index b6bfa4bc7d..1113c59baf 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -314,6 +314,7 @@ The charset that takes effect is UTF-8. | Applicable | Server Only | | Meaning | All data files are stored in this directory | | Default Value | /var/lib/taos | +| Note | [KEEP](https://docs.tdengine.com/taos-sql/database/#parameters) [Tiered Storage](https://docs.tdengine.com/tdinternal/arch/#tiered-storage) | ### tempDir From 40d8bc1480bc0e9436925efb87e70eadf78a8147 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Fri, 13 Jan 2023 14:59:21 +0800 Subject: [PATCH 15/21] Update 02-database.md --- docs/en/12-taos-sql/02-database.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/12-taos-sql/02-database.md b/docs/en/12-taos-sql/02-database.md index 648719f078..2e2bb1e012 100644 --- a/docs/en/12-taos-sql/02-database.md +++ b/docs/en/12-taos-sql/02-database.md @@ -56,7 +56,7 @@ database_option: { - WAL_FSYNC_PERIOD: specifies the interval (in milliseconds) at which data is written from the WAL to disk. This parameter takes effect only when the WAL parameter is set to 2. The default value is 3000. Enter a value between 0 and 180000. The value 0 indicates that incoming data is immediately written to disk. - MAXROWS: specifies the maximum number of rows recorded in a block. The default value is 4096. - MINROWS: specifies the minimum number of rows recorded in a block. The default value is 100. -- KEEP: specifies the time for which data is retained. Enter a value between 1 and 365000. The default value is 3650. The value of the KEEP parameter must be greater than or equal to the value of the DURATION parameter. TDengine automatically deletes data that is older than the value of the KEEP parameter. You can use m (minutes), h (hours), and d (days) as the unit, for example KEEP 100h or KEEP 10d. If you do not include a unit, d is used by default. The Enterprise Edition supports [tiered storage](https://docs.tdengine.com/tdinternal/arch/#tiered-storage) function, thus multiple KEEP values (comma separated and up to 3 values supported, and meet keep 0 <= keep 1 <= keep 2, e.g. KEEP 100h,100d,3650d) are supported; the Community Edition does not support tiered storage (although multiple keep values are configured, they do not take effect, only the maximum keep value is used as KEEP). +- KEEP: specifies the time for which data is retained. Enter a value between 1 and 365000. The default value is 3650. The value of the KEEP parameter must be greater than or equal to the value of the DURATION parameter. TDengine automatically deletes data that is older than the value of the KEEP parameter. You can use m (minutes), h (hours), and d (days) as the unit, for example KEEP 100h or KEEP 10d. If you do not include a unit, d is used by default. The Enterprise Edition supports [Tiered Storage](https://docs.tdengine.com/tdinternal/arch/#tiered-storage) function, thus multiple KEEP values (comma separated and up to 3 values supported, and meet keep 0 <= keep 1 <= keep 2, e.g. KEEP 100h,100d,3650d) are supported; the Community Edition does not support [Tiered Storage](https://docs.tdengine.com/tdinternal/arch/#tiered-storage) function (although multiple keep values are configured, they do not take effect, only the maximum keep value is used as KEEP). - PAGES: specifies the number of pages in the metadata storage engine cache on each vnode. Enter a value greater than or equal to 64. The default value is 256. The space occupied by metadata storage on each vnode is equal to the product of the values of the PAGESIZE and PAGES parameters. The space occupied by default is 1 MB. - PAGESIZE: specifies the size (in KB) of each page in the metadata storage engine cache on each vnode. The default value is 4. Enter a value between 1 and 16384. - PRECISION: specifies the precision at which a database records timestamps. Enter ms for milliseconds, us for microseconds, or ns for nanoseconds. The default value is ms. From f6ecd5ea9b6700b400759c3e1b9c7483ea3c33b3 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Fri, 13 Jan 2023 15:00:55 +0800 Subject: [PATCH 16/21] Update 02-database.md --- docs/zh/12-taos-sql/02-database.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/12-taos-sql/02-database.md b/docs/zh/12-taos-sql/02-database.md index d4988e7d85..c3a9ef4213 100644 --- a/docs/zh/12-taos-sql/02-database.md +++ b/docs/zh/12-taos-sql/02-database.md @@ -56,7 +56,7 @@ database_option: { - WAL_FSYNC_PERIOD:当 WAL 参数设置为 2 时,落盘的周期。默认为 3000,单位毫秒。最小为 0,表示每次写入立即落盘;最大为 180000,即三分钟。 - MAXROWS:文件块中记录的最大条数,默认为 4096 条。 - MINROWS:文件块中记录的最小条数,默认为 100 条。 -- KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。企业版支持[多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8)功能, 因此, 可以设置多个保存时间(多个以英文逗号分隔,最多 3 个,满足 keep 0 <= keep 1 <= keep 2,如 KEEP 100h,100d,3650d); 社区版不支持多级存储功能(即使配置了多个保存时间, 也不会生效, KEEP 会取最大的保存时间)。 +- KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。企业版支持[多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8)功能, 因此, 可以设置多个保存时间(多个以英文逗号分隔,最多 3 个,满足 keep 0 <= keep 1 <= keep 2,如 KEEP 100h,100d,3650d); 社区版不支持[多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8)功能(即使配置了多个保存时间, 也不会生效, KEEP 会取最大的保存时间)。 - PAGES:一个 VNODE 中元数据存储引擎的缓存页个数,默认为 256,最小 64。一个 VNODE 元数据存储占用 PAGESIZE \* PAGES,默认情况下为 1MB 内存。 - PAGESIZE:一个 VNODE 中元数据存储引擎的页大小,单位为 KB,默认为 4 KB。范围为 1 到 16384,即 1 KB 到 16 MB。 - PRECISION:数据库的时间戳精度。ms 表示毫秒,us 表示微秒,ns 表示纳秒,默认 ms 毫秒。 From 9c17ba1ca0b041791c06a38f2444fcc1a78e64b2 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Fri, 13 Jan 2023 15:01:36 +0800 Subject: [PATCH 17/21] Update 02-database.md --- docs/zh/12-taos-sql/02-database.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/12-taos-sql/02-database.md b/docs/zh/12-taos-sql/02-database.md index c3a9ef4213..d4988e7d85 100644 --- a/docs/zh/12-taos-sql/02-database.md +++ b/docs/zh/12-taos-sql/02-database.md @@ -56,7 +56,7 @@ database_option: { - WAL_FSYNC_PERIOD:当 WAL 参数设置为 2 时,落盘的周期。默认为 3000,单位毫秒。最小为 0,表示每次写入立即落盘;最大为 180000,即三分钟。 - MAXROWS:文件块中记录的最大条数,默认为 4096 条。 - MINROWS:文件块中记录的最小条数,默认为 100 条。 -- KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。企业版支持[多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8)功能, 因此, 可以设置多个保存时间(多个以英文逗号分隔,最多 3 个,满足 keep 0 <= keep 1 <= keep 2,如 KEEP 100h,100d,3650d); 社区版不支持[多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8)功能(即使配置了多个保存时间, 也不会生效, KEEP 会取最大的保存时间)。 +- KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。企业版支持[多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8)功能, 因此, 可以设置多个保存时间(多个以英文逗号分隔,最多 3 个,满足 keep 0 <= keep 1 <= keep 2,如 KEEP 100h,100d,3650d); 社区版不支持多级存储功能(即使配置了多个保存时间, 也不会生效, KEEP 会取最大的保存时间)。 - PAGES:一个 VNODE 中元数据存储引擎的缓存页个数,默认为 256,最小 64。一个 VNODE 元数据存储占用 PAGESIZE \* PAGES,默认情况下为 1MB 内存。 - PAGESIZE:一个 VNODE 中元数据存储引擎的页大小,单位为 KB,默认为 4 KB。范围为 1 到 16384,即 1 KB 到 16 MB。 - PRECISION:数据库的时间戳精度。ms 表示毫秒,us 表示微秒,ns 表示纳秒,默认 ms 毫秒。 From 20e50d00b70b97f44c0951071426d4fba2e473a5 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Fri, 13 Jan 2023 15:02:00 +0800 Subject: [PATCH 18/21] Update 02-database.md --- docs/en/12-taos-sql/02-database.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/12-taos-sql/02-database.md b/docs/en/12-taos-sql/02-database.md index 2e2bb1e012..cdd53c803f 100644 --- a/docs/en/12-taos-sql/02-database.md +++ b/docs/en/12-taos-sql/02-database.md @@ -56,7 +56,7 @@ database_option: { - WAL_FSYNC_PERIOD: specifies the interval (in milliseconds) at which data is written from the WAL to disk. This parameter takes effect only when the WAL parameter is set to 2. The default value is 3000. Enter a value between 0 and 180000. The value 0 indicates that incoming data is immediately written to disk. - MAXROWS: specifies the maximum number of rows recorded in a block. The default value is 4096. - MINROWS: specifies the minimum number of rows recorded in a block. The default value is 100. -- KEEP: specifies the time for which data is retained. Enter a value between 1 and 365000. The default value is 3650. The value of the KEEP parameter must be greater than or equal to the value of the DURATION parameter. TDengine automatically deletes data that is older than the value of the KEEP parameter. You can use m (minutes), h (hours), and d (days) as the unit, for example KEEP 100h or KEEP 10d. If you do not include a unit, d is used by default. The Enterprise Edition supports [Tiered Storage](https://docs.tdengine.com/tdinternal/arch/#tiered-storage) function, thus multiple KEEP values (comma separated and up to 3 values supported, and meet keep 0 <= keep 1 <= keep 2, e.g. KEEP 100h,100d,3650d) are supported; the Community Edition does not support [Tiered Storage](https://docs.tdengine.com/tdinternal/arch/#tiered-storage) function (although multiple keep values are configured, they do not take effect, only the maximum keep value is used as KEEP). +- KEEP: specifies the time for which data is retained. Enter a value between 1 and 365000. The default value is 3650. The value of the KEEP parameter must be greater than or equal to the value of the DURATION parameter. TDengine automatically deletes data that is older than the value of the KEEP parameter. You can use m (minutes), h (hours), and d (days) as the unit, for example KEEP 100h or KEEP 10d. If you do not include a unit, d is used by default. The Enterprise Edition supports [Tiered Storage](https://docs.tdengine.com/tdinternal/arch/#tiered-storage) function, thus multiple KEEP values (comma separated and up to 3 values supported, and meet keep 0 <= keep 1 <= keep 2, e.g. KEEP 100h,100d,3650d) are supported; the Community Edition does not support Tiered Storage function (although multiple keep values are configured, they do not take effect, only the maximum keep value is used as KEEP). - PAGES: specifies the number of pages in the metadata storage engine cache on each vnode. Enter a value greater than or equal to 64. The default value is 256. The space occupied by metadata storage on each vnode is equal to the product of the values of the PAGESIZE and PAGES parameters. The space occupied by default is 1 MB. - PAGESIZE: specifies the size (in KB) of each page in the metadata storage engine cache on each vnode. The default value is 4. Enter a value between 1 and 16384. - PRECISION: specifies the precision at which a database records timestamps. Enter ms for milliseconds, us for microseconds, or ns for nanoseconds. The default value is ms. From 18378e513acea737f7aa2a42322b0dc7cc37827f Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Fri, 13 Jan 2023 15:04:03 +0800 Subject: [PATCH 19/21] Update index.md --- docs/zh/14-reference/12-config/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index 701d7f6647..580b995184 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -305,7 +305,7 @@ charset 的有效值是 UTF-8。 | 适用范围 | 仅服务端适用 | | 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 缺省值 | /var/lib/taos | -| 补充说明 | [KEEP](https://docs.taosdata.com/taos-sql/database/#%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E), [多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8) | +| 补充说明 | [KEEP](https://docs.taosdata.com/taos-sql/database/#%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E) [多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8) | ### tempDir From 7fffebcd41f52dc70960c84c2542518e25bc685e Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Sat, 14 Jan 2023 12:05:07 +0800 Subject: [PATCH 20/21] Update index.md --- docs/zh/14-reference/12-config/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index 580b995184..0159442692 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -305,7 +305,7 @@ charset 的有效值是 UTF-8。 | 适用范围 | 仅服务端适用 | | 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 缺省值 | /var/lib/taos | -| 补充说明 | [KEEP](https://docs.taosdata.com/taos-sql/database/#%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E) [多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8) | +| 补充说明 | [多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8) 功能需要与 [KEEP](https://docs.taosdata.com/taos-sql/database/#%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E) 参数配合使用 | ### tempDir From 2d64dfa1310fdc9fb88e8175ead37d5a9a6f0659 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Sat, 14 Jan 2023 12:08:31 +0800 Subject: [PATCH 21/21] Update index.md --- docs/en/14-reference/12-config/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 1113c59baf..dd9158c80a 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -314,7 +314,7 @@ The charset that takes effect is UTF-8. | Applicable | Server Only | | Meaning | All data files are stored in this directory | | Default Value | /var/lib/taos | -| Note | [KEEP](https://docs.tdengine.com/taos-sql/database/#parameters) [Tiered Storage](https://docs.tdengine.com/tdinternal/arch/#tiered-storage) | +| Note | The [Tiered Storage](https://docs.tdengine.com/tdinternal/arch/#tiered-storage) function needs to be used in conjunction with the [KEEP](https://docs.tdengine.com/taos-sql/database/#parameters) parameter | ### tempDir