源自 spark;flare 是一款针对 1.12.2 Forge 与 Cleanroom 环境的性能分析器与调试工具。
flare 的功能是什么?
flare 由以下独立组件构成:
- CPU 分析器:诊断性能问题。
- 内存检查:诊断内存问题。
- 服务器健康报告:跟踪服务器的整体健康状况。
✨ CPU 分析器
flare 的分析器可用于诊断性能问题:“卡顿”、刻率过低、CPU 占用过高等。
它具有以下特点:
- 轻量级 - 可在生产环境中运行,对性能影响极小。
- 易于使用 - 无需配置或设置,只需安装插件/模组即可。
- 快速生成结果 - 仅需运行约 30 秒,即可为性能瓶颈区域提供有价值的见解。
- 可定制 - 可调整以针对特定线程、以特定间隔采样、仅记录“卡顿”时段等。
- 高可读性 - 简单的树状结构便于分析和解读。查看器还可应用反混淆映射(deobfuscation mappings)。
它通过采样关于系统活动的统计数据,并基于这些数据构建调用图(call graph)。然后,调用图将在在线查看器中显示,供用户进一步分析。
有两种不同的分析器引擎:
- 原生
AsyncGetCallTrace+perf_events- 使用 async-profiler (仅在 Linux x86_64 系统上可用) - 内置 Java
ThreadMXBean- sk89q 改进的流行 WarmRoast profiler。
✨ 内存检查
flare 包含多种用于诊断服务器内存问题的工具。
- 堆摘要 (Heap Summary) - 获取并分析服务器内存的基本快照
- JVM 堆的简单视图,可查看每个类的内存使用量和实例计数
- 旨在不作为完整内存分析工具的替代品。(见下一项)
- 堆转储 (Heap Dump) - 获取服务器内存的完整 (HPROF) 快照
- 转储(并可选压缩)JVM 堆的完整快照。
- 随后可使用常规分析工具检查此快照。
- GC 监控 - 监控服务器上的垃圾回收活动
- 允许用户将 GC 活动与游戏服务器挂起相关联,并轻松查看其耗时及释放的内存量。
- 观察年轻代/老年代垃圾回收的频率/持续时间,以指导使用哪些 GC 调优标志
✨ 服务器健康报告
flare 可以报告多项指标,总结服务器的整体健康状况。
这些指标包括:
- TPS - 每秒刻数,精度高于 /tps 命令所指示的程度
- 刻持续时间 (Tick Durations) - 每刻所需的时间(最小值、最大值和平均值)
- CPU 占用 - 进程以及整个系统占用的 CPU 比例
- 内存占用 - 进程占用的内存量
- 磁盘占用 - 系统空闲/已使用的磁盘空间量
除了提供刻率平均值外,flare 还可以监控单个刻 - 当单个刻的持续时间超过特定阈值时发送报告。这可用于识别相对于其他系统或游戏事件的性能问题的趋势和性质。
如需比较 flare、WarmRoast、Minecraft timings 和其他分析器,请参阅原始 spark 文档中的此 页面。
如何使用 flare?
flare 使用 Minecraft 的命令系统,让用户能够充分利用 flare 的功能。
许可证
flare 是免费且开源的。它根据 GNU GPLv3 许可证条款发布。有关更多信息,请参阅 LICENSE。
flare API 子模块根据更宽松的 MIT 许可证条款发布。有关更多信息,请参阅 flare-api/LICENSE。
flare 是 spark 的一个分支,后者也 采用 GPLv3 许可。
Derived from spark; flare is a performance profiler and debugger for 1.12.2 Forge & Cleanroom environments.
What does flare do?
flare is made up these separate components:
- CPU Profiler: Diagnose performance issues.
- Memory Inspection: Diagnose memory issues.
- Server Health Reporting: Keep track of overall server health.
✨ CPU Profiler
flare's profiler can be used to diagnose performance issues: "lag", low tick rate, high CPU usage, etc.
It is:
- Lightweight - can be ran in production with minimal impact.
- Easy to use - no configuration or setup necessary, just install the plugin/mod.
- Quick to Produce Results - running for just ~30 seconds is enough to produce useful insights into problematic areas for performance.
- Customisable - can be tuned to target specific threads, sample at a specific interval, record only "laggy" periods, etc
- Highly Readable - simple tree structure lends itself to easy analysis and interpretation. The viewer can also apply deobfuscation mappings.
It works by sampling statistical data about the systems activity, and constructing a call graph based on this data. The call graph is then displayed in an online viewer for further analysis by the user.
There are two different profiler engines:
- Native
AsyncGetCallTrace+perf_events- uses async-profiler (only available on Linux x86_64 systems) - Built-in Java
ThreadMXBean- an improved version of the popular WarmRoast profiler by sk89q.
✨ Memory Inspection
flare includes a number of tools which are useful for diagnosing memory issues with a server.
- Heap Summary - take & analyse a basic snapshot of the servers memory
- A simple view of the JVM's heap, see memory usage and instance counts for each class
- Not intended to be a full replacement of proper memory analysis tools. (see next item)
- Heap Dump - take a full (HPROF) snapshot of the servers memory
- Dumps (& optionally compresses) a full snapshot of JVM's heap.
- This snapshot can then be inspected using conventional analysis tools.
- GC Monitoring - monitor garbage collection activity on the server
- Allows the user to relate GC activity to game server hangs, and easily see how long they are taking & how much memory is being free'd.
- Observe frequency/duration of young/old generation garbage collections to inform which GC tuning flags to use
✨ Server Health Reporting
flare can report a number of metrics summarising the servers overall health.
These metrics include:
- TPS - ticks per second, to a more accurate degree indicated by the /tps command
- Tick Durations - how long each tick is taking (min, max and average)
- CPU Usage - how much of the CPU is being used by the process, and by the overall system
- Memory Usage - how much memory is being used by the process
- Disk Usage - how much disk space is free/being used by the system
As well as providing tick rate averages, flare can also monitor individual ticks - sending a report whenever a single tick's duration exceeds a certain threshold. This can be used to identify trends and the nature of performance issues, relative to other system or game events.
For a comparison between flare, WarmRoast, Minecraft timings and other profiles, see this page in the original spark docs.
How do I use flare?
flare uses Minecraft's command system for the end-user to use flare to its full potential.
License
flare is free & open source. It is released under the terms of the GNU GPLv3 license. Please see LICENSE for more information.
The flare API submodule is released under the terms of the more permissive MIT license. Please see flare-api/LICENSE for more information.
flare is a fork of spark, which was also licensed using the GPLv3.
下载 Flare (Spark for 1.12.2)
下载 Flare (Spark for 1.12.2)
下载 Flare (Spark for 1.12.2)
下载 Flare (Spark for 1.12.2)
下载 Flare (Spark for 1.12.2)
下载 Flare (Spark for 1.12.2)
下载 Flare (Spark for 1.12.2)
下载 Flare (Spark for 1.12.2)
下载 Flare (Spark for 1.12.2)
下载 Flare (Spark for 1.12.2)
新增
- 命令选项的 Tab 补全功能
- 添加 mcmod.info 文件,使 MultiMC 变体启动器能够读取 Flare 元数据
更改
- 执行命令前,现在会针对特定条件验证必需的命令选项值。
修复
- Sampler 构建器未遵循强制使用 Java sampler 的用户设置
- 超时 sampler 在完成运行后未上传(保存至磁盘)
- CoreMod 阶段 sampler 在 FMLConstructionEvent 之前排队的 GPU 模型
- 导出属性未正确从非主线程复制
- FMLCommonHandler 在 CoreMod 阶段 sampler 期间过早被调用
新增
- 采样器中添加了
--only-ticks-over功能
更改
- 将 AsyncProfiler 更新至 4.2(感谢 @HaHaWTH)
修复
- 修复了报告上传相关的问题
- WindowsWmic 已弃用,现在改用注册表查询(感谢 @HaHaWTH)
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
评论 0
登录后参与评分
还没有评论,来抢沙发吧