Improbable Icon

SpatialOS Forums

World origin and worker load

Hi,

We have been noticing a strange issue with certain entities that are located close to the world origin (0,0,0) (this is also a boundary between 2 workers in a rectangular configuration) where the worker load on the worker that has authority over that spot goes up to 150+ when certain entities are in that spot.

For example, when an NPC wanders into that general area the load goes up to 150+ and if we delete that NPC through the inspector the load goes back to normal. We also have seen this with static objects (construction items) that cause the load to to up above 30 and then go back to normal if we delete that object.

This doesn’t seem to happen for every kind of entity, so I’m thinking it’s something in our code but it’s odd that this only occurs around this area of the world not anywhere else where those same entity types are being used.

Unity and SDK

Hi @mythicalcity-JJ

Does this only occur around the world origin? Or does it occur anywhere else along that worker boundary?

We haven’t seen it happen anywhere along worker boundaries, only around the origin for some reason. We’ve been trying to debug this but still can’t figure out what is causing the load. Is there a way to profile a specific worker in Unity (SDK)? When we try to profile the local deployment (which also shows this load problem) the profiler doesn’t let us select individual workers, just a single “unityworker” that doesn’t seem to have the performance problem.

Hi @mythicalcity-JJ

The Unity GDK supports profiling individual workers but the SDK doesn’t explicitly do so unfortunately.

You could try to attach it to the worker manually in a cloud deployment (you can’t profile workers locally) by port forwarding the TCP port for that worker. You’ll need to build your workers in development mode and without headless in order to do this. We can’t guarantee that this will work, however.

Ok thanks, we’ll try to attach to the cloud worker then.