Apache IoTDB开发系统之配置手册

举报
小云悠悠zZ 发表于 2023/09/14 10:38:18 2023/09/14
【摘要】 为了方便用户,IoTDB服务器为用户提供了热修改功能,即在系统运行过程中修改一些配置参数,并立即应用到系统中。在下面描述的参数中,这些参数的方式是支持热修改。iotdb engine. Properties Effective trigger

在开始使用 IoTDB 之前,您需要先配置配置文件。为了您的方便,我们已经在文件中设置了默认配置。

我们总共为用户提供三种配置模块:

  • 环境配置文件。环境配置项的默认配置文件。用户可以在文件中配置 JAVA-JVM 的相关系统配置项。iotdb-env.batiotdb-env.sh

  • 系统配置文件。iotdb-engine.properties

    • iotdb-engine.properties:IoTDB 引擎层配置项的默认配置文件。用户可以在文件中配置IoTDB引擎的相关参数,如JDBC服务监听端口()、数据存储目录解序()等。更重要的是,用户可以配置有关 TsFile 的信息,例如每次写入磁盘的数据大小()。rpc_portunsequence_data_dirgroup_size_in_byte
  • 日志配置文件 (logback.xml)

三个配置项的配置文件位于 IoTDB 安装目录: 文件夹中。$IOTDB_HOME/conf

热修改配置

为了方便用户,IoTDB服务器为用户提供了热修改功能,即在系统运行过程中修改一些配置参数,并立即应用到系统中。在下面描述的参数中,这些参数的方式是支持热修改。iotdb engine. PropertiesEffectivetrigger

触发方式:客户端将命令发送到IoTDB服务器。有关客户端的用法,请参阅第 4 章。load configuration

物联网环境配置文件

环境配置文件主要用于在IoTDB服务器运行时配置Java环境相关参数,如JVM相关配置。这部分配置在 IoTDB 服务器启动时传递给 JVM。用户可以通过查看 (或) 文件来查看环境配置文件的内容。iotdb-env.shiotdb-env.bat

每个变量的详细信息如下:

  • MAX_HEAP_SIZE
Name MAX_HEAP_SIZE
Description The maximum heap memory size that IoTDB can use at 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.
Effective After restart system
  • HEAP_NEWSIZE
Name HEAP_NEWSIZE
Description The minimum heap memory size that IoTDB can use at startup.
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.
Effective After restart system
  • JMX_LOCAL
Name JMX_LOCAL
Description JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring
Type Enum String: “true”, “false”
Default true
Effective After restart system
  • JMX_PORT
Name JMX_PORT
Description JMX listening port. Please confirm that the port is not a system reserved port and is not occupied
Type Short Int: [0,65535]
Default 31999
Effective After restart system
  • JMX_IP
Name JMX_IP
Description JMX listening address. Only take effect if JMX_LOCAL=false. 0.0.0.0 is never allowed
Type String
Default 127.0.0.1
Effective After restart system

JMX 授权

我建议朋友们可以更改 JMX 远程连接的密码。

用户和密码位于 ${IOTDB_CONF}/conf/jmx.password 中。

权限定义位于 ${IOTDB_CONF}/conf/jmx.access 中。

物联网系统配置文件

文件层

  • compressor
Name compressor
Description Data compression method
Type Enum String : “UNCOMPRESSED”, “SNAPPY”
Default UNCOMPRESSED
Effective Trigger
  • group_size_in_byte
Name group_size_in_byte
Description The data size written to the disk per time
Type Int32
Default 134217728
Effective Trigger
  • page_size_in_byte
Name page_size_in_byte
Description The maximum size of a single page written in memory when each column in memory is written (in bytes)
Type Int32
Default 65536
Effective Trigger
  • max_number_of_points_in_page
Name max_number_of_points_in_page
Description The maximum number of data points (timestamps - valued groups) contained in a page
Type Int32
Default 1048576
Effective Trigger
  • max_degree_of_index_node
