prometheus v2.53.0-rc.0 版本更新介绍
发布日期: 2024-06-07
版本号: v2.53.0-rc.0
本次Prometheus版本更新主要调整了Go运行时的GOGC默认值,从100改为50,显著降低内存占用且对CPU影响极小。主要变更包括:规则模块优化警报恢复机制,仅执行1次查询替代原有多次操作;新增规则组的query_offset配置项以增强远程写入容错性,并添加规则组恢复耗时监控指标。性能优化涉及OTLP远程写入格式转换改用哈希标识、正则匹配查询效率提升。修复项涵盖OTLP目标信息生成逻辑、非启用状态下直方图采集异常、Scaleway服务发现地址选取逻辑、查询日志文件描述符泄漏、正则查询CPU占用不可中断问题,以及API结果计数警告逻辑校准。同时改进了损坏快照回放时的存储头状态处理机制。
更新内容 (中文)
本次发布调整了GOGC(Go运行时在内存过量使用与CPU利用率之间的权衡控制参数)的默认值。我们发现通过将Go语言上游默认值从100调整为50,Prometheus运行时仅需极少的额外CPU开销即可实现内存占用的显著降低。
- [CHANGE] 规则: 恢复告警时执行1次查询而非N次(N为告警规则内包含的告警数量)#13980 #14048
- [CHANGE] 运行时: 将GOGC阈值从100调整为50 #14176
- [FEATURE] 规则: 通过规则组配置文件为每个规则组新增
query_offset
选项,并在全局配置中增加rule_query_offset
参数以增强对远程写入延迟的适应性#14061 #14216 - [ENHANCEMENT] 规则: 新增
rule_group_last_restore_duration_seconds
指标用于测量规则组恢复耗时#13974 - [ENHANCEMENT] OTLP: 通过使用标签集哈希代替基于字符串的度量标识符,提升远程写入格式转换性能#14006 #13991
- [ENHANCEMENT] TSDB: 优化带正则表达式匹配器的查询性能#13620
- [BUGFIX] OTLP: 仅在存在度量指标且至少定义了一个识别性标签时生成target_info#13991
- [BUGFIX] 抓取: 当原生直方图功能关闭时,避免尝试接收原生直方图数据(例如在启用created_time功能时触发的protobuf抓取场景)#13987
- [BUGFIX] Scaleway服务发现: 当无私有IP可用时,使用实例公网IP作为
__address__
元标签#13941 - [BUGFIX] 查询日志: 修复错误场景下的文件描述符泄漏问题#13948
- [BUGFIX] TSDB: 允许取消带有复杂正则匹配的查询以避免CPU资源耗尽#14096 #14103 #14118 #14199
- [BUGFIX] API: 仅在series、label-names和label-values接口的返回结果超过限制时告警,结果数量等于限制值时不再告警#14116
- [BUGFIX] TSDB: 修复回放损坏快照时的head统计信息与hook处理#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 50.
- [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 50 #14176
- [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 - [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-rc.0.darwin-amd64.tar.gz
- prometheus-2.53.0-rc.0.darwin-arm64.tar.gz
- prometheus-2.53.0-rc.0.dragonfly-amd64.tar.gz
- prometheus-2.53.0-rc.0.freebsd-386.tar.gz
- prometheus-2.53.0-rc.0.freebsd-amd64.tar.gz
- prometheus-2.53.0-rc.0.freebsd-arm64.tar.gz
- prometheus-2.53.0-rc.0.freebsd-armv6.tar.gz
- prometheus-2.53.0-rc.0.freebsd-armv7.tar.gz
- prometheus-2.53.0-rc.0.illumos-amd64.tar.gz
- prometheus-2.53.0-rc.0.linux-386.tar.gz
- prometheus-2.53.0-rc.0.linux-amd64.tar.gz
- prometheus-2.53.0-rc.0.linux-arm64.tar.gz
- prometheus-2.53.0-rc.0.linux-armv5.tar.gz
- prometheus-2.53.0-rc.0.linux-armv6.tar.gz
- prometheus-2.53.0-rc.0.linux-armv7.tar.gz
- prometheus-2.53.0-rc.0.linux-mips.tar.gz
- prometheus-2.53.0-rc.0.linux-mips64.tar.gz
- prometheus-2.53.0-rc.0.linux-mips64le.tar.gz
- prometheus-2.53.0-rc.0.linux-mipsle.tar.gz
- prometheus-2.53.0-rc.0.linux-ppc64.tar.gz
- prometheus-2.53.0-rc.0.linux-ppc64le.tar.gz
- prometheus-2.53.0-rc.0.linux-riscv64.tar.gz
- prometheus-2.53.0-rc.0.linux-s390x.tar.gz
- prometheus-2.53.0-rc.0.netbsd-386.tar.gz
- prometheus-2.53.0-rc.0.netbsd-amd64.tar.gz
- prometheus-2.53.0-rc.0.netbsd-arm64.tar.gz
- prometheus-2.53.0-rc.0.netbsd-armv6.tar.gz
- prometheus-2.53.0-rc.0.netbsd-armv7.tar.gz
- prometheus-2.53.0-rc.0.windows-386.tar.gz
- prometheus-2.53.0-rc.0.windows-386.zip
- prometheus-2.53.0-rc.0.windows-amd64.tar.gz
- prometheus-2.53.0-rc.0.windows-amd64.zip
- prometheus-2.53.0-rc.0.windows-arm64.tar.gz
- prometheus-2.53.0-rc.0.windows-arm64.zip
- prometheus-web-ui-2.53.0-rc.0.tar.gz
- sha256sums.txt