PCG Cache Memory Budget

We have a handful of higen PCG systems and they were using 1+GB and 800MB respectively (looking at memreport PCGPointArrayData), and tracked it down the the graph cache.

The default memory budget is currently set to:

static TAutoConsoleVariable<int32> CVarCacheMemoryBudgetMB(
	TEXT("pcg.Cache.MemoryBudgetMB"),
	6144,
	TEXT("Memory budget for data in cache (MB)."));

Did you really mean 6GB as the default max memory budget? I switched this to 100 and our 800MB system is down to 175MB.

Ernesto.

Steps to Reproduce
Look at memory usage for PCGPointArrayData on memreport after generating a lot of points.

Hey Ernesto,

is this specifically a concern for you in Editor or at Runtime?

We’ve split this cvar into two separate ones for Editor and Runtime in 5.7 (pcg.Cache.Runtime.MemoryBudgetMB and pcg.Cache.Editor.MemoryBudgetMB) with defaults of 128MiB and 6144MiB respectively.

So that number is intentionally fairly high for Editor iteration, but at Runtime we expect a much smaller or disabled cache (some use-cases may not benefit from the cache, so sometimes disabling it is the better choice). We also use very beefy workstations at Epic usually with 128GiB of memory or even more, so if your development hardware has less RAM it might make sense to reduce it, too.

Kind Regards,

Sebastian

Roger, thanks for letting us know!

As long as you don’t see any large performance regression, feel free to keep it disabled in exchange for the memory savings.

Thank you Sebastian. The issue is at runtime. We’re chasing memory savings on console and noticed the very large memory usage.

We’re in 5.6 and we’ve disabled the cache at runtime for now.

Ernesto.