问题
时序数据库 IoTDB 1.3.3 版本 IoTDB 执行查询操作失败,日志打印提示 Too many open files。通过命令查看打开文件数,结果如下:
[root@0002 DataReceiver]# lsof|grep 28347|wc -l DataNode
55444
[root@0002 DataReceiver]# lsof|grep 28207|wc -l ConfigNode
18574
查看当前网络连接数,结果如下:
原因和解决方案
原因一:连接太多
解决方案:降一点客户端并发。
原因二:文件太多
解决方案:观察顺乱序文件数目以及各个模块文件的大小,TsFile 过多可以调优合并,顺序文件或者乱序文件过多可以修改配置。
The priority of compaction execution
# INNER_CROSS: prioritize inner space compaction, reduce the number of files first
# CROSS_INNER: prioritize cross space compaction, eliminate the unsequence files first
# BALANCE: alternate two compaction types
# compaction_priority=BALANCE
# 优先执行空间内合并任务
compaction_priority=INNER_CROSS
# BALANCE 各种合并平等
# INNER_CROSS 优先进行顺序文件和顺序文件或乱序文件和乱序文件的合并
# CROSS_INNER 优先将乱序文件合并到顺序文件中
如果条件允许(系统资源利用率不高,对其他模块无影响的情况下),可以适当再调大合并写入限速、合并任务并发数,加速合并。
How many threads will be set up to perform compaction, 10 by default.
# Set to 1 when less than or equal to 0.
# Datatype: int
# compaction_thread_count=1# The limit of write throughput merge can reach per second
# values less than or equal to 0 means no limit
# Datatype: int, Unit: megabyte
# compaction_write_throughput_mb_per_sec=16
# 每秒可达到的写入吞吐量合并限制。# The number of sub compaction threads to be set up to perform compaction.
# Currently only works for nonAligned data in cross space compaction and unseq inner space compaction.
# Set to 1 when less than or equal to 0.
# Datatype: int
# sub_compaction_thread_count=4
# 每个合并任务的子任务线程数,只对跨空间合并和乱序空间内合并生效