⚡ PerfTriage – Fabric 服务器自动卡顿诊断
自动捕捉卡顿瞬间
PerfTriage 是一款轻量级的 Fabric 服务端卡顿分流模组。
在正常游戏过程中,它会保持静默。 当你的服务器出现持续的 MSPT(每刻毫秒数)尖峰时,它会自动捕获一个结构化的诊断快照,记录加载了什么、集中在哪里、哪些区块最可疑。
它旨在解决一个实际问题:
当卡顿发生时,到底发生了什么?
为什么安装 PerfTriage?
大多数服务器卡顿并不会发生在你正在主动分析性能的时候。
等到玩家报告:
- “服务器卡死了”
- “某个区域不对劲”
- “TPS 又掉了”
……那个时刻往往已经过去了。
PerfTriage 正是为了解决这个问题而设计的。
它不像重型的全程性能分析器那样一直运行,而是等待有意义的卡顿尖峰,然后记录一份重点报告,让你在事件发生后仍能保留证据。

PerfTriage 检测什么
PerfTriage 监控:
- 持续的 MSPT 尖峰
- 卡顿后的自动恢复
- 基于冷却时间的转储节流
- 硬性扫描预算保护
触发后,它会生成一份结构化报告,包含:
Tick 分析
- 窗口化 MSPT 统计信息(
avg / p95 / max) - 采样持续时间
- 预算使用情况
- 扫描截断状态
世界快照
- 每个维度已加载的区块数量
- 实体/方块实体总数
- 主要实体类型
- 主要方块实体类型
热点分析
- 主导实体类型
- 主导方块实体类型
- 区块级集中度
- 每刻平均人口密度
- 预算信息
- 区块扫描能力标志
报告异步写入以下目录:
config/perftriage/reports/
同时提供两种格式:
.txt供人类阅读.json供工具处理
为什么热点区块很重要
卡顿通常是由局部集中引起的,而不仅仅是全局负载过高。
典型例子包括:
- 物品/生物/船只泛滥
- 红石机器
- 刷怪塔
- 潜影贝农场
- 区块加载器
- 少数区块内行为异常的机械装置
PerfTriage 不仅告诉你加载了什么。 它还告诉你集中在哪里。
这意味着你可以:
- 直接传送至问题区域
- 检查受影响的区块
- 移除源头
- 立即验证改善效果

PerfTriage vs spark
PerfTriage 不是像 spark 这样的完整性能分析器的替代品。
它们解决的问题不同。
| 工具 | 最佳用途 | 典型工作流程 |
|---|---|---|
| PerfTriage | 自动捕获卡顿事件 | 安装并等待尖峰出现 |
| spark | 深度分析和根本原因调查 | 需要时手动运行 |
| 两者结合 | 先捕获事件,稍后深入调查 | 最佳整体工作流程 |
PerfTriage 用于自动捕获事件。 spark 用于在你明确查找方向后进行更深入的剖析。
这就是为什么它们配合使用效果很好。
谁应该安装这个模组?
PerfTriage 对以下用户特别有用:
- 只有在玩家抱怨后才注意到卡顿的服务器所有者
- 需要区块坐标而不只是“服务器很卡”的管理员
- 不希望全程开启性能分析的正式运营服务器
- 难以手动复现间歇性卡顿的服务器

它的独特之处是什么?
PerfTriage 不会持续对 tick 函数进行插桩。
相反,它专注于:
- 仅在有意义卡顿期间激活
- 使用严格的扫描和采样预算
- 避免沉重的后台开销
- 生成确定性快照
- 提供区块级定位
这使得它非常适合对稳定性至关重要的正式服务器。
命令
手动转储
/perftriage dump now
状态
/perftriage status
显示:
- 当前 MSPT 窗口统计信息
- 剩余冷却时间
- 上次报告路径
- 恢复状态
示例热点输出
entity_hot_type: minecraft:acacia_boat
entity_hot_chunks_topN:
- -4,-4: 35320
- -4,-3: 35280
- -5,-3: 31600
这意味着检测到的热点人口主要集中在这些区块中。
兼容性
- Fabric Loader 0.18+
- Minecraft 1.21.4
- 服务端
理念
PerfTriage 专注于:
- 低开销
- 确定性诊断
- 自动操作
- 生产环境安全
它旨在帮助你在卡顿时保留证据,而不是迫使你事后猜测。
路线图
- 多版本支持(
1.20.x / 1.21.x) - 可选的 Top-K 类型区块细分
- 可配置的阈值
- 报告索引聚合
- 可选的性能分析器集成模式
许可证
MIT
为真正的服务器构建。 为真实的卡顿设计。
本模组每周更新,可能一周更新一到两次。
⚡ PerfTriage – Automatic Lag Forensics for Fabric Servers
Catch lag when it happens — automatically
PerfTriage is a lightweight server-side lag triage mod for Fabric.
It stays quiet during normal gameplay. When your server hits sustained MSPT spikes, it automatically captures a structured diagnostic snapshot of what was loaded, where it was concentrated, and which chunks are most suspicious.
It is built for one practical question:
When lag happened, what exactly was going on?
Why install PerfTriage?
Most server lag does not happen while you are actively profiling.
By the time players report:
- “the server froze”
- “something is wrong in one area”
- “TPS dropped again”
…the moment is often already gone.
PerfTriage is designed for that exact problem.
Instead of running as a heavy always-on profiler, it waits for meaningful lag spikes, then records a focused report so you still have evidence after the incident.

