問題
時序數據庫 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
# 每個合并任務的子任務線程數,只對跨空間合并和亂序空間內合并生效