prometheus v2.53.0 版本更新介绍
发布日期: 2024-06-19
版本号: v2.53.0
本次更新调整了Prometheus的默认GOGC值(Go运行时内存与CPU平衡参数),从100降至75,显著降低内存占用且对CPU影响甚微。主要变更包括:规则模块优化警报恢复流程,改为单次查询替代多次查询;新增规则组配置项
query_offset
以应对远程写入延迟;新增规则组恢复耗时监控指标;提升OTLP协议远程写入性能,改用哈希标识指标;优化正则匹配查询效率。修复内容包括:禁用原生直方图功能时避免误采集、Scaleway服务发现优先使用公网IP、修复查询日志文件句柄泄漏、增强正则查询中断能力、调整API结果数量提示逻辑、修复损坏快照回放时的统计异常等。
更新内容 (中文)
此版本更改了GOGC(Go运行时在内存过量使用与CPU利用率之间权衡的控制参数)的默认值。我们发现通过将上游Go的默认值从100调整为75,Prometheus能够在额外CPU使用量极低的情况下运行,同时显著减少内存占用。
- [变更] 规则:恢复告警时执行1次查询而非N次(N为告警规则内的告警数量)。#13980 #14048
- [变更] 运行时:将GOGC阈值从100更改为75。#14176 #14285
- [功能] 规则:通过规则组配置文件新增
query_offset
选项,并在全局配置中增加rule_query_offset
参数,以增强对远程写入延迟的容错能力。#14061 #14216 #14273 - [优化] 规则:新增
rule_group_last_restore_duration_seconds
指标用于测量规则组恢复耗时。#13974 - [优化] OTLP:通过使用标签集哈希而非基于字符串的标识符来提高远程写入格式转换性能。#14006 #13991
- [优化] TSDB:优化带有正则表达式匹配器的查询性能。#13620
- [修复] OTLP:仅当存在指标且至少定义一个标识标签时生成target_info。#13991
- [修复] 抓取:当原生直方图功能关闭时,避免尝试摄取原生直方图数据(例如在启用创建时间功能时可能意外激活protobuf抓取的情况)。#13987
- [修复] Scaleway服务发现:当无私有IP可用时,使用实例公网IP作为
__address__
元标签。#13941 - [修复] 查询日志:修复错误场景下的文件描述符泄漏问题。#13948
- [修复] TSDB:允许取消包含复杂正则匹配的查询,避免CPU资源耗尽。#14096 #14103 #14118 #14199
- [修复] API:仅当series/label-names/label-values接口返回结果数超过限制时告警,结果数等于限制时不再告警。#14116
- [修复] TSDB:修复回放损坏快照时的head统计和钩子处理。#14079
更新内容 (原始)
This release changes the default for GOGC, the Go runtime control for the trade-off between excess memory use and CPU usage. We have found that Prometheus operates with minimal additional CPU usage, but greatly reduced memory by adjusting the upstream Go default from 100 to 75.
- [CHANGE] Rules: Execute 1 query instead of N (where N is the number of alerts within alert rule) when restoring alerts. #13980 #14048
- [CHANGE] Runtime: Change GOGC threshold from 100 to 75 #14176 #14285
- [FEATURE] Rules: Add new option
query_offset
for each rule group via rule group configuration file andrule_query_offset
as part of the global configuration to have more resilience for remote write delays. #14061 #14216 #14273 - [ENHANCEMENT] Rules: Add
rule_group_last_restore_duration_seconds
metric to measure the time it takes to restore a rule group. #13974 - [ENHANCEMENT] OTLP: Improve remote write format translation performance by using label set hashes for metric identifiers instead of string based ones. #14006 #13991
- [ENHANCEMENT] TSDB: Optimize querying with regexp matchers. #13620
- [BUGFIX] OTLP: Don’t generate target_info unless there are metrics and at least one identifying label is defined. #13991
- [BUGFIX] Scrape: Do no try to ingest native histograms when the native histograms feature is turned off. This happened when protobuf scrape was enabled by for example the created time feature. #13987
- [BUGFIX] Scaleway SD: Use the instance’s public IP if no private IP is available as the
__address__
meta label. #13941 - [BUGFIX] Query logger: Do not leak file descriptors on error. #13948
- [BUGFIX] TSDB: Let queries with heavy regex matches be cancelled and not use up the CPU. #14096 #14103 #14118 #14199
- [BUGFIX] API: Do not warn if result count is equal to the limit, only when exceeding the limit for the series, label-names and label-values APIs. #14116
- [BUGFIX] TSDB: Fix head stats and hooks when replaying a corrupted snapshot. #14079
下载链接
- prometheus-2.53.0.darwin-amd64.tar.gz
- prometheus-2.53.0.darwin-arm64.tar.gz
- prometheus-2.53.0.dragonfly-amd64.tar.gz
- prometheus-2.53.0.freebsd-386.tar.gz
- prometheus-2.53.0.freebsd-amd64.tar.gz
- prometheus-2.53.0.freebsd-arm64.tar.gz
- prometheus-2.53.0.freebsd-armv6.tar.gz
- prometheus-2.53.0.freebsd-armv7.tar.gz
- prometheus-2.53.0.illumos-amd64.tar.gz
- prometheus-2.53.0.linux-386.tar.gz
- prometheus-2.53.0.linux-amd64.tar.gz
- prometheus-2.53.0.linux-arm64.tar.gz
- prometheus-2.53.0.linux-armv5.tar.gz
- prometheus-2.53.0.linux-armv6.tar.gz
- prometheus-2.53.0.linux-armv7.tar.gz
- prometheus-2.53.0.linux-mips.tar.gz
- prometheus-2.53.0.linux-mips64.tar.gz
- prometheus-2.53.0.linux-mips64le.tar.gz
- prometheus-2.53.0.linux-mipsle.tar.gz
- prometheus-2.53.0.linux-ppc64.tar.gz
- prometheus-2.53.0.linux-ppc64le.tar.gz
- prometheus-2.53.0.linux-riscv64.tar.gz
- prometheus-2.53.0.linux-s390x.tar.gz
- prometheus-2.53.0.netbsd-386.tar.gz
- prometheus-2.53.0.netbsd-amd64.tar.gz
- prometheus-2.53.0.netbsd-arm64.tar.gz
- prometheus-2.53.0.netbsd-armv6.tar.gz
- prometheus-2.53.0.netbsd-armv7.tar.gz
- prometheus-2.53.0.windows-386.tar.gz
- prometheus-2.53.0.windows-386.zip
- prometheus-2.53.0.windows-amd64.tar.gz
- prometheus-2.53.0.windows-amd64.zip
- prometheus-2.53.0.windows-arm64.tar.gz
- prometheus-2.53.0.windows-arm64.zip
- prometheus-web-ui-2.53.0.tar.gz
- sha256sums.txt