Page 1 of 1

Minetest performance in SP/MP

PostPosted: Mon Sep 14, 2015 15:54
by Fixerol
I've got pretty decent PC (Core i3-2120/8GB/ATI R6870/Win7) and I've noticed few things about game choppiness in multiplayer and singleplayer, for example, on a amazingly rich LinuxGaming (0.4.13) or on RedCrab (0.4.4), it is so smooth, no swap-like fps problems (it is a pleasure to walk), but go on a "just test" with a very few mods, and it is choppy as hell near the spawn (fps goes down rapidly and swap-like), even if it is just a big mess of rocks and 20 players. Why? Is it something to do with number of players, or pvp, or jungle trees near spawn? Mods like protectors and vending machines? Since I've moved from Pentium 4 3 years ago to i3 and 0.4.12 while playing singleplayer you got high fps but some choppiness/swapiness when new chunks of map are generated, while on cheap notebook it feels without choppiness, intel videocard and superslow hdd, weird), it feels that this choppiness problem is not cured yet :)

choppiness = swap-like gameplay without actual swap, can be good fps with step-like periodical irregular instantaneous freeze for fractions of a second. MT/mods/whatever needs some optimization, it is strange, megaworlds run fine, but some bare rock + lots of protectors and players grinds pretty good PC to a halt.

Example of swapiness when new chunk is generated on 0.4.13: https://i.imgur.com/mD3kC6M.png

Re: Minetest performance in SP/MP

PostPosted: Mon Sep 14, 2015 20:28
by rubenwardy
A problem with node meta data has recently been discovered, which causes a large loss of fps. A fix has been made. VanessaE's creative spawn area contains a lot of machines. Before the fix was applied, the fps was 5. Afterwards there was an fps of 60 fps.

Node meta data is additional data about a node stored in the world database. It may be used to store a machine's configuration, its state, or its inventory. The problem was that when a single value was changed, the whole mapblock (16x16x16 nodes) was resent. This caused network spam. It also forced the client to recreate the 3d mesh from scratch. The fix means that only individual nodes are resent. This fix isn't yet part of Minetest, it's still a pr. A fix will probably be in 0.4.14 or whatever version is next.

Re: Minetest performance in SP/MP

PostPosted: Mon Sep 14, 2015 20:52
by Ferk
I know we had the 4.13 release just a few weeks ago, but imho it would be a good idea to release early a fix as significant as this.

Re: Minetest performance in SP/MP

PostPosted: Mon Sep 14, 2015 22:46
by Fixerol
rubenwardy wrote:A problem with node meta data has recently been discovered, which causes a large loss of fps. A fix has been made. VanessaE's creative spawn area contains a lot of machines. Before the fix was applied, the fps was 5. Afterwards there was an fps of 60 fps.

Node meta data is additional data about a node stored in the world database. It may be used to store a machine's configuration, its state, or its inventory. The problem was that when a single value was changed, the whole mapblock (16x16x16 nodes) was resent. This caused network spam. It also forced the client to recreate the 3d mesh from scratch. The fix means that only individual nodes are resent. This fix isn't yet part of Minetest, it's still a pr. A fix will probably be in 0.4.14 or whatever version is next.


Wow, nice, this means that both network bandwidth and fps will be improved! Is there any builds present so I can test this fix? That's could be important patch for maikerumine's server, that got plenty of upload speed but was so laggy, I wonder how this will help him and other server owners.
I found a link for disscussion of this issue: https://github.com/minetest/minetest/pull/3166

Re: Minetest performance in SP/MP

PostPosted: Tue Sep 15, 2015 03:58
by Sokomine
Fixerol wrote:choppiness = swap-like gameplay without actual swap, can be good fps with step-like periodical irregular instantaneous freeze for fractions of a second.

If it's a spike now and then, check if you have enable_local_map_saving = true set in your minetest.conf. Saving the map is very helpful (and, on many servers, necessary), but it also causes periodical short lag spikes. At least with a hdd. I didn't encounter those spikes when using an ssd.

Re: Minetest performance in SP/MP

PostPosted: Tue Sep 15, 2015 12:18
by Fixerol
check if you have enable_local_map_saving = true


No, I don't have it.

Re: Minetest performance in SP/MP

PostPosted: Tue Sep 15, 2015 13:31
by rubenwardy
Some users are experiencing fraction of a second freezes every few seconds, this has been reported after the 0.4.13. I don't know if the cause has been found, however. I don't remember reading anything about the cause in IRC. I experience this as well.

Re: Minetest performance in SP/MP

PostPosted: Tue Sep 15, 2015 20:13
by Fixerol
BTW, as an example, "just test" server spawn got little under 100 of chest like objects (chests, vending, depositing), I've got 20 fps while viewing the spawn.