渲染线程和服务端线程的默认优先级取决于你的 CPU 线程数量,根据 Mojang 的规则,具体是指超过 4 个线程的情况。如果 CPU 拥有超过 4 个线程,则渲染线程优先级为 10,服务端线程优先级为 8。否则,线程优先级为 5,这是 Java 规则下所有线程的默认值。这是一个不好的情况,因为 Java 虚拟机不会优先处理游戏任务,而游戏任务是 Minecraft 进程中开销最大的部分。例如,这可能导致在配置较差的 CPU 上生成世界时出现卡顿峰值。此模组允许你通过编辑配置文件来控制这些值。
提高渲染线程的优先级可以获得更高的 FPS 和帧率稳定性。提高服务端线程的优先级可以获得更稳定的刻率并减少延迟。但这并不意味着你可以将所有设置都设为 10。这取决于具体问题:如果你 TPS(每秒刻数)低,你需要降低渲染和声音引擎线程的优先级,并提高服务端线程的优先级。如果你帧率低且出现卡顿峰值,你需要降低服务端和声音引擎线程的优先级,并提高渲染线程的优先级。此外,还有一些其他后台运行的线程具有不必要的优先级,可能会干扰主要游戏进程。你可以使用“其他所有线程”配置选项来设置这些线程的优先级。如果将其设置为 1,是一个测试性能问题是否由线程优先级引起的良好方法,通常能显著增强弱电脑的性能。
可通过主菜单、暂停屏幕或在游戏中按 F6(默认)访问的配置菜单。

滑块和按钮带有包含有用信息的工具提示。 你可以通过启用“threads”调试条目,在 F3 菜单中查看三个主要线程的当前优先级。
适用于 1.2 之前的版本
要打开配置文件,运行 /threads openconfig 命令。
要应用更改,运行 /threads reload 命令或重新加入世界。
threads.json
{
"renderThreadPriority": 1-10, // 默认为 5,如果 CPU 线程数 > 4 则为 10
"serverThreadPriority": 1-10, // 默认为 5,如果 CPU 线程数 > 4 则为 8
"soundEngineThreadPriority": 1-10, // 默认为 5
"everyOtherThreadPriority": 0-10, // 默认为 0
"threadBlacklist": [],
"debug": false // 如果为 true,则记录有关每个线程操作的日志信息。
}
1.20.1 Forge 版本的旧版配置文件。
配置文件将在世界加载后或在世界打开时更改配置文件后应用。
threads-client.toml
render_thread = Range 1-10. 默认为 5,如果 cpu 线程数 > 4 则为 10。
server_thread = Range 1-10. 默认为 5,如果 cpu 线程数 > 4 则为 8。
sound_engine_thread = Range 1-10. 默认为 5。
默认为 0,表示不执行任何操作。
every_other_thread = Range 0-10。
thread_name_blacklist = ["Thread-3"]
Default priority values for Render and Server threads depends on the amount of CPU threads you have, specifically more than 4 by Mojang rules. If CPU have more than 4 threads then Render Thread have priority of 10 and Server Thread of 8. Otherwise, thread priority is 5, which is default value for every thread by Java rules. This is a bad thing to have, because Java Virtual Machine does not prioritize game tasks, which is most expensive part of Minecraft process. For example, this may cause lag spikes during world generation on bad CPU. This mod allows to take control of those values by editing config file.
Higher priority for Render Thread - higher FPS and frame stability. Higher priority for Server Thread - more stable tick rate with less delays. But that doesn't mean that you can just set everything at 10. It depends on the problem: if you have low TPS you need to lower render and sound engine threads and increase server thread priority. If you have low frames and spikes you need to lower server and sound engine threads and increase render thread. Additionally there some other threads is running in background with unnecessary priority that can interrupt main game. You can use 'Every other thread' config option to set priority for those. If set to 1 is a good test if performance issues is in thread priorities and usually greatly increases performance on weak PC.
Config menu that can be accessed through main menu, pause screen or pressing F6 (by default) while in-game.

Sliders and buttons have tooltips with useful info. You can see current priority of three main threads in the F3 menu by enabling 'threads' debug entry.
For versions before 1.2
To open config file, run /threads openconfig command.
To apply the changes run /threads reload command or rejoin the world.
threads.json
{
"renderThreadPriority": 1-10, // Default 5 or 10 if CPU thread count > 4
"serverThreadPriority": 1-10, // Default 5 or 8 if CPU thread count > 4
"soundEngineThreadPriority": 1-10, // Default 5
"everyOtherThreadPriority": 0-10, // Default 0
"threadBlacklist": [],
"debug": false // If true logs info about actions with each thread.
}
Legacy config for 1.20.1 Forge version.
Configuration will be applied after world is loaded or config file is changed while world is open.
threads-client.toml
render_thread = Range 1-10. Default is 5 or 10 if cpu thread count > 4.
server_thread = Range 1-10. Default is 5 or 8 if cpu thread count > 4.
sound_engine_thread = Range 1-10. Default is 5.
Default is 0, which means do nothing.
every_other_thread = Range 0-10.
thread_name_blacklist = ["Thread-3"]
下载 Threads
下载 Threads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Threads
下载 Threads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Threads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Threads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Threads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Threads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Threads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Threads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
移植到 26.3
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
评论 0
登录后参与评分
还没有评论,来抢沙发吧