News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Could Bridgewater-Brunel only use one thread for building?

Started by Matthew, November 25, 2020, 05:18:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Matthew

I have just tried to join the Bridgewater-Brunel game and the server have been stuck loading its save for some time. This is almost certainly because it's busy building the nightly.

Looking at the nightly.sh script, the nightly build is set to use three threads (make -j3).

Would it perhaps be sensible to set it to one thread instead, so that the multiplayer server can have as much CPU time and memory bandwidth as possible? The build is an automated process, so no-one is waiting around for it to complete. And it finishes around 0515 (except for the .deb, for some odd reason), so even if the build time was tripled, it would still be finished in time for the restart at 0600.

Your multiplayer works night and day like a champ, but it's unkind to ask it to fight the lag with one hand tied behind its back!  ;)
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

freddyhayward

Maybe the server should shutdown before the build and wait until the build finishes to restart. Then it would at least appear as offline for that time instead of appearing to be online but not being playable. I doubt it would be playable even with a single build thread.

Mariculous

I totally agree with Freddy.
In addition, using all available ressources on the build will speed it up.
So in the end the player will get a clear response and the effective downtime should be shorter.

Vladki

Better would be to put "nice -19 " before "make -j3" to make the make process lowest priority, so it will compile only if there are any free CPU cycles left, but will use 3 cores if available.
Or just run the whole script with "nice"

freddyhayward

Quote from: Vladki on November 25, 2020, 04:44:53 PM
Better would be to put "nice -19 " before "make -j3" to make the make process lowest priority, so it will compile only if there are any free CPU cycles left, but will use 3 cores if available.
Or just run the whole script with "nice"
Even at minimal CPU usage, memory would still probably have a significant impact on gameplay.

Mariculous

I don't think nice is a good option here as the server already runs out of memory anyways.

Vladki

Quote from: Freahk on November 25, 2020, 10:49:30 PMI don't think nice is a good option here as the server already runs out of memory anyways.
I tried compiling simutrans-extended, at my home computer (linux), and memory is not the problem. "make -j3" required at most half GB extra. Usually just 200 MB. But if the server is already struggling with memory, then using "nice" and single thread compilation is the way to go. Single thread compilation was fine with just 100 MB of RAM

jamespetts

I would suggest that server performance issues relating to loading/saving await the implementation of zstd, which Ranran has recently managed to integrate. I still need to test this and set up the libraries for it, but tests last year showed a significant improvement.
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.

prissi

Why not using the builds from github. That would bring zero load to the server.

jamespetts

Quote from: prissi on November 26, 2020, 02:09:12 PM
Why not using the builds from github. That would bring zero load to the server.

This is an interesting idea. These builds are quite new and not something that I have looked into in detail so far. I am not sure whether this works correctly for all platforms at present.
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.