Jump to content

Welcome to the Forum!

The best place to exchange builds and ideas! Vote for the best ideas and suggestions here.

Join the Avorion Discord!

Connect with other passionate players and talk about the latest news.
Discord

DLC Avorion Into the Rift Out Now!

Now available on Steam!
Steam

[r7857][beta]Server Load 100% not using all processing power


Dirtyredz
 Share

Recommended Posts

As the title suggest the server i help manage, when it hits 100% or  close to 100%. The server itself will only be around 30-40% cpu usage.

 

-CPU: Intel® Xeon® CPU E3-1230 v6 @ 3.50GHz 8 Cores.

-Server.ini: is set to 8 WorkerThreads and 4 GeneratorThreads

 

In fact the server sits at about 10-20% cpu usage consistently.

As mentioned in one of koons post:https://www.avorion.net/forum/index.php?topic=2355.0

The worker threads will only use up to the number of cores available.

 

Any help or insight is appreciated.

 

 

 

 

Link to comment
Share on other sites

  • Boxelware Team

The thing is, that the server is not measuring its load in actual CPU load. When updating sectors the server has to wait until the slowest sector has finished updating, for technical reasons, which can slow down overall server performance a lot.

 

If you encounter this, please enable profiling in your server.ini and type /status in the chat. It will print a detailed breakdown of what happened and why the server is slow. This would help tremendously.

Link to comment
Share on other sites

Ill take a look at the profiling stats when were experiencing high server load.

 

just to clarify , our server is not experiencing a deficiency in server resources?

essentially the game has a cap performance it can reach and adding server resources to it wont help any?

except for maybe adding more cores.

Link to comment
Share on other sites

  • Boxelware Team

When updating, the game has to wait for all sectors to finish their update tick and when one of them takes exceptionally long (which it shouldn't in the first place, hence my asking for the profiling data) then it can slow down the entire server, yes.

Link to comment
Share on other sites

This was the highest one i could find:

 

[ root: 812.981 ms; 100% ]

  [ virtual void Sector::update(float): 812.978 ms; 100% ]

    [ virtual void Sector::updateDeferred(GameScript&, float): 811.733 ms; 99.8% ]

    [ virtual void Scene::weakUpdateComponents(float): 1.117 ms; 0.1% ]

      [ Deferred components: 0.598 ms; 0.1% ]

        [ TurretAI: 0.445 ms; 0.1% ]

        [ Hangar: 0.002 ms; 0% ]

      [ Turret: 0.093 ms; 0% ]

      [ Weapons: 0.063 ms; 0% ]

      [ ShipAI: 0.025 ms; 0% ]

      [ LocalPositioner: 0.016 ms; 0% ]

    [ virtual void Scene::weakUpdateEntities(float): 0.079 ms; 0% ]

    [ virtual void Sector::updateFactions(float): 0.028 ms; 0% ]

    [ virtual void Scene::weakUpdateShots(): 0.001 ms; 0% ]

 

There was about a dozen greater then 300ms.

 

Some of these will display a specific script  but in this case its not showing a script path, and yet it seems to indicate gamescript is the culprit

 

Link to comment
Share on other sites

  • 3 weeks later...

The update seems to have slightly improved the load on the server but it's still nowhere near utilising the capabilities of the hardware.

I'd value some input on this as we've been trying out a few different servers and it doesn't seem to scale with performance as if there's a giant bottleneck in the engine somewhere.

Link to comment
Share on other sites

  • Boxelware Team

The reply is still the same. Each sector is updated by its own thread - until a synchronization point. If a single thread takes a lot longer than the rest, the other threads will wait for it, and rest idle.

 

I'm not sure what to say here except for: We're working constantly on improving on this behavior, but that's how it works.

Link to comment
Share on other sites

Thank you for your answer altough it doesn't answer our question,

how come the engine doesn't use all the resources available from the hardware?

CPU usage barely goes above 40% and memory hardly above 50%..

We have a super fast m.2 NVMe harddrive so the bottleneck shouldn't be there either.

 

Even when the engine has to wait for the slowest sector to update, why doesn't it use the available resources to speed that process up?

Link to comment
Share on other sites

  • Boxelware Team

Because it's a lot more complex than "just throw more cores at it". Utilizing all cores of a machine to 100% can actually be a very hard problem, that only gets harder the more complex the program gets. Especially in games. Avorion's server performance and core utilization will get better the shorter the update time for a single sector becomes, that's what we're working on right now.

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...