Jump to content

Inefficient idle state of simulation: locking race condition


einax2
  • Pending

I noticed that when the simulation is paused (no players connected) with pause_when_empty the server is still using a lot of CPU (~20%); I know that this has been covered in forum posts of the previous years, however I went ahead and gave a look to a process syscalls trace log (see attachment).

What I found is a bit disappointing...it is constantly callingĀ clock_gettime and futex! This is indicator of a spinlock or similar...or anyway some inefficient locking going on.

Would it be possible to acknowledge this as a bug (because of the waste of CPU/energy) and perhaps in future fix it?

Thanks


Steps to Reproduce
1. start DST dedicated server 2. attach with 'strace -p ...'



User Feedback


I thought about this a bit further, I think this is happening because your keep the game loop running but not the actual entities' lifecycle.

So if this bug were fixed, you probably would have to not support running any command on the world (not sure if this is currently working or not) while it is paused.

A small price to pay in my opinion in exchange for less strain on the server...

Share this comment


Link to comment
Share on other sites



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

×
  • Create New...