News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[New feature] Server does work in the background when paused

Started by jamespetts, January 10, 2021, 07:31:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

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:
server_runs_background_tasks_when_paused = 1
the 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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.