硬件配置指南
查看有关InfluxDB OSS(开源)和InfluxDB Enterprise的配置和硬件指南:
免责声明: 您的数字可能与推荐的指南不同。指导方提供了为您的企业实施性能最佳的系统的估计基准
single-node-or-cluster
如果你的influxdb性能需要满足以下任何条件,则单个节点(influxdb OSS)可能无法满足日常需求
建议使用influxdb Enterprise,支持跨多个服务器核心的多个数据节点(一个集群),Influxdb Enterprise在整个集群中分布数据的多个副本,从而提供高可用性和冗余性,因此不可用的节点不会对集群产生重大影响
如果希望Influxdb的单节点实例是完全开源的,比上面列出的需要更少写入量,查询和唯一序列,并且不需要冗余,建议使用Influxdb 0SS
注意: 如果没有群集的冗余,当服务器不可用时,写入和查询会立即失败
query-guidelines
查询复杂度在系统影响上差异很大,对单个节点和集群的建议均基于中等查询负数
对于简单或复杂的查询,建议根据需要测试和调整建议的要求,查询复杂度由以下条件定义
查询复杂度 |
标准 |
简单 |
功能很少或者没有,也没有正则表达式 |
|
时间限制为几分钟,几小时或最多24小时 |
|
通常在几毫秒到几十秒毫秒内执行 |
中等 |
具有多种功能和一两个正则表达式 |
|
可能还会有GROUP BY条款或者示例多个星期的时间范围 |
|
通常在几百或几千毫秒内执行 |
复杂 |
具有多个聚合或者转换功能过着多个正则表达式 |
|
可能会采样很大的几个月或者几年的时间范围 |
|
通常需要几秒中才能执行 |
influxdb oss guidelines
在本地连接的固态驱动器(SSD)上运行influxdb,其他存储配置具有较低的性能,并且可能无法从正常处理中的小中断中恢复
估计的准则包括每秒写入,每秒查询和唯一series
,CPU,RAM和IOPS (每秒输入/输出操作).
vCPU or CPU |
RAM |
IOPS |
Writes per second |
Queries* per second |
Unique series |
2-4 cores |
2-4 GB |
500 |
< 5,000 |
< 5 |
< 100,000 |
4-6 cores |
8-32 GB |
500-1000 |
< 250,000 |
< 25 |
< 1,000,000 |
8+ cores |
32+ GB |
1000+ |
> 250,000 |
> 25 |
> 1,000,000 |
- 每秒查询一次的中等查询. 查询对系统的影响差异很大. 对于简单或复杂的查询, 我们建议根据需要测试和调整建议的要求,有关详细信息,请参考 查询准则 .
InfluxDB Enterprise cluster guidelines
设置具有奇数个元节点的集群-偶数个节点可能会在某些配置中引用问题
集群必须至少具有三个独立的Meta nodes,以实现数据冗余和可用性,具有2n+1
元节点的集群可以允许meta node节点丢失N
meta nodes不需要太多的计算能力,无论集群负载如何,都建议针对meta nodes节点使用以下准则
- vCPU or CPU: 1-2 cores
- RAM: 512 MB - 1 GB
- IOPS: 50
Web node
Influxdb Enterprise web服务器主要是具有类似于负载要求的http服务器,对于大多数应用程序,服务器不需要非常强大,一个集群只能与一个web服务器一起工作,但是为了实现冗余,建议将多个web服务器连接到单个后端Postgress
数据库
Note: 生产集群不应使用SQLite
数据库(缺少对冗余web服务器的支持和处理高负载的能力)
- vCPU or CPU: 2-4 cores
- RAM: 2-4 GB
- IOPS: 100
Data nodes
具有一个数据节点的集群有效,但没有数据冗余,冗余由数据写入的保留策略上的复制因子
设置,N
复制因素在哪里,集群可能会丢失N-1
数据节点并返回完整的查询结果
Note: 为了在集群内实现最佳的数据分支,请使用偶数个数据节点
准则因每个节点每秒的写入次数,每个节点每秒的中等查询次数以及每个节点的唯一series
而异
每个节点的准则
vCPU or CPU |
RAM |
IOPS |
Writes per second |
Queries* per second |
Unique series |
2 cores |
4-8 GB |
1000 |
< 5,000 |
< 5 |
< 100,000 |
4-6 cores |
16-32 GB |
1000+ |
< 100,000 |
< 25 |
< 1,000,000 |
8+ cores |
32+ GB |
1000+ |
> 100,000 |
> 25 |
> 1,000,000 |
when do i need more ram
通常,更多的RAM可以帮助查询返回更快,RAM需求主要取决于series cardinality,基数越高,需要更多的RAM,无论使用哪种RAM,1000万以上的基数都可以导致OOM(内存不足)故障,通常通过重新设计架构来解决OOM问题
每个集群的准则
InfluxDB Enterprise 准则因每秒的写入和查询,series cardinality
,复制因子和基础架构-AWS EC2 R4实例或等效实例而异:
- R4.xlarge (4 cores)
- R4.2xlarge (8 cores)
- R4.4xlarge (16 cores)
- R4.8xlarge (32 cores)
准则源于DevOps监视用例:维护一组计算机并监视服务器指标(例如CPU,内核,内存,磁盘空间,磁盘I/O,网络等等)
Recommended cluster configurations
集群配置准则由以下组织:
- 数据集中的系列基数10,000, 100,000, 1,000,000, or 10,000,000
- 数据节点数
- 服务器核心数
对于每个集群配置,可以找到以下准则
- 仅每秒最大写入次数 (没有正在运行的仪表板查询)
- 仅每秒最大查询数 (无数据写入)
- 每秒最大同时查询和写入次数
查看集群配置表
- 选择下面的
series cardinality
选项卡,然后单击已展开复制因子
- 在"节点x核心"列中,找到配置中数据节点和服务器核心的数量,然后查看建议的最大指导原则
选择以下复制因子之一,已查看针对10000系列的建议集群配置:
Replication factor, 1
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
1 x 4 |
188,000 |
5 |
4 + 99,000 |
1 x 8 |
405,000 |
9 |
8 + 207,000 |
1 x 16 |
673,000 |
15 |
14 + 375,000 |
1 x 32 |
1,056,000 |
24 |
22 + 650,000 |
2 x 4 |
384,000 |
14 |
14 + 184,000 |
2 x 8 |
746,000 |
22 |
22 + 334,000 |
2 x 16 |
1,511,000 |
56 |
40 + 878,000 |
2 x 32 |
2,426,000 |
96 |
68 + 1,746,000 |
Replication factor, 2
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
2 x 4 |
296,000 |
16 |
16 + 151,000 |
2 x 8 |
560,000 |
30 |
26 + 290,000 |
2 x 16 |
972,000 |
54 |
50 + 456,000 |
2 x 32 |
1,860,000 |
84 |
74 + 881,000 |
4 x 8 |
1,781,000 |
100 |
64 + 682,000 |
4 x 16 |
3,430,000 |
192 |
104 + 1,732,000 |
4 x 32 |
6,351,000 |
432 |
188 + 3,283,000 |
6 x 8 |
2,923,000 |
216 |
138 + 1,049,000 |
6 x 16 |
5,650,000 |
498 |
246 + 2,246,000 |
6 x 32 |
9,842,000 |
1248 |
528 + 5,229,000 |
8 x 8 |
3,987,000 |
632 |
336 + 1,722,000 |
8 x 16 |
7,798,000 |
1384 |
544 + 3,911,000 |
8 x 32 |
13,189,000 |
3648 |
1,152 + 7,891,000 |
Replication factor, 3
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
3 x 8 |
815,000 |
63 |
54 + 335,000 |
3 x 16 |
1,688,000 |
120 |
87 + 705,000 |
3 x 32 |
3,164,000 |
255 |
132 + 1,626,000 |
6 x 8 |
2,269,000 |
252 |
168 + 838,000 |
6 x 16 |
4,593,000 |
624 |
336 + 2,019,000 |
6 x 32 |
7,776,000 |
1340 |
576 + 3,624,000 |
Replication factor, 4
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
4 x 8 |
1,028,000 |
116 |
98 + 365,000 |
4 x 16 |
2,067,000 |
208 |
140 + 8,056,000 |
4 x 32 |
3,290,000 |
428 |
228 + 1,892,000 |
8 x 8 |
2,813,000 |
928 |
496 + 1,225,000 |
8 x 16 |
5,225,000 |
2176 |
800 + 2,799,000 |
8 x 32 |
8,555,000 |
5184 |
1088 + 6,055,000 |
Replication factor, 6
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
6 x 8 |
1,261,000 |
288 |
192 + 522,000 |
6 x 16 |
2,370,000 |
576 |
288 + 1,275,000 |
6 x 32 |
3,601,000 |
1056 |
336 + 2,390,000 |
Replication factor, 8
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
8 x 8 |
1,382,000 |
1184 |
416 + 915,000 |
8 x 16 |
2,658,000 |
2504 |
448 + 2,204,000 |
8 x 32 |
3,887,000 |
5184 |
602 + 4,120,000 |
选择以下复制因子之一,已查看建议的100000系列集群配置
Replication factor, 1
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
1 x 4 |
143,000 |
5 |
4 + 77,000 |
1 x 8 |
322,000 |
9 |
8 + 167,000 |
1 x 16 |
624,000 |
17 |
12 + 337,000 |
1 x 32 |
1,114,000 |
26 |
18 + 657,000 |
2 x 4 |
265,000 |
14 |
12 + 115,000 |
2 x 8 |
573,000 |
30 |
22 + 269,000 |
2 x 16 |
1,261,000 |
52 |
38 + 679,000 |
2 x 32 |
2,335,000 |
90 |
66 + 1,510,000 |
Replication factor, 2
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
2 x 4 |
196,000 |
16 |
14 + 77,000 |
2 x 8 |
482,000 |
30 |
24 + 203,000 |
2 x 16 |
1,060,000 |
60 |
42 + 415,000 |
2 x 32 |
1,958,000 |
94 |
64 + 984,000 |
4 x 8 |
1,144,000 |
108 |
68 + 406,000 |
4 x 16 |
2,512,000 |
228 |
148 + 866,000 |
4 x 32 |
4,346,000 |
564 |
320 + 1,886,000 |
6 x 8 |
1,802,000 |
252 |
156 + 618,000 |
6 x 16 |
3,924,000 |
562 |
384 + 1,068,000 |
6 x 32 |
6,533,000 |
1340 |
912 + 2,083,000 |
8 x 8 |
2,516,000 |
712 |
360 + 1,020,000 |
8 x 16 |
5,478,000 |
1632 |
1,024 + 1,843,000 |
8 x 32 |
1,0527,000 |
3392 |
1,792 + 4,998,000 |
Replication factor, 3
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
3 x 8 |
616,000 |
72 |
51 + 218,000 |
3 x 16 |
1,268,000 |
117 |
84 + 438,000 |
3 x 32 |
2,260,000 |
189 |
114 + 984,000 |
6 x 8 |
1,393,000 |
294 |
192 + 421,000 |
6 x 16 |
3,056,000 |
726 |
456 + 893,000 |
6 x 32 |
5,017,000 |
1584 |
798 + 1,098,000 |
Replication factor, 4
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
4 x 8 |
635,000 |
112 |
80 + 207,000 |
4 x 16 |
1,359,000 |
188 |
124 + 461,000 |
4 x 32 |
2,320,000 |
416 |
192 + 1,102,000 |
8 x 8 |
1,570,000 |
1360 |
816 + 572,000 |
8 x 16 |
3,205,000 |
2720 |
832 + 2,053,000 |
8 x 32 |
3,294,000 |
2592 |
804 + 2,174,000 |
Replication factor, 6
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
6 x 8 |
694,000 |
302 |
198 + 204,000 |
6 x 16 |
1,397,000 |
552 |
360 + 450,000 |
6 x 32 |
2,298,000 |
1248 |
384 + 1,261,000 |
Replication factor, 8
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
8 x 8 |
739,000 |
1296 |
480 + 371,000 |
8 x 16 |
1,396,000 |
2592 |
672 + 843,000 |
8 x 32 |
2,614,000 |
2496 |
960 + 1,371,000 |
选择以下复制因素之一,以查看针对1000000系列的推荐集群配置
Replication factor, 2
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
2 x 4 |
104,000 |
18 |
12 + 54,000 |
2 x 8 |
195,000 |
36 |
24 + 99,000 |
2 x 16 |
498,000 |
70 |
44 + 145,000 |
2 x 32 |
1,195,000 |
102 |
84 + 232,000 |
4 x 8 |
488,000 |
120 |
56 + 222,000 |
4 x 16 |
1,023,000 |
244 |
112 + 428,000 |
4 x 32 |
2,686,000 |
468 |
208 + 729,000 |
6 x 8 |
845,000 |
270 |
126 + 356,000 |
6 x 16 |
1,780,000 |
606 |
288 + 663,000 |
6 x 32 |
430,000 |
1,488 |
624 + 1,209,000 |
8 x 8 |
1,831,000 |
808 |
296 + 778,000 |
8 x 16 |
4,167,000 |
1,856 |
640 + 2,031,000 |
8 x 32 |
7,813,000 |
3,201 |
896 + 4,897,000 |
Replication factor, 3
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
3 x 8 |
234,000 |
72 |
42 + 87,000 |
3 x 16 |
613,000 |
120 |
75 + 166,000 |
3 x 32 |
1,365,000 |
141 |
114 + 984,000 |
6 x 8 |
593,000 |
318 |
144 + 288,000 |
6 x 16 |
1,545,000 |
744 |
384 + 407,000 |
6 x 32 |
3,204,000 |
1632 |
912 + 505,000 |
Replication factor, 4
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
4 x 8 |
258,000 |
116 |
68 + 73,000 |
4 x 16 |
675,000 |
196 |
132 + 140,000 |
4 x 32 |
1,513,000 |
244 |
176 + 476,000 |
8 x 8 |
614,000 |
1096 |
400 + 258,000 |
8 x 16 |
1,557,000 |
2496 |
1152 + 436,000 |
8 x 32 |
3,265,000 |
4288 |
2240 + 820,000 |
Replication factor, 6
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
6 x 8 |
694,000 |
302 |
198 + 204,000 |
6 x 16 |
1,397,000 |
552 |
360 + 450,000 |
6 x 32 |
2,298,000 |
1248 |
384 + 1,261,000 |
Replication factor, 8
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
8 x 8 |
739,000 |
1296 |
480 + 371,000 |
8 x 16 |
1,396,000 |
2592 |
672 + 843,000 |
8 x 32 |
2,614,000 |
2496 |
960 + 1,371,000 |
选择以下复制因子之一,已查看10000000系列的推荐集群配置:
Replication factor, 1
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
2 x 4 |
122,000 |
16 |
12 + 81,000 |
2 x 8 |
259,000 |
36 |
24 + 143,000 |
2 x 16 |
501,000 |
66 |
44 + 290,000 |
2 x 32 |
646,000 |
142 |
54 + 400,000 |
Replication factor, 2
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
2 x 4 |
87,000 |
18 |
14 + 56,000 |
2 x 8 |
169,000 |
38 |
24 + 98,000 |
2 x 16 |
334,000 |
76 |
46 + 224,000 |
2 x 32 |
534,000 |
136 |
58 + 388,000 |
4 x 8 |
335,000 |
120 |
60 + 204,000 |
4 x 16 |
643,000 |
256 |
112 + 395,000 |
4 x 32 |
967,000 |
560 |
158 + 806,000 |
6 x 8 |
521,000 |
378 |
144 + 319,000 |
6 x 16 |
890,000 |
582 |
186 + 513,000 |
8 x 8 |
699,000 |
1,032 |
256 + 477,000 |
8 x 16 |
1,345,000 |
2,048 |
544 + 741,000 |
Replication factor, 3
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
3 x 8 |
170,000 |
60 |
42 + 98,000 |
3 x 16 |
333,000 |
129 |
76 + 206,000 |
3 x 32 |
609,000 |
178 |
60 + 162,000 |
6 x 8 |
395,000 |
402 |
132 + 247,000 |
6 x 16 |
679,000 |
894 |
150 + 527,000 |
Replication factor, 4
Nodes x Core |
Writes per second |
Queries per second |
Queries + writes per second |
4 x 8 |
183365 |
132 |
52 + 100,000 |
Storage: type, amount, and configuration
存储卷和IOPS
考虑所需要的存储类型和数量,Influxdb设计为在固态驱动器(SSD)和内存优化的云实例上运行,Influxdb尚未在硬盘驱动器(HDD)上进行测试,不建议将HDD用于生产,为了获取最佳结果,influxdb服务器必须在存储上至少具有1000IOPS,以确保恢复和可用性,建议至少2000IOPS,以在停机后快速恢复集群数据节点
有关存储卷的IOPS详细信息,请参见您的云提供商文档
字节和压缩
Database 名称 , measurements, tag keys, field keys, 和 tag values仅存储一次,并且始终作为字符串存储,将为每个接地那存储Field values 和timestamps 胃每个Plints存储
非字符串值大约需要三个字节,字符串值需要可变的空间,该空间由字符串压缩确定
分开wal
和data
目录
在生产环境中运行influxdb时,将wal
目录和data
目录存储在单独的存储设备上,此优化可显着减少繁重的写负载下的磁盘争用,这是写负载度高度可变时的重要考虑因素,如果写入负载的变化幅度不超过15%,则可能没有必须进行优化
支持与反馈
欢迎来到我们这个大家庭!如对于InfluxDB产品和文档有任何反馈,请关注下列信息: