跳转到主要内容
DOTA2 驿站
返回资讯中心
Reddit · r/DotA22026.09.15 22:12

通过主机文件阻止www.dota2.com让我在《Dota 2》中获得了显著的FPS提升

Blocking www.dota2.com through the hosts file gave me a significant FPS boost in Dota 2

u/XtisWorld前往讨论 ↗

中文翻译

我发现了一些奇怪的事情。将这一行添加到Windows hosts文件中:

0.0.0.0 dota2.com

显著提高了我在Dota 2中的FPS。在某些情况下,它非常接近320 FPS,这是我显示器的刷新率。

我的系统:Ryzen 7700, RX 9070 XT, 32 GB DDR5

在发现这一点之前,我比较了低分辨率和高分辨率图像设置,发现FPS的差异很小。屏蔽www.dota2.com的效果要大得多。

我还用Wireshark捕捉了几次Dota游戏。客户端定期连接到www.dota2.com。它还使用了cdn.dota2.com,该网站提供像Dota React视频和其他UI内容之类的服务。

我从以下方面获得了类似的性能提升:

map_enable_porttrait_worlds 0在启动参数

但这对我来说并不是一个永久的解决方案,因为它破坏了《黑暗嘉年华》和其他一些依赖于背景世界的UI元素。

正常的比赛对我来说仍然正常工作,www.dota2.com被封锁了。

不过,也有一些明显的潜在缺点。阻塞域可能会阻止Dota加载:

-新闻和部分主菜单;

补丁说明;

——视频;

一些仪表板/数据内容。

未来的Dota更新也可能改变这个域的用途。

要测试它,在hosts文件中添加这行代码,运行:

ipconfig / flushdns

如果没有hosts条目,我的FPS就会在每场比赛中逐渐降低。第一款游戏以300-310帧/秒开始,15分钟后下降到200-220帧/秒,最后以185-190帧/秒结束。

下一款游戏一开始的速度是200-210帧,到最后可能会降至160帧左右。另一场比赛可能只以~180 FPS开始。如果我在不重启客户端的情况下继续游戏,它最终会以大约100-120 FPS的速度下降。

添加hosts文件条目后,行为发生了显著变化。我连续玩了三场比赛,这种渐进式退化基本上消失了:即使在第三场比赛之后,平均FPS仍然在300左右。

这使得它看起来更像是在客户端内部积累的某种后台工作负载,而不是普通的恒定CPU/GPU瓶颈

我很想看看其他人是否可以复制这个,特别是在cpu绑定的系统上。如果你测试它,请同时发布平均FPS和1%的低。

乌利希期刊指南。

怎么做:

在Windows上,以管理员身份打开记事本,然后打开C:\Windows\System32\drivers\etc\hosts.如果没有看到文件,请将文件类型过滤器更改为“所有文件”。在文件末尾添加“0.0.0.0 dota2.com”并保存。然后以管理员身份打开命令提示符,运行ipconfig /flushdns,完全关闭Dota 2,然后再次启动它。要撤消更改,只需从hosts文件中删除0.0.0.0 dota2.com行,再次运行ipconfig /flushdns,然后重新启动Dota。

upd2。

我已经在官方Dota 2 GitHub跟踪器中打开了一个适当的bug报告:Issue #35438。如果你正在经历同样的FPS退化,请考虑留下👍反应,如果可能的话,评论你的硬件规格和你的结果与/不阻止dota2.com。越独立的复制品

正文较长,译文只覆盖前 3000 字,完整内容见下方英文原文。

查看英文原文

I found something odd. Adding this line to the Windows hosts file:
0.0.0.0 dota2.com
noticeably increases my FPS in Dota 2. In some scenarios it gets very close to 320 FPS, which is my monitor’s refresh rate.
My system: Ryzen 7 7700, RX 9070 XT, 32 GB DDR5
Before finding this, I compared low and high graphics settings and saw very little difference in FPS. Blocking www.dota2.com made a much bigger difference.
I also captured several Dota sessions with Wireshark. The client regularly connects to www.dota2.com. It also uses cdn.dota2.com, which serves things like Dota React videos and other UI content.

I get a similar performance improvement from:
map_enable_portrait_worlds 0 in launch args

but that isn’t a good permanent solution for me because it breaks Dark Carnival and some other UI elements that rely on background worlds.
Regular matches still work normally for me with www.dota2.com blocked.
There are some obvious potential downsides, though. Blocking the domain may prevent Dota from loading:
- news and parts of the main menu;
- patch notes;
- videos;
some dashboard/data content.
A future Dota update could also change what this domain is used for.
To test it, add the line to your hosts file, run:
ipconfig /flushdns

Without the hosts entry, my FPS progressively degrades from match to match. The first game starts at around 300–310 FPS, drops to roughly 200–220 after about 15 minutes, and ends at around 185–190 FPS.
The next game already starts at around 200–210 FPS and can drop to about 160 by the end. Another match may start at only ~180 FPS. If I keep playing without restarting the client, it eventually bottoms out at roughly 100–120 FPS.
After adding hosts file entry, the behaviour changes significantly. I played three matches in a row and the progressive degradation was basically gone: average FPS was still around 300 even after the third match.
That makes this look more like some kind of background workload accumulating inside the client rather than a normal constant CPU/GPU bottleneck

I’d be interested to see whether anyone else can reproduce this, especially on CPU-bound systems. If you test it, please post both average FPS and 1% lows if possible.

upd.
How to do it:
On Windows, open Notepad as Administrator, then open C:\Windows\System32\drivers\etc\hosts. If you don’t see the file, change the file type filter to “All Files.” Add 0.0.0.0 dota2.com at the end of the file and save it. Then open Command Prompt as Administrator, run ipconfig /flushdns, fully close Dota 2, and launch it again. To undo the change, simply remove the 0.0.0.0 dota2.com line from the hosts file, run ipconfig /flushdns again, and restart Dota.

upd2.
I’ve opened a proper bug report in the official Dota 2 GitHub tracker: Issue #35438. If you’re experiencing the same progressive FPS degradation, please consider leaving a 👍 reaction and, if possible, a comment with your hardware specs and your results with/without blocking dota2.com. The more independent reproductions and data we can gather, the easier it will be to show Valve that this issue is reproducible across different systems.

Reddit 内容版权归原作者所有,中文为机器翻译仅供参考;评论与后续讨论请前往原帖。