Name max_degree_of_index_node
Description The maximum degree of the metadata index tree (that is, the max number of each node’s children)
Type Int32
Default 1024
Effective Trigger
  • max_string_length
Name max_string_length
Description The maximum length of a single string (number of character)
Type Int32
Default 128
Effective Trigger
  • time_series_data_type
Name time_series_data_type
Description Timestamp data type
Type Enum String: “INT32”, “INT64”
Default Int64
Effective Trigger
  • time_encoder
Name time_encoder
Description Encoding type of time column
Type Enum String: “TS_2DIFF”,“PLAIN”,“RLE”
Default TS_2DIFF
Effective Trigger
  • value_encoder
Name value_encoder
Description Encoding type of value column
Type Enum String: “TS_2DIFF”,“PLAIN”,“RLE”
Default PLAIN
Effective Trigger
  • float_precision
Name float_precision
Description The precision of the floating point number.(The number of digits after the decimal point)
Type Int32
Default The default is 2 digits. Note: The 32-bit floating point number has a decimal precision of 7 bits, and the 64-bit floating point number has a decimal precision of 15 bits. If the setting is out of the range, it will have no practical significance.
Effective Trigger
  • bloomFilterErrorRate
Name bloomFilterErrorRate
Description The false positive rate of bloom filter in each TsFile. Bloom filter checks whether a given time series is in the tsfile before loading metadata. This can improve the performance of loading metadata and skip the tsfile that doesn’t contain specified time series. If you want to learn more about its mechanism, you can refer to: wiki page of bloom filterConfig Manual - 图1.
Type float, (0, 1)
Default 0.05
Effective After restart system

Engine Layer

  • rpc_address
Name rpc_address
Description The jdbc service listens on the address.
Type String
Default “0.0.0.0”
Effective After restart system
  • rpc_port
Name rpc_port
Description The jdbc service listens on the port. Please confirm that the port is not a system reserved port and is not occupied.
Type Short Int : [0,65535]
Default 6667
Effective After restart system
  • time_zone
Name time_zone
Description The time zone in which the server is located, the default is Beijing time (+8)
Type Time Zone String
Default +08:00
Effective Trigger
  • base_dir
Name base_dir
Description The IoTDB system folder. It is recommended to use an absolute path.
Type String
Default data
Effective After restart system
  • data_dirs
Name data_dirs
Description The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it.
Type String[]
Default data/data
Effective Trigger
  • wal_dir
Name wal_dir
Description Write Ahead Log storage path. It is recommended to use an absolute path.
Type String
Default data/wal
Effective After restart system
  • enable_wal
Name enable_wal
Description Whether to enable the pre-write log. The default value is true(enabled), and false means closed.
Type Bool
Default true
Effective Trigger
  • enable_parameter_adapter
Name enable_parameter_adapter
Description enable dynamically adjusting system to avoid OOM
Type Bool
Default true
Effective After restart system
  • memtable_size_threshold
Name memtable_size_threshold
Description max memtable size
Type Long
Default 1073741824
Effective when enable_parameter_adapter is false & After restart system
  • avg_series_point_number_threshold
Name avg_series_point_number_threshold
Description max average number of point of each series in memtable
Type Int32
Default 10000
Effective After restart system
  • tsfile_size_threshold
Name tsfile_size_threshold
Description max tsfile size
Type Long
Default 536870912
Effective when enable_parameter_adapter is false & After restart system
  • enable_partition
Name enable_partition
Description Whether enable time partition for data, if disabled, all data belongs to partition 0
Type Bool
Default false
Effective After restart system
  • partition_interval
Name partition_interval
Description Time range for dividing storage group, time series data will be divided into groups by this time range
Type Int64
Default 604800
Effective Should not be changed after first start up
  • concurrent_writing_time_partition
Name concurrent_writing_time_partition
Description This config decides how many time partitions in a storage group can be inserted concurrently
For example, your partitionInterval is 86400 and you want to insert data in 5 different days,
Type Int32
Default 1
Effective After restart system
  • multi_dir_strategy
