Valence Benchmark
一个无需任何成本即可运行的 Minecraft 基准测试工具。
Minecraft 1.21.1 · Fabric · 仅客户端 · by ceketrumdev
大多数游戏内的基准测试都会改变它们所测量的对象。它们绘制叠加层,将日志写入磁盘,在渲染线程上分配内存,而它们报告的卡顿部分是由其自身造成的。
Valence Benchmark 记录一个 10 分钟的时间窗口,在此期间它不做上述任何事情。每帧仅执行一次 System.nanoTime()、两次比较和两次数组写入,数据存入时钟启动前分配的缓冲区中。没有叠加层,没有日志记录,没有垃圾回收,窗口打开期间不截图。之后,当时钟停止时,它会生成一份完整的报告。
你不需要盲目相信这一点。报告会打印出该模组自身的开销 —— 以纳秒和每帧分配的字节数表示 —— 这些数值是在每次运行的开始时在渲染线程上测量的。分配数值应为 0.00。
快速开始
1. 加入一个世界并静止站立几秒钟
2. /valence bench start
3. 正常游玩 10 分钟
4. 点击聊天中的报告链接
这就是整个工作流程。运行会自动结束;你无需手动停止它。
命令
所有内容都在 /valence 下。所有命令均为客户端侧 —— 由你的游戏处理,永远不会到达服务器 —— 除下文注明的一个例外。
| 命令 |
参数 |
作用 |
/valence bench start |
— |
预热,然后测量 10 分钟 |
/valence bench stop |
— |
取消预热,或提前结束正在进行的测量 |
/valence bench status |
— |
当前状态、进度、上一个报告的链接 |
/valence bench open |
— |
可点击的上一个报告链接 |
/valence bench |
— |
同 status |
/valence world |
— |
上次世界加载时间(已测量) |
/valence scene entities |
<count> [type] [radius] |
构建一个可复现的生物场景 |
/valence scene clear |
— |
移除场景 |
/valence bench start
打印简短倒计时,然后打开测量窗口。在预热期间,模组会分配其缓冲区,启动硬件探针,截取参考截图并强制进行垃圾回收,从而使窗口本身从干净的堆内存开始。
如果你不在世界中(块和生物指标需要一个世界)、已有运行在进行中,或场景仍在构建中,则拒绝启动。
一旦窗口打开,直到关闭窗口之前不会绘制任何内容或记录任何日志。正常游玩即可。
/valence bench stop
在预热期间,取消操作。在运行期间,提前结束运行但仍会写入报告 —— 明确标记为“部分”,因为 3 分钟的运行和 10 分钟的运行不可比。
/valence bench status
空闲:上次世界加载时间和上一个报告的链接。
运行中:已用时间、剩余时间、已记录的帧数、已接收的块数。
/valence world
单独的上次世界加载时间。此测量持续运行,独立于任何基准测试 —— 加入世界,静止站立,模组会在未被请求的情况下计时。
/valence scene entities <count> [type] [radius]
| 参数 |
范围 |
默认值 |
count |
1 – 20000 |
必需 |
type |
任意实体 ID,例如 minecraft:zombie |
minecraft:zombie |
radius |
1 – 256 方块 |
16 |
/valence scene entities 300
/valence scene entities 300 minecraft:zombie
/valence scene entities 300 minecraft:zombie 24
在你周围给定半径的圆环上召唤 count 个实体,高度与你相同。每个实体都位于相同的距离,因此它们的细节级别和剔除状态均相同 —— 唯一的变量是数量。
它们以 NoAI、NoGravity、Silent、Invulnerable 和 PersistenceRequired 属性生成,并带有标签 valence_bench。它们不会走动、掉落、消失、发出声音或死亡。明天运行相同的命令,你会得到相同的场景。
这是唯一触及服务器的命令。 它代表你发送普通的 /summon 命令,因此在单人游戏中需要作弊权限,或在服务器上需要 OP 权限。它以每秒 20 个的速度发送,因此服务器不会因垃圾信息踢出你。只有在提供了 type 时才能提供 radius。
/valence scene clear
运行 kill @e[tag=valence_bench] —— 它移除场景命令放置的所有内容,以及你自己建造的任何东西。
你将获得什么
报告写入 .minecraft/valence-benchmark/:
| 文件 |
说明 |
valence-<timestamp>.html |
完整报告。图表形式,交互式,永久离线可用 |
valence-<timestamp>.txt |
纯文本形式的相同内容,可粘贴到问题或电子表格中 |
valence-<timestamp>.json |
原始数据 |
valence-<timestamp>-golden-start.png / -golden-end.png |
参考帧截图 |
latest.html / latest.txt |
最近一次运行的副本 |
HTML 报告
首先显示关键数据,然后按类别分组详细信息:
摘要 —— 一目了然 条带对一致性、卡顿、GC 压力、分配速率和服务器刻时间来评估等级,每个等级都显示了与之比较的阈值,以便进行审核而非盲目信任。然后是 FPS、1% 最低帧率、0.1% 最低帧率、一致性和世界加载时间,各自拥有独立的趋势线。
帧率 —— 百分位数、卡顿计数、分布情况、随时间变化的 FPS,以及 按生物数量划分的 FPS:本次运行实际测量的负载与帧率关系。
CPU 与 GPU —— 系统和进程负载、GPU 利用率、显存、温度、功耗、时钟频率。
内存 —— 堆内存、非堆内存、进程 RSS、GC 以及渲染线程上的 Java 分配。
世界 —— 块加载时间、吞吐量、持有的块数、客户端生物。
服务器 —— 完整的 integrated-server 视图(见下文)。
参考帧 —— 两张参考截图,以便你可以验证你正在比较的两次运行确实绘制了相同的场景。
配置 —— 机器、GPU、驱动程序、Java 标志、所有视频设置、完整模组列表。
在任意时间图表上拖拽即可缩放,所有十七个图表都会同步到同一时刻 —— 如果在帧率曲线上发现 4:10 处出现下降,可以立即查看在那十五秒内 CPU、GPU、堆内存和区块加载器正在做什么。有一个 Copy summary(复制摘要)按钮可将 Markdown 表格复制到剪贴板,还提供 CSV 导出以及用于生成整洁 PDF 的打印样式表。
测量内容
帧 —— 每一帧的原始帧时间(纳秒),从不截断。4 秒的卡顿就是 4 秒的卡顿。中位数、p95、p99、p99.9、最大值、标准差、帧间变化、卡顿次数以及因卡顿损失的时间。
实体数量(每帧) —— 客户端实体计数会在 每一帧记录,并与该帧的帧时间并列显示。脱离测量时的实体数量来谈帧率是无法与其他数据比较的。
世界加载时间 —— 从进入世界到区块计数器停止移动为止。这是 Minecraft 基准测试能产生的最具可比性的便携指标,因为它不需要了解渲染器:ClientChunkManager 是原版的,无论在其之上安装什么模组。
区块 —— 解码和应用每个接收到的区块的时间、吞吐量、随时间推移持有的区块数。
集成服务器 —— 每个刻(tick)的实际持续时间:最小值、p1、中位数、p95、p99、p99.9、最大值、标准差、完整分布、超过 20/33/50 ms 的刻数、平均刻占用的 50 ms 刻预算比例,以及超出预算的总时间。加载的区块和实体的总数 以及按维度统计。TPS 是 实际观察到的刻数 ÷ 经过的时间 —— 而不是 1000 ÷ MSPT,后者无法察觉被完全跳过的刻。两者并排显示。
机器 —— CPU 负载(系统和 Minecraft 的份额)、GPU 负载、显存(VRAM)、温度、功耗、时钟频率、堆内存、非堆内存、进程 RSS、系统内存、线程数、GC(垃圾回收)。
渲染线程上的 Java 分配 —— 按线程采样并区分为 MB/s。决定配置是否会在 GC 时产生卡顿的是这个速率,而非堆大小。
实际保留的堆内存 —— 在强制收集后、窗口关闭时测量。堆曲线显示分配压力;这一个数字显示真实的占用空间。
解读数据
FPS = 帧数 ÷ 经过的时间。 绝不是瞬时帧率的平均值 —— 那样会给予快帧更高的权重,报告出一个没人实际体验过的数值。该规则同样适用于每一秒和每一个实体桶内。
关于 “1% low” 有两种定义,它们并不一致:
|
|
| 1% low |
最慢的 1% 帧中的 帧数 ÷ 经过时间 |
| P1 |
1000 ÷ 第 99 百分位的帧时间 |
前者对大幅下降更敏感,后者更稳定。报告中两者均有提供。请对比不同运行之间的同一行数据。
一致性 为 1% low ÷ FPS。达到 100% 表示游戏表现完美均匀;低于 60% 则即使平均值看起来不错也能感受到卡顿。
只有在下述条件相同的运行之间才具有可比性:相同的世界、相同的路线或场景、相同的设置、相同的模组、相同的实体数量。报告记录了所有这些内容 —— 并且通过黄金帧你可以用肉眼进行核对。
要求
- Minecraft 1.19 - 1.21.1
- Fabric Loader 0.16 或更高版本
- Fabric API
- Java 21(1.21.1 已要求)或 Java 17
仅限客户端。支持单人模式和服务器;在单人模式中,由于集成服务器在同一进程中运行,服务器指标也会填充。
GPU 负载需要在 PATH 中存在 nvidia-smi(NVIDIA 驱动默认自带),或者在 Linux 上使用 AMD 显卡时,需要 amdgpu 驱动已暴露的 gpu_busy_percent 计数器。如果没有其中任何一个,其他功能仍然正常工作,GPU 负载将显示为 n/a。
配置
.minecraft/config/valence-benchmark.json,首次启动时创建。默认值即是你想要的;以下是值得了解的选项:
| Key |
Default |
Effect |
durationSeconds |
600 |
测量窗口的长度 |
warmupSeconds |
5 |
计时开始前的静默期 |
frameBufferMaxFps |
1500 |
调整帧缓冲区大小 —— 如果你运行在 1500 fps 以上,请提高此值 |
gpuProbe |
"auto" |
auto, nvidia-smi, sysfs, off |
cpuTemperature |
"auto" |
除 Windows 外的所有平台均适用,因为 WMI 查询需要管理员权限且通常会失败 |
goldenScreenshots |
true |
捕获窗口前后的截图 |
progressMessages |
false |
每分钟一条进度消息 —— 关闭是因为聊天消息会产生文本布局开销 |
autoOpenReport |
false |
运行结束后在浏览器中打开报告 |
?️ 推荐服务器托管
⚡ 需要 Minecraft 服务器吗?

