Is there any way to decrease time of GC reachability analysis?

Or maybe turn on multithreading for that? Here is our environment:

[2020.03.03-14.14.01:541][762]525369
Objects (Total: 550.295M / Max:
570.108M / Res: 943.941M | ResDedSys: 95.668M / ResShrSys: 0.000M / ResDedVid: 721.755M / ResShrVid:
0.000M / ResUnknown: 126.518M)

[/Script/Engine.GarbageCollectionSettings]
gc.MaxObjectsNotConsideredByGC=10000
gc.SizeOfPermanentObjectPool=6000000
gc.CreateGCClusters=True
gc.NumRetriesBeforeForcingGC=4
gc.MaxObjectsInEditor=46229396
gc.MaxObjectsInGame=16777216
gc.AllowParallelGC=True
gc.IncrementalBeginDestroyEnabled=True
gc.ActorClusteringEnabled=True
gc.BlueprintClusteringEnabled=False
gc.MultithreadedDestructionEnabled=False
gc.UseDisregardForGCOnDedicatedServers=False
1 Like

bumping…

bumping…

Adding

[/Script/Engine.GarbageCollectionSettings]
gc.ActorClusteringEnabled=True

to the bottom of /Game/Config/DefaultEngine.ini

and manually enabling CanBeInCluster on relevant Actors should help

1 Like

do you know what are the side-effects of that? and when and when not to use it?

also using TObjectPtr<> instead of raw pointers helps with reachability afaik.

you can try incremental GC

[ConsoleVariables]
; optimize gc. requires usage of tobjectptr https://youtu.be/d2LWbjSjsv8?t=765
; https://dev.epicgames.com/documentation/en-us/unreal-engine/incremental-garbage-collection-in-unreal-engine
; notice this is still experimental
gc.AllowIncrementalReachability=1
gc.AllowIncrementalGather=1
gc.IncrementalReachabilityTimeLimit=0.002


gc.PerformGCWhileAsyncLoading=1

Try tuning heap size or GC intervals :+1: