[5.0.0] Important warning about 'num_emerge_threads' setting

[5.0.0] Important warning about 'num_emerge_threads' setting

Postby paramat » Sun Mar 17, 2019 7:16 am

Immediately after releasing 5.0.0 we discovered 2 bugs that can cause crashes if more than 1 emerge thread is used.
One crash is caused when using the 'vein' ore type (luckily this is rarely used in mods). The other bug is an occasional crash when exiting a world.
Details in https://github.com/minetest/minetest/issues/8300

The fixes for these bugs are likely to be complex and take a long time, so for now we have decided to add a warning to the setting and change the default value of the setting to '1'. The warning in documentation is:

Code: Select all
WARNING: Currently there are multiple bugs that may cause crashes when
'num_emerge_threads' is larger than 1. Until this warning is removed it is
strongly recommended this value is set to the default '1'.

These changes will be present in Minetest 5.0.1, a bugfix re-release of 5.0.0 that will be released soon.

There was also a bug in the code that processed the setting. Until now the documentation has read:

Code: Select all
Empty or 0 value:
-    Automatic selection. The number of emerge threads will be
- 'number of processors - 2', with a lower limit of 1.

However due to this bug, automatic selection never happened, empty or 0 value actually resulted in the number of emerge threads being '1'.

Therefore for those using 5.0.0:
If you don't set 'num_emerge_threads' in minetest.conf, or set it to '0', you will avoid the crashes.
If you set it to a value larger than '1' you can consider changing the value to '1'.

A few months ago we discovered that using 1 emerge thread is likely to be the optimum for many users. The old documentation was overly-promising about the benefits of using multiple emerge threads, and had probably encouraged users to use multiple threads even though 1 thread may be better for them.
So being forced to use 1 emerge thread for a while is not as big a problem as it may first seem.
The new documentation reads:

Code: Select all
WARNING: Increasing the number of emerge threads increases engine mapgen
speed, but this may harm game performance by interfering with other
processes, especially in singleplayer and/or when running Lua code in
'on_generated'. For many users the optimum setting may be '1'.
Posts: 3371
Joined: Sun Oct 28, 2012 12:05 am
GitHub: paramat

Re: [5.0.0] Important warning about 'num_emerge_threads' set

Postby Festus1965 » Sun Mar 17, 2019 8:02 am

Code: Select all
num_emerge_threads = 6

since using MTS, never happend some bad. Good luck too others
Posts: 962
Joined: Sun Jan 03, 2016 11:58 am
GitHub: Minetest-One
In-game: Thomas Explorer

Return to News

Who is online

Users browsing this forum: Bing Bot [Bot] and 0 guests