Hi,
I am currently trying to reduce the GameNetDriver load on the server, which is seemingly very high for us. Note I believe the current problem isn’t the amount of data sent but rather then amount of data checked.
- Dormancy works very well for actors, but is there an equivilant for components? We have a lot of components on player characters that are not sending data the vast majority of the time, but still get touched on server despite using Push Model (even with PushModelSkipUndirtiedReplication set). Is it standard practice to turn on/off replication on the fly for these components, or can it be done in PreRep/RepSubObjects? Or do we need to structure the replicated data such that it all lives in the same place on the actor? The important factor here is being able to turn it back on and still replicate (including RPC) in the same frame, as can be done with dormancy.
- Is the current recommendation to use Iris or NetGraph? One is battle tested but being phased out, the other is still experimental (but as I understand it you have been using it internally for some time, and plenty of systems seem to remain experimental for prolonged periods despite being relatively stable).
- Using Insights, approximately the second half of the GameNetDriver shows where it is (that is, I can see which actors and components are being touched for replication), but the first half is empty and presumably doing systems work. I assume this is where it’s doing work like building consider lists and prereplication work, but is there anything we can do on our end to help reduce that work?
Thanks,
Steve
Hi,
To answer your questions:
1) In the legacy method for replicating subobjects (overriding the AActor::ReplicateSubobjects function), you could use RepKeys to track when objects have changed and need to be replicated. If you’re using the Registered Subobjects List (which is required for Iris), it is recommended to use Push Model wherever possible and to set replication conditions on components/subobjects. That being said, we have received reports that projects with a large number of infrequently changing subobjects may currently see better performance when using RepKeys compared to using push model. You can check out these related threads for more info:
[Content removed]
[Content removed]
2) This will ultimately depend on the project and on when you plan on shipping. There’s no guarantee that Iris will always be more performant than the existing replication system/repgraph for a project, especially for lower player counts. It is also worth noting that we do not have any plans to phase out the replication graph at this time, and the existing replication system/repgraph will be available and supported alongside Iris.
3) Utilizing dormancy tends to have the biggest impact on the time spent gathering actors for replication, and it can also help to tune the net cull distance to ensure actors are not being replicated to connections that do not need to know about them. You may also want to reduce the net update frequency for most actors, as the default value (100 Hz) is often much higher than what is needed. Finally, for more control over the process of gathering actors for replication, projects can use the replication graph, or if you’re using Iris, you can set up filters/prioritizers for this.
Thanks,
Alex