Name multi_dir_strategy
Description IoTDB’s strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile_dir in order, traverses all the directories in tsfile_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile_dir;
3. MinFolderOccupiedSpaceFirstStrategy: IoTDB prefers the directory with the least space used in tsfile_dir;
4. UserDfineStrategyPackage (user-defined policy)
You can complete a user-defined policy in the following ways:
1. Inherit the cn.edu.tsinghua.iotdb.conf.directories.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project.
Type String
Default MaxDiskUsableSpaceFirstStrategy
Effective Trigger
  • tsfile_size_threshold
Name tsfile_size_threshold
Description When a TsFile size on the disk exceeds this threshold, the TsFile is closed and open a new TsFile to accept data writes. The unit is byte and the default value is 2G.
Type Int64
Default 536870912
Effective After restart system
  • tag_attribute_total_size
Name tag_attribute_total_size
Description The maximum persistence size of tags and attributes of each time series.
Type Int32
Default 700
Effective After restart system
  • enable_partial_insert
Name enable_partial_insert
Description Whether continue to write other measurements if some measurements are failed in one insertion.
Type Bool
Default true
Effective After restart system
  • flush_wal_threshold
Name flush_wal_threshold
Description After the WAL reaches this value, it is flushed to disk, and it is possible to lose at most flush_wal_threshold operations.
Type Int32
Default 10000
Effective Trigger
  • force_wal_period_in_ms
Name force_wal_period_in_ms
Description The period during which the log is periodically forced to flush to disk(in milliseconds)
Type Int32
Default 10
Effective Trigger
  • fetch_size
Name fetch_size
Description The amount of data read each time in batch (the number of data strips, that is, the number of different timestamps.)
Type Int32
Default 10000
Effective After restart system
  • merge_concurrent_threads
Name merge_concurrent_threads
Description THe max threads which can be used when unsequence data is merged. The larger it is, the more IO and CPU cost. The smaller the value, the more the disk is occupied when the unsequence data is too large, the reading will be slower.
Type Int32
Default 0
Effective After restart system
  • enable_stat_monitor
Name enable_stat_monitor
Description Whether to enable background statistics
Type Boolean
Default false
Effective After restart system
  • back_loop_period_in_second
Name back_loop_period_in_second
Description The frequency at which the system statistic module triggers(in seconds).
Type Int32
Default 5
Effective After restart system
  • concurrent_flush_thread
Name concurrent_flush_thread
Description The thread number used to perform the operation when IoTDB writes data in memory to disk. If the value is less than or equal to 0, then the number of CPU cores installed on the machine is used. The default is 0.
Type Int32
Default 0
Effective After restart system
  • stat_monitor_detect_freq_in_second
Name stat_monitor_detect_freq_in_second
Description The time interval which the system check whether the current record statistic time range exceeds stat_monitor_retain_interval every time (in seconds) and perform regular cleaning
Type Int32
Default 600
Effective After restart system
  • stat_monitor_retain_interval_in_second
Name stat_monitor_retain_interval_in_second
Description The retention time of system statistics data(in seconds). Statistics data over the retention time range will be cleaned regularly.
Type Int32
Default 600
Effective After restart system
  • tsfile_storage_fs
Name tsfile_storage_fs
Description The storage file system of Tsfile and related data files. Currently LOCAL file system and HDFS are supported.
Type String
Default LOCAL
Effective After restart system
  • core_site_path
Name core_site_path
Description Absolute file path of core-site.xml if Tsfile and related data files are stored in HDFS.
Type String
Default /etc/hadoop/conf/core-site.xml
Effective After restart system
  • hdfs_site_path
Name hdfs_site_path
Description Absolute file path of hdfs-site.xml if Tsfile and related data files are stored in HDFS.
Type String
Default /etc/hadoop/conf/hdfs-site.xml
Effective After restart system
  • hdfs_ip
Name hdfs_ip
Description IP of HDFS if Tsfile and related data files are stored in HDFS. If there are more than one hdfs_ip in configuration, Hadoop HA is used.
Type String
Default localhost
Effective After restart system
  • hdfs_port
Name hdfs_port
Description Port of HDFS if Tsfile and related data files are stored in HDFS
Type String
Default 9000
Effective After restart system
  • dfs_nameservices
Name hdfs_nameservices
Description Nameservices of HDFS HA if using Hadoop HA
Type String
Default hdfsnamespace
Effective After restart system
  • dfs_ha_namenodes
Name hdfs_ha_namenodes
Description Namenodes under DFS nameservices of HDFS HA if using Hadoop HA
Type String
Default nn1,nn2
Effective After restart system
  • dfs_ha_automatic_failover_enabled
Name dfs_ha_automatic_failover_enabled
Description Whether using automatic failover if using Hadoop HA
Type Boolean
Default true
Effective After restart system
  • dfs_client_failover_proxy_provider
Name dfs_client_failover_proxy_provider
Description Proxy provider if using Hadoop HA and enabling automatic failover
Type String
Default org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider
Effective After restart system
  • hdfs_use_kerberos
Name hdfs_use_kerberos
Description Whether use kerberos to authenticate hdfs
Type String
Default false
Effective After restart system
  • kerberos_keytab_file_path
Name kerberos_keytab_file_path
Description Full path of kerberos keytab file
Type String
Default /path
Effective After restart system
  • kerberos_principal
Name kerberos_principal
Description Kerberos pricipal
Type String
Default your principal
Effective After restart system
  • authorizer_provider_class
Name authorizer_provider_class
Description the class name of the authorization service
Type String
Default org.apache.iotdb.db.auth.authorizer.LocalFileAuthorizer
Effective After restart system
Other available values org.apache.iotdb.db.auth.authorizer.OpenIdAuthorizer
  • openID_url
Name openID_url
Description the openID server if OpenIdAuthorizer is enabled
Type String (a http url)
Default no
Effective After restart system

Automatic Schema Creation and Type Inference

  • enable_auto_create_schema
Name enable_auto_create_schema
Description whether auto create the time series when a non-existed time series data comes
Type true or false
Default true
Effective After restart system
  • default_storage_group_level
Name default_storage_group_level
Description Storage group level when creating schema automatically is enabled. For example, if we receives a data point from root.sg0.d1.s2, we will set root.sg0 as the storage group if storage group level is 1. (root is level 0)
Type integer
Default 1
Effective After restart system
  • boolean_string_infer_type
Name boolean_string_infer_type
Description To which type the values “true” and “false” should be reslved
Type BOOLEAN or TEXT
Default BOOLEAN
Effective After restart system
  • integer_string_infer_type
Name integer_string_infer_type
Description To which type an integer string like “67” in a query should be resolved
Type INT32, INT64, DOUBLE, FLOAT or TEXT
Default DOUBLE
Effective After restart system
  • nan_string_infer_type
Name nan_string_infer_type
Description To which type the value NaN in a query should be resolved
Type DOUBLE, FLOAT or TEXT
Default FLOAT
Effective After restart system
  • floating_string_infer_type
Name floating_string_infer_type
Description To which type a floating number string like “6.7” in a query should be resolved
Type DOUBLE, FLOAT or TEXT
Default FLOAT
Effective After restart system

启用 GC 日志

默认情况下,GC 日志处于关闭状态。对于性能调整,您可能需要收集 GC 信息。

要启用 GC 日志,只需在启动服务器时添加一个参数“printgc”。

  1. nohup sbin/start-server.sh printgc >/dev/null 2>&1 &

  1. sbin\start-server.bat printgc

GC 日志存储在 。最多有 10 个 gc.log.* 文件,每个文件可以达到 10MB。IOTDB_HOME/logs/gc.log

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。