The International Simutrans Forum

 

Author Topic: [New feature] Server does work in the background when paused  (Read 101 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20713
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
[New feature] Server does work in the background when paused
« on: January 10, 2021, 07:31:20 PM »
I have been investigating the cause of what appears to be anomalous private car behaviour on the Bridgewater-Brunel server. Although the evidence at this stage is not conclusive, the most likely cause appears to be that private car routes are not refreshing quickly enough.

In the first instance, I have experimented with increasing the number of route tiles processed in a step. My tests showed that increasing this eightfold from 1,024 to 8,192 did not significantly affect performance on the Bridgewater-Brunel server's saved game, so I have altered its simuconf.tab setting to this new value, which should take effect when the server restarts to-morrow morning.
However, this is probably still not enough for larger games, and I note that there have been reports in the past of the large Japanese server game running Pak128.Britain-Ex having problems with its ~600 towns being able to maintain up to date road connexions.

For this reason, I have implemented a new feature, which will be available in to-morrow's nightly build. If the server has the following simuconf.tab setting enabled:
Code: [Select]
server_runs_background_tasks_when_paused = 1the server will run the path explorer and the private car route finder even though the game is paused (providing that no clients be connected). Moreover, because there is no need to remain in sync, the server can run the private car route finder multi-threadedly whereas it cannot whilst clients are connected. Additionally, the number of routes to process per step can be greater when no clients are connected to care about slow performance, so I have set the base value to be multiplied by 4 whenever the server is paused.

I should be grateful for any feedback on the new system, which will be implemented on the Bridgewater-Brunel server from to-morrow's nightly build.