What PerfTriage detects
PerfTriage monitors:
- Sustained MSPT spikes
- Automatic recovery after lag
- Cooldown-based dump throttling
- Hard scan budget protection
When triggered, it generates a structured report with:
Tick analysis
- Windowed MSPT statistics (
avg / p95 / max) - Sampling duration
- Budget usage
- Scan truncation status
World snapshot
- Loaded chunk count per dimension
- Total entities / block entities
- Top entity types
- Top block entity types
Hotspot analysis
- Dominant entity type
- Dominant block entity type
- Chunk-level concentration
- Average population per tick
- Budget information
- Chunk scan capability flag
Reports are written asynchronously to:
config/perftriage/reports/
Both:
.txtfor humans.jsonfor tools
Why hotspot chunks matter
Lag is often caused by local concentration, not just global load.
Typical examples include:
- Item / mob / boat flooding
- Redstone machines
- Mob farms
- Sculk farms
- Chunk loaders
- Misbehaving contraptions concentrated in a few chunks
PerfTriage does not only tell you what was loaded. It tells you where the concentration was.
That means you can:
- teleport directly to the problem area
- inspect the affected chunks
- remove the source
- verify the improvement immediately

PerfTriage vs spark
PerfTriage is not a replacement for full profilers like spark.
They solve different problems.
| Tool | Best for | Typical workflow |
|---|---|---|
| PerfTriage | Automatically catching lag incidents | Install and wait for spikes |
| spark | Deep profiling and root-cause investigation | Run manually when needed |
| Both together | Catch first, investigate later | Best overall workflow |
PerfTriage is for automatic incident capture. spark is for deeper profiling after you know where to look.
That is why they work well together.
Who should install this?
PerfTriage is especially useful for:
- server owners who only notice lag after players complain
- admins who need chunk coordinates, not just “the server is slow”
- production servers where always-on profiling is undesirable
- servers with intermittent lag that is hard to reproduce manually

What makes it different?
PerfTriage does not continuously instrument tick functions.
Instead, it focuses on:
- activating only during meaningful lag
- using strict scan and sampling budgets
- avoiding heavy background overhead
- producing deterministic snapshots
- providing chunk-level localization
This makes it suitable for real servers where stability matters.
Commands
Manual dump
/perftriage dump now
Status
/perftriage status
Displays:
- current MSPT window stats
- cooldown remaining
- last report path
- recovery state
Example hotspot output
entity_hot_type: minecraft:acacia_boat
entity_hot_chunks_topN:
- -4,-4: 35320
- -4,-3: 35280
- -5,-3: 31600
This means most of the detected hotspot population is concentrated in those chunks.
Compatibility
- Fabric Loader 0.18+
- Minecraft 1.21.4
- Server-side
Philosophy
PerfTriage focuses on:
- low overhead
- deterministic diagnostics
- automatic operation
- production safety
It is designed to help you keep evidence when lag happens, instead of forcing you to guess after the fact.
Roadmap
- Multi-version support (
1.20.x / 1.21.x) - Optional Top-K type chunk breakdown
- Configurable thresholds
- Report index aggregation
- Optional profiler integration mode
License
MIT
Built for real servers. Designed for real lag.
This mod updates weekly, maybe one or two times a week.
下载 PerfTriage
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PerfTriage
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PerfTriage
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PerfTriage
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PerfTriage
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PerfTriage
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PerfTriage
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PerfTriage
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PerfTriage
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
原版世界生成优化模组
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
评论 0
登录后参与评分
还没有评论,来抢沙发吧