正在为您的 Minecraft 服务器寻找高性能、可靠且低延迟的主机?我亲自推荐 Anda Cloud!无论是运行重型技术整合包还是自定义多人服务器,Anda Cloud 都能提供顶级硬件,确保您的游戏流畅运行,避免 TPS 下降。
? 在此使用 Anda Cloud 托管您的服务器!
致谢
Valence Benchmark by ceketrumdev。MIT 许可证。
Valence Benchmark
A benchmark for Minecraft that costs nothing to run.
Minecraft 1.21.1 · Fabric · client-side only · by ceketrumdev
Most in-game benchmarks change the thing they measure. They draw an overlay, they log to
disk, they allocate on the render thread, and the stutter they report is partly their own.
Valence Benchmark records a 10 minute window in which it does none of that. One
System.nanoTime(), two compares and two array writes per frame, into buffers allocated
before the clock starts. No overlay, no logging, no garbage collection, no screenshots while
the window is open. Then, once the clock has stopped, it writes a full report.
It does not ask you to take that on faith. The report prints the mod's own cost — in
nanoseconds and in bytes allocated, per frame — measured on the render thread at the start of
every single run. The allocation figure should read 0.00.
Quick start
1. Join a world and stand still for a few seconds
2. /valence bench start
3. Play normally for 10 minutes
4. Click the report link in chat
That is the whole workflow. The run ends on its own; you never have to stop it.
Commands
Everything lives under /valence. All commands are client-side — they are handled by
your game and never reach a server — with one exception noted below.
| Command |
Arguments |
What it does |
/valence bench start |
— |
Warms up, then measures for 10 minutes |
/valence bench stop |
— |
Cancels the warm-up, or ends a running measurement early |
/valence bench status |
— |
Current state, progress, link to the last report |
/valence bench open |
— |
Clickable link to the last report |
/valence bench |
— |
Same as status |
/valence world |
— |
Last world load time measured |
/valence scene entities |
<count> [type] [radius] |
Builds a reproducible entity scene |
/valence scene clear |
— |
Removes the scene |
/valence bench start
Prints a short countdown, then opens the measurement window. During warm-up the mod allocates
its buffers, starts the hardware probes, takes a reference screenshot and forces a garbage
collection, so the window itself starts from a clean heap.
Refuses to start if you are not in a world (the chunk and entity metrics need one), if a run
is already going, or if a scene is still being built.
Once the window is open, nothing is drawn or logged until it closes. Play normally.
/valence bench stop
During warm-up, cancels. During a run, ends it early and still writes a report — clearly
marked partial, because a 3 minute run and a 10 minute run are not comparable.
/valence bench status
Idle: the last world load time and a link to the last report.
Running: elapsed, remaining, frames recorded so far, chunks received so far.
/valence world
The last world load time on its own. This measurement runs continuously, independently of any
benchmark — join a world, stand still, and the mod times it without being asked.
/valence scene entities <count> [type] [radius]
| Argument |
Range |
Default |
count |
1 – 20000 |
required |
type |
any entity id, e.g. minecraft:zombie |
minecraft:zombie |
radius |
1 – 256 blocks |
16 |
/valence scene entities 300
/valence scene entities 300 minecraft:zombie
/valence scene entities 300 minecraft:zombie 24
Summons count entities on a ring of the given radius around you, at your own Y level. Every
entity is at the same distance, so every one of them is at the same level of detail and
the same cull state — the only variable left is how many there are.
They spawn with NoAI, NoGravity, Silent, Invulnerable and PersistenceRequired, and
carry the tag valence_bench. Nothing walks off, falls, despawns, makes noise or dies. Run
the same command tomorrow and you get the same scene.
This is the one command that touches the server. It sends ordinary /summon commands on
your behalf, so it needs cheats in singleplayer or op on a server. They are sent 20 per tick
so a server does not kick you for spam. radius can only be given if type is given too.
/valence scene clear
Runs kill @e[tag=valence_bench] — it removes exactly what the scene command placed, and
nothing you built.
What you get
Reports are written to .minecraft/valence-benchmark/:
| File |
What it is |
valence-<timestamp>.html |
The full report. Charts, interactive, works offline forever |
valence-<timestamp>.txt |
The same content as plain text, pasteable into an issue or a spreadsheet |
valence-<timestamp>.json |
The raw data |
valence-<timestamp>-golden-start.png / -golden-end.png |
Reference frames |
latest.html / latest.txt |
A copy of the most recent run |
The HTML report
Headline figures first, then the details grouped by category:
Summary — an At a glance strip grading consistency, stutter, GC pressure, allocation
rate and server tick time, each shown with the threshold it was compared against so the grade
can be audited rather than trusted. Then FPS, 1% low, 0.1% low, consistency and world load
time, each with its own trend line.
Framerate — percentiles, stutter counts, the distribution, FPS over time, and FPS by
entity count: the load-to-framerate relation actually measured on this run.
CPU & GPU — system and process load, GPU utilisation, VRAM, temperatures, power, clock.
Memory — heap, off-heap, process RSS, GC, and Java allocation on the render thread.
World — chunk load times, throughput, chunks held, client entities.
Server — the full integrated-server picture (see below).
Golden frames — the two reference screenshots, so you can verify that two runs you are
comparing were actually drawing the same scene.
Configuration — machine, GPU, driver, Java flags, every video setting, the full mod list.
Drag across any time chart to zoom, and all seventeen of them follow to the same instant —
spot a drop at 4:10 on the framerate curve and immediately see what the CPU, the GPU, the heap
and the chunk loader were doing during those fifteen seconds. There is a Copy summary button
that puts a markdown table on your clipboard, a CSV export, and a print stylesheet for a clean
PDF.
What is measured
Frames — the raw frametime of every frame, in nanoseconds, never clamped. A 4 second
hitch stays a 4 second hitch. Median, p95, p99, p99.9, max, standard deviation, frame-to-frame
variation, stutter count and time lost to stutter.
Entities, per frame — the client entity count is recorded on every frame, next to its
frametime. A framerate without the entity count it was measured at is not comparable to
anything.
World load time — from arriving in the world until the chunk counter stops moving. This is
the most portable comparable number a Minecraft benchmark can produce, because it needs to
know nothing about the renderer: ClientChunkManager is vanilla whatever you install on top
of it.
Chunks — decode and apply time for every chunk received, throughput, chunks held over time.
Integrated server — the real duration of every tick: min, p1, median, p95, p99, p99.9,
max, standard deviation, a full distribution, ticks over 20/33/50 ms, how much of the 50 ms
tick budget the average tick uses, and the total time spent past it. Loaded chunks and
entities in total and per dimension. TPS is ticks actually observed ÷ elapsed time — not
1000 ÷ MSPT, which cannot see a tick that was skipped outright. Both are shown, side by side.
Machine — CPU load (system and Minecraft's share), GPU load, VRAM, temperatures, power,
clocks, heap, off-heap, process RSS, system memory, threads, GC.
Java allocation on the render thread — sampled per thread and differentiated into MB/s.
This rate, not the heap size, is what decides whether a configuration will stutter on GC.
Heap actually retained — measured after a forced collection, once the window has closed.
The heap curve shows allocation pressure; this one number shows the real footprint.
Reading the numbers
FPS is frames ÷ elapsed time. Never a mean of instantaneous framerates — that weights fast
frames more heavily and reports a number nobody experienced. The same rule holds inside every
second and every entity bucket.
Two definitions of "1% low" circulate and they do not agree:
|
|
| 1% low |
frames ÷ elapsed over the slowest 1% of frames |
| P1 |
1000 ÷ the 99th percentile frametime |
The first is more sensitive to big drops, the second is more stable. Both are in the report.
Compare the same row between runs.
Consistency is 1% low ÷ FPS. At 100% the game is perfectly even; below 60% the stutter
is felt even when the average looks flattering.
A run is only comparable to a run made under the same conditions: same world, same route or
scene, same settings, same mods, same entity count. The report records all of it — and the
golden frames let you check with your own eyes.
Requirements
- Minecraft 1.19 - 1.21.1
- Fabric Loader 0.16 or newer
- Fabric API
- Java 21 (already required by 1.21.1) or Java 17
Client-side only. Works in singleplayer and on servers; the server metrics are filled in for
singleplayer, where the integrated server runs in the same process.
GPU load needs nvidia-smi on the PATH (default with the NVIDIA drivers) or, on Linux with
an AMD card, the gpu_busy_percent counter the amdgpu driver already exposes. Without
either, everything else still works and GPU load reads n/a.
Configuration
.minecraft/config/valence-benchmark.json, created on first launch. The defaults are what
you want; the ones worth knowing:
| Key |
Default |
Effect |
durationSeconds |
600 |
Length of the measurement window |
warmupSeconds |
5 |
Quiet period before the clock starts |
frameBufferMaxFps |
1500 |
Sizes the frame buffer — raise it if you run above 1500 fps |
gpuProbe |
"auto" |
auto, nvidia-smi, sysfs, off |
cpuTemperature |
"auto" |
On everywhere except Windows, where the WMI query needs admin and usually fails |
goldenScreenshots |
true |
Capture before and after the window |
progressMessages |
false |
A progress line each minute — off, because a chat message costs a text layout |
autoOpenReport |
false |
Open the report in your browser when the run ends |
?️ Recommended Server Hosting
⚡ Need a Minecraft Server?

Looking for high-performance, reliable, and low-latency hosting for your Minecraft server? I personally recommend Anda Cloud! Whether you are running a heavy technical modpack or a custom multiplayer server, Anda Cloud provides top-tier hardware to keep your game running smoothly without TPS drops.
? Host your server with Anda Cloud here!
Credits
Valence Benchmark by ceketrumdev. MIT licence.
评论 0
登录后参与评分
还没有评论,来抢沙发吧