Minetest with LuaJit GC64 mode (%TOPIC_TITLE%gt;2gb mem)

Minetest with LuaJit GC64 mode (>2gb mem)

Postby Fixer » Tue Aug 08, 2017 3:07 pm

LuaJIT 2.1.0-beta3 was recently released, changelog states:
"Apart from various fixes, the major new features are JIT compiler support for x64 in GC64 mode, ARM64 and MIPS64."

In GC64 mode LuaJit can address more than 2Gb of memory, that in theory will prevent most of OOM errors you see in minetest with heavy modpacks, worldedit or other cases. Some people like me were heavily impacted by 2gb memory limit with impossibility to play heavy modpacks (at least on windows).

People are welcome to test the build (by sfan5).

My results so far:
+ Worldedit works on large volumes now, I had no problems editing areas as much as 800x800x100 (65 million nodes) with minetest mem usage up to 4.5 Gb, that was clearly not possible before.
+ Dreambuilder modpack straight fly test for over 1 hr 40 min without any OOMs (without gc64 it is just 5-10 min before OOM).
+ Testing lua code for consuming lots of memory seems to work without crash now:
Code: Select all
a = {}; for i = 1,1500000 do a[i] = table.copy(minetest.registered_nodes); end

Original issue about Lua OOM problems: https://github.com/minetest/minetest/issues/2988
People with lua out of memory errors are welcome to test this, this may be a cure.
Fixer
Member
 
Posts: 891
Joined: Sun Jul 31, 2011 11:23 am
In-game: Fixer

Re: Minetest with LuaJit GC64 mode (>2gb mem)

Postby elettrico » Mon Sep 04, 2017 4:01 pm

In my linux mint machine how can I install the latest LuaJIT? Is there an official PPA? Or better remove the package and compile it from sources? Which version of lua is supported?
elettrico
Member
 
Posts: 22
Joined: Thu Jul 20, 2017 8:00 pm

Re: Minetest with LuaJit GC64 mode (>2gb mem)

Postby elettrico » Wed Sep 06, 2017 2:15 am

Today I've built LuaJIT 2.1.0-beta3 and built minetestserver using it.
When I've tried to do a //sphere 250 air with worldedit (in a emerged area) it crashed with OOM.
When I've tried to do the same but with a 200 blocks radius it crashed with this error:

2017-09-05 23:04:08: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'worldedit_commands' in callback on_chat_message(): std::bad_alloc
2017-09-05 23:04:08: ERROR[Main]: stack traceback:
2017-09-05 23:04:08: ERROR[Main]: [C]: in function 'write_to_map'
2017-09-05 23:04:08: ERROR[Main]: ...r/.minetest/mods/Minetest-WorldEdit/worldedit/common.lua:111: in function 'finish'
2017-09-05 23:04:08: ERROR[Main]: ...inetest/mods/Minetest-WorldEdit/worldedit/primitives.lua:41: in function 'sphere'
2017-09-05 23:04:08: ERROR[Main]: ...test/mods/Minetest-WorldEdit/worldedit_commands/init.lua:492: in function 'callback'
2017-09-05 23:04:08: ERROR[Main]: ...test/mods/Minetest-WorldEdit/worldedit_commands/safe.lua:48: in function 'func'
2017-09-05 23:04:08: ERROR[Main]: ...est-install/share/minetest/builtin/game/chatcommands.lua:30: in function <...est-install/share/minetest/builtin/game/chatcommands.lua:9>
2017-09-05 23:04:08: ERROR[Main]: ...inetest-install/share/minetest/builtin/game/register.lua:412: in function <...inetest-install/share/minetest/builtin/game/register.lua:392>

leaving map barely untouched (instead of a large sphere there's a 64x64x64 hole)
elettrico
Member
 
Posts: 22
Joined: Thu Jul 20, 2017 8:00 pm

Re: Minetest with LuaJit GC64 mode (>2gb mem)

Postby sfan5 » Wed Sep 06, 2017 11:56 am

Just building 2.1.0-beta3 is not enough, you also need to uncomment this in the Makefile.
So far I've had no luck getting that mode to run without segfaults under stress testing (on Linux).
sfan5
Moderator
 
Posts: 3791
Joined: Wed Aug 24, 2011 9:44 am
GitHub: sfan5

Re: Minetest with LuaJit GC64 mode (>2gb mem)

Postby Festus1965 » Wed Mar 20, 2019 2:50 pm

Where to load it ... as also rubenwardy suggested it

this
Code: Select all
#XCFLAGS+= -DLUAJIT_ENABLE_GC64
I searched in my config (linux/ubuntu - yes:2.1.0-beta3- ... compile) I didn't find in the make file off that folder luajit-210-beta3

but I used it for compiling, and server is anyway running in LuaLit again, after moreblocks and etherreal off / false.
Festus1965
Member
 
Posts: 956
Joined: Sun Jan 03, 2016 11:58 am
GitHub: Minetest-One
In-game: Thomas Explorer



Return to General Discussion



Who is online

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