Change Server tickrate when empty

Hello,

I try to reduce Server cpu cost by lowering the tickrate, if no player is logged in. So far I know the config setting:

[/Script/OnlineSubsystemUtils.IpNetDriver]
 NetServerMaxTickRate=30.0

[/Script/Engine.Engine]
SmoothedFrameRateRange=(LowerBound=(Type=Inclusive,Value=30.000000),
                              UpperBound=(Type=Exclusive,Value=60.000000))

I don’t know how to change them at runtime. Any help would be much appreciated.

were u able to found a solution?

Not directly. I use a method to reduce server performance as much as possible. I make sure to inactivate all things on the server that cost on tick (collision, physics, movement, skeletal mesh updates,…) that are not replicated to any client at the moment. I use a simple Observer, that registers the player controller with the actor on client begin play which activates the actor. On Clients EndPlay I unregister the controller with the actor. In Case the actor is not watched by any controller it deactivates the costly stuff. If everything is handled like that the server will tick at your max tick rate and not use 100% CPU, which was my goal.