Improbable Icon

SpatialOS Forums

Performance Concerns

I’m currently evaluating SpatialOS for a project and I’ve made a little test with some simple entities.

Each entity has two floats for their position and two floats for their velocity. Only the position changes each frame in this simple test.

I’m using the ECS workflow to see how many moving entities I can simulate on a worker.

Running just the server locally I’m capping out at around 250 entities at 20hz. Does this sound right for only syncing 500 floats? All my cores are maxed and the bulk of the work is coming from reactiveComponentSystem and cleanReactiveComponentSystem and they are both generating a lot of garbage.

I understand this system lets me scale by throwing more hardware at the problem. But I was hopping to at least be able to update more then 500 floats on a machine with zero clients connected.

Is anyone else experiencing similar results?

I ran into the same issues in the editor. It is a lot better built in the client because the editor has a lot of safety checks.

Here’s some of my findings

Building out helps a small amount. I ran it on the cloud as well with not much improvement. I’m going to benchmark non ECS workflow to see if there is any difference in speeds. But as it stands this is too slow.

You should define DISABLE_REACTIVE_COMPONENTS in Unity player settings. This helped a lot for editor performance.

Note that without reactive components, you’ll have to do events as component updates and commands with the CommandSystem. It’s much clearer anyways so I’m not sure why reactive components are on by default…