# 开启streaming，加载资源时STAT\_AsyncFileMemory持续上升，完成后，静止不动依旧不会下降 

**URL:** <https://forums.unrealengine.com/t/streaming-stat-asyncfilememory/2552563>\
**Category:** Mobile\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [April 16, 2025, 8:22am UTC](https://forums.unrealengine.com/t/streaming-stat-asyncfilememory/2552563 "2025-04-16T08:22:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 16, 2025, 8:22am UTC](https://forums.unrealengine.com/t/streaming-stat-asyncfilememory/2552563/1 "2025-04-16T08:22:17Z")

</div>

我们项目在2G内存的手机（Android&iOS）上 开车移动或触发levelsequence有大量资源的加载，容易发生崩溃。

经分析后，在开启streaming的时候，STAT\_AsyncFileMemory 会增长的比较厉害，且不会下降。很容易涨到200多M。

另外我们测试STAT\_AsyncFileMemory 涨上去之后，静止一段时间，没有资源加载之后，它的内存仍然不会下降。

请问下这种情况是bug吗？应该如何解决呢？

\<br/\>

另外，我在网上找了一些帖子，比如 刘炜 回复的 [Content removed]

找了一些开关并进行测试。测试结果如下

`pakcache.Enable pakcache.UseNewTrim pakcache.MaxBlockMemory pakcache.TimeToTrim pakcache.EnableNoCaching`测试1

pakcache.Enable = false。能降低pakcachehighwater的内存，无法降低STAT\_AsyncFileMemory 的内存。仍然会崩溃。

测试2

pakcache.MaxBlockMemory=20 && pakcache.TimeToTrim = 1.5 对STAT\_AsyncFileMemory 没有优化作用

测试3

pakcache.UseNewTrim=1 && pakcache.EnableNoCaching=1 && pakcache.MaxBlockMemory=20 && pakcache.TimeToTrim = 1.5 对STAT\_AsyncFileMemory 没有明显优化作用。

测试4 关闭streaming

r.streamingtexture 0 && r.streaming.poosize 20 && r.streaming.poolsizeformeshes 20

STAT\_AsyncFileMemory 降低至个位数，但是StaticMesh、Texture显著增加。

\<br/\>

\<br/\>

---

<div class="post-metadata">

**Author:** ![Liu.Wei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Liu.Wei](https://forums.unrealengine.com/u/Liu.Wei)\
**Post date:** [April 19, 2025, 8:44am UTC](https://forums.unrealengine.com/t/streaming-stat-asyncfilememory/2552563/2 "2025-04-19T08:44:30Z")

</div>

Hi,

我个人觉得这不是bug，只是内存持续在加载，PackageCache会有些内存的cache，但应该不是大头，通常要释放内存，需要先gc，释放掉没有引用的Object，以及FMemory::Trim，释放掉allocator里的缓存。

另外可以开启Texture的LRU以及PSO的LRU，这样可以相对控制内存占用。

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 19, 2025, 9:26am UTC](https://forums.unrealengine.com/t/streaming-stat-asyncfilememory/2552563/3 "2025-04-19T09:26:29Z")

</div>

好的，感谢答复，我现在发现在挂机状态 **STAT\_AsyncFileMemory和 STAT\_SkeletalMeshVertexMemory持续上涨到几百M崩溃。我不确定上面的表现跟这个异常现象有没有关系。**

**我先解决完挂机持续上涨的问题，再回头按您说思路继续看按STAT\_AsyncFileMemory内存高的问题。**

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 23, 2025, 6:55am UTC](https://forums.unrealengine.com/t/streaming-stat-asyncfilememory/2552563/4 "2025-04-23T06:55:35Z")

</div>

Hello，SkeletalMeshVertexMemory持续上涨是统计的错误，FSkeletalMeshLODRenderData::IncrementMemoryStats 和 FSkeletalMeshLODRenderData::DecrementMemoryStats中二者统计的到memory是不一致的。

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 23, 2025, 7:05am UTC](https://forums.unrealengine.com/t/streaming-stat-asyncfilememory/2552563/5 "2025-04-23T07:05:46Z")

</div>

**另外，我看了下STAT\_AsyncFileMemory持续上涨的问题，GC后是不下降的。从memreport中看增长的meshobject 、allocator memory、physics memory 很少，无法覆盖STAT\_AsyncFileMemory增长的量。**

**我怀疑STAT\_AsyncFileMemory 也有统计的问题，你们有相关的信息吗？**

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 24, 2025, 6:41am UTC](https://forums.unrealengine.com/t/streaming-stat-asyncfilememory/2552563/6 "2025-04-24T06:41:48Z")

</div>

**STAT\_AsyncFileMemory的内存统计也有问题，正常来说只有几M。 UE5中已经fix了。**

---

<div class="post-metadata">

**Author:** ![Liu.Wei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Liu.Wei](https://forums.unrealengine.com/u/Liu.Wei)\
**Post date:** [May 13, 2025, 8:59am UTC](https://forums.unrealengine.com/t/streaming-stat-asyncfilememory/2552563/7 "2025-05-13T08:59:43Z")

</div>

是的，抱歉回复的很晚。
