Time Nick Message 11:25 MTDiscord Hi folks! 11:25 MTDiscord Thank God, I could finally do it! 11:26 MTDiscord Fix a bunch of typos in a bunch of files using git grep and sed commands. 11:29 MTDiscord The diff has 91 files changed and 140 modifications, they're just typos fixings, but one or two of them are typos fixing in functions arguments in cpp files, so is it ok to do all of that in one PR with one commit? 12:16 BuckarooBanzai Krock: s/finite/infinite/g 14:12 MTDiscord 😉 14:13 MTDiscord I did a s/minetest/minecraft/i ... 15:00 srifqi Abdou-31: I think you can just do it in one commit since they are the same (fix typo). 15:02 srifqi ... or split between fix in documentations and fix in codes. 15:22 MTDiscord Ok. Thx a lot! 16:28 Guest12 to call minetest mapgen multithreaded is a bit of a scam 16:28 Guest12 the setting to specify emerge threads should be renamed to placebo_emerge_threads 16:29 Guest12 it's lauaghable 16:29 sfan5 only a bit 16:34 Guest12 i dont understand why its so bad 16:34 Guest12 its clearly bottlenecked somewhere, and anyone can make an educated guess where but the point is that it doesn't need to be bottlenecked anywhere 16:35 Guest12 it can just generate new blocks into memory, and it's going to be very hard to saturate that memory bandwidth with 8-16 threads 16:36 Guest12 unless your not delegating memory to the threads correctly 16:36 sfan5 the mapgen on the C++ side is multithreaded fine 16:36 Guest12 its not multithreaded well at all 16:36 sfan5 let me finish explaining 16:36 MTDiscord Why does it need to be multithreaed at all? 16:36 sfan5 what has happened is that since mods increasingly (and obviously) use Lua to do stuff is that that became the bottleneck 16:36 MTDiscord If it's working, that's the goal 16:36 sfan5 and Lua cannot be multithreaded 16:37 sfan5 so the engine finishes off most of the generation quickly and then waits for Lua to do its stuff, serially 16:37 Guest12 i am aware of the LUA problem but I'm not testing any LUA mapgen code 16:37 sfan5 well which game are you running? 16:37 Guest12 just standard 16:37 Guest12 minetest_game 16:37 sfan5 minetest_game has some Lua mapgen code 16:38 sfan5 or not mapgen but rather for playing some decorations and stuff 16:38 Guest12 those abm and lbm are linked to mapgen? 16:38 sfan5 no 16:38 sfan5 https://github.com/minetest/minetest_game/search?q=register_on_generated it's not that much but there's a few 16:39 sfan5 still it should scale reasonably well 16:39 sfan5 by reasonably I mean maybe not to 10 threads 16:40 Guest12 thanks for enlightening me, maybe I can do something about this 16:40 sfan5 if you find out something don't forget to tell us 16:44 MTDiscord Isn't there any solution to this? 16:45 sfan5 if it's about lua being single-threaded then yes I have plans to work on something 16:49 MTDiscord Sorry, I didn't understand. You mean modifying Lua itself? 16:50 sfan5 no, a solution specific to the Minetest API 16:54 MTDiscord Oh nice 17:25 Guest12 ok so I just ran some pretty interesting test 17:25 Guest12 i deleted everything from minetest_game apart from default, then I disabled trees.lua in init.lua and then removed all tree decorations from mapgen.lua 17:26 Guest12 im running the dummy backend, generating 4096 block distance, 16 threads on 8 cores 16 thread 4800u on sodimm that will have a ~25 GB/s bandwidth 17:26 Guest12 at this point im going to be mostly limited by that 17:27 Guest12 i presume 17:27 Guest12 oh yes and the mapgen im using is FLAT 17:28 rubenwardy the simplest mapgen isn't going to benefit as much from multithreaded workers 17:29 Guest12 but then neither do the complicated ones? 17:29 rubenwardy more complicated ones would require more cpu time 17:29 Guest12 I get more cpu load generating the simple mapgen 17:30 Guest12 it generates faster because there is less to generate 17:30 Guest12 but it peaks higher in that period 17:30 Guest12 i assume because i've taken more load off the LUA 17:31 Guest12 well saying that most of this LUA seems to be configuration for mapgen 17:31 Guest12 registrations and not generations 17:32 Guest12 is there a way I can get this to just generate a flat plane and no caves? 17:33 Guest12 reducing the amount registered to mapgen seems to be helping, I guess there is some performance gain on some reduced size stl:vector behind the scenes 17:33 Guest12 and ofc without the trees its a lot less to generate for most biomes now 17:44 Guest12 hm, I'm thinking of just turning off mapgen completely and using a pre-generated map file 17:45 Guest12 I only really need a single layer generated map, no caves, just an eggshell of biomes 17:47 Guest12 with flat mapgen, super cut down minetest_game, no tree's in mapgen.lua I get about 40% higher peak cpu load when generating and that converts 1:1 with my visual perception of the mapgen loading blocks 17:49 Guest12 but with all the custom mods and things I want ontop I lose that 40%, mapgen becomes pretty crippled, then if I throw v7 onto the mix with tree's I lose another ~40% 17:50 Guest12 even with the slim solution im only using just under 50% of my total combined CPU load 17:50 Guest12 so it really is dreadful with all the stuff I want loaded ontop 18:03 Guest12 To put this into perspective just removing the tree's from mapgen.lua on the flat mapgen made a HUGE difference in terms of performance generating blocks 18:17 definitelya I assume that is because tree distribution happens with perlin noise, so it's cutting that off. 18:19 Guest12 it's only a big deal for me because, well, mapgen easily causes 3 seconds or more server lag for me, on a fairly busy server 18:20 Guest12 so if I can cut out any mapgen, then I cut out any chance of server lag 18:20 Guest12 considering mapgen is my main cause of serverlag 18:21 Guest12 and using pre-generated "egg shell thick" terrains would reduce the growth of my map file a lot 18:21 definitelya Go for it. 19:00 Guest12 generating the map now, final size will be about 7GB 19:01 Guest12 just using some lua register_on_generated() with  /emergeblocks (-30912,0,30927) (0,-1,0) 19:02 Guest12 https://pastebin.com/Cdzdq8E6 19:03 Guest12 im getting a few "Coulden't grab block we just generated:" what's all that about? Anything I should be concerned about? 19:19 calcul0n Guest12, i get some too, it looks like it happens when emerge takes too long but it doesn't affect mapgen 19:20 calcul0n as far as i understand it just means the block is not available in the emerge callback if you need it 19:22 Guest12 awesome ;) 19:22 Guest12 20% complete 19:22 Guest12 1.3 GB 19:55 Guest12 43% 2.7GB loooking goood!!! 20:26 MinetestBot 02[git] 04x2048 -> 03minetest/minetest: Shadow list improvements (#12898) 1388820cd https://github.com/minetest/minetest/commit/88820cd31c2fe21c8c16ee547a3335131e8ba009 (152022-10-26T20:26:09Z)