k8s-prometheus-memory

Mango milk 2021-02-23 16:05:27
k8s-prometheus-memory prometheus memory


prometheus Memory


Node Exporter Yes 251 Two measuring points
Prometheus The service itself has 775 Two measuring points
sample_count(duration) = Number of nodes * [ Measuring point * (duration / interval )]
for example : obtain 3h,100 Nodes , Every node 251 Two measuring points , every other 15s, Take a sample , The total number of samples
duration = 3h
Number of nodes = 100
Measuring point = 251
interval =15s
sample_count(3h) = 100 * [ 251 * (3*60*60 / 15)] = 18072000
from Prometheus Official documents of , Use double-delta The scheme encodes the data , The byte size of each sample is :sample_size=3.3B
Prometheus The use of memory consists of the following four parts :
1、 An active sample held in memory
2、 Queued for persistent expired samples
3、 Index data
4、 Other runtime memory consumption
3.1.1 An active sample held in memory
Suppose we ask for a retention time of mem_retention, The required memory space is :
sample_mem_1=sample_size * sample_count(mem_retention)
for example :
mem_retention = 6h
Number of nodes = 100
Measuring point = 251
interval = 1s
sample_mem_1= sample_size * sample_count(mem_retention)
= 3.3B * sample_count(6h)
= 3.3B * 100 * [ 251 * (6*60*60 / 1)]
= 1789128000B /1000 /1000 /1000
= 1.789G
2、 Queued for persistent expired samples
To complete the persistence of all current queued samples ,Prometheus The time period required is persist_cycle, In general , The duration of persistence is 6 Hours : persist_cycle=6h
In order not to Prometheus Enter emergency mode (Rush mode), The space occupied by queuing samples should not exceed the estimated space 80%
for example :
Number of nodes = 100
Measuring point = 251
interval = 1s
therefore , The memory space required for queuing samples is :
sample_mem_2 = [ sample_size * sample_count(persist_cycle)] / 0.8
= [ 3.3B * sample_count(6h) ] / 0.8
= 3.3B * 100 * [ 251 * (6*60*60 / 1)] / 0.8
= 1789128000B / 0.8
= 2236410000B /1000 /1000 /1000
= 2.2364G
3、 Index data
An estimate of the memory required for index data , You can use the following empirical formula :
series_count= Number of nodes * Measuring point
index_mem=series_count / 1000 MB
版权声明
本文为[Mango milk ]所创,转载请带上原文链接,感谢
https://javamana.com/2021/02/20210223160327725g.html

  1. Spring can still play like this! Ali's new spring product has successfully overturned my understanding of spring!
  2. IntelliJ idea can also draw mind maps. It's really the strongest ide!
  3. JavaScript performance optimization [inline cache] V8 engine features
  4. linux 配置java环境
  5. linux find 查找文件
  6. 深入理解 Web 协议 (三):HTTP 2
  7. IntelliJ IDEA 相关问题记录
  8. Deep understanding of Web protocol (3): http 2
  9. 深入理解 Web 协议 (三):HTTP 2
  10. 腾讯IEG开源AI SDK:自动化测试吃鸡、MOBA类游戏
  11. Mysql Command
  12. Configuring Java environment with Linux
  13. Find files in Linux
  14. docker-Dockerfile 创建镜像
  15. Redis Cluster
  16. 深入理解 Web 协议 (三):HTTP 2
  17. JavaScriptBOM操作
  18. JavaScriptBOM操作
  19. Deep understanding of Web protocol (3): http 2
  20. Record of IntelliJ idea related problems
  21. Deep understanding of Web protocol (3): http 2
  22. Tencent IEG open source AI SDK: automatic testing of chicken eating and MoBa games
  23. Mysql Command
  24. Docker dockerfile create image
  25. Redis Cluster
  26. 死磕Spring之IoC篇 - 文章导读
  27. Deep understanding of Web protocol (3): http 2
  28. JavaScript BOM operation
  29. JavaScript BOM operation
  30. 死磕Spring之IoC篇 - 文章导读
  31. k8s node 操作与维护
  32. k8s 证书更新
  33. 【Java面试题第三期】JVM中哪些地方会出现内存溢出?出现的原因是什么?
  34. HashMap连环问你能答出几道?
  35. k8s-cronjob
  36. k8s-cert
  37. 头条面试官:说说Kafka的消费者提交方式,怎么实现的
  38. 什么是HTTPS以及如何实施HTTPS?
  39. Spring: an introduction to IOC
  40. Spring: an introduction to IOC
  41. Operation and maintenance of k8s node
  42. K8s certificate update
  43. vue使用sdk进行七牛上传
  44. k8s-dns
  45. JavaScript 邮箱验证 - 正则验证
  46. k8s-dashboard
  47. HashMap连环问你能答出几道?
  48. Where does memory overflow occur in the JVM? What are the reasons for this?
  49. How many questions can you answer?
  50. k8s-cronjob
  51. spring注解--Transactional
  52. k8s-cert
  53. Will the Spring Festival holiday be extended to February 27 in 2021? Here comes the response
  54. Headline Interviewer: talk about Kafka's consumer submission method, how to achieve it
  55. 【k8s集群】搭建步骤
  56. k8s-kubeadm
  57. k8s-etcd
  58. What is HTTPS and how to implement it?
  59. Java中使用HashMap改进查找性能
  60. maven发布jar包运行时找不到类问题