LuaJit OOM - how to detect Mods using it - and repair ?

Explorer
Member
 
Posts: 24
Joined: Tue Jan 29, 2019 11:55

LuaJit OOM - how to detect Mods using it - and repair ?

by Explorer » Wed Jan 30, 2019 05:40

original post out of .net forum


So, I put 32 GB of RAM into the MTS Server, but anyway it is useless, as the Server crashes latest up to 24 hours, before the last changed settings of ubuntu can use 80% of the RAM for writing cache ... most I just get up to 7 GB RAM using, and then gone ... All new and useless to put hardware in ... then iI took the 32 GB out, old 16 GB in ... as the server just reaches 7-8 GB of cache, there 16 max is enough.

So to the topic:

How to detect LUAJIT using mods causing OOM crash?
* detect mod (can see at minetest.log)
* detect file with the code (no idea)
* and how to change the code for better (have some first links found)

or how to reduce LUAJIT amount ?
* mod [stop_lj_oom] tested, but lag ... advantage, after found out the setting value, server run longer, and so crash OOM happen then when a huge amount mem wanted ...


To check out weather I need them or not - to get less failure and longer runs of the MTS.

The OOM is not a fresh case, but I want to get rid of !

Links:
* Lua OOM crashes
* Minetest memory error(Lua OOM error not enough memory)
* Minetest with LuaJit GC64 mode (>2gb mem)
* Lua OOM errors
* Remove LuaJIT support?

* [mod] Stop LUAJIT OOM crashes [stop_lj_oom]

I will check the last link more now and learn again ...
edit: stop_lj_oom was running some days until value 1.450.000 but when active, getting about plus 0.8 lag

edit: detected now, mods which (even) crash, (even when garbage collector is running)
* mod 'mcl_dungeons'
* mod worldview
* mod technic_worldgen
** here a possible solution - i just edited my mod "memory optimisation fix is simple"
* mod pipeworks
* mod 'biome_lib' in callback environment_Step()
* mod fire

so there are different things to think about:
* raise LuaJit mem from 1, to 2 or 4 GB
* change mods to use less mem (something with local data = vm:get_data() from here)
* better release of unused mem by the mod itself or so like garbage collector with less lag
 

OldCoder
Administrator
 
Posts: 346
Joined: Mon Oct 01, 2012 14:59

Re: LuaJit OOM - how to detect Mods using it - and repair ?

by OldCoder » Wed Jan 30, 2019 07:29

Final Minetest combined with Bucket Game corrects some LuaJit OOM crashes automatically. Three different approaches are used:

1. First, if you use the Linux build kit to build Minetest, a new LuaJit is used. The new LuaJit has better memory management.

2. Second, if you use Bucket Game, a bit of code has been added to the game loop which reduces OOM crashes whether or not the new LuaJit is used.

3. Third, CoderEdit in Bucket Game, the replacement for WorldEdit, includes restructured code which reduces OOM crashes in another way whether or not the new LuaJit is used.

Slopsbucket has worked up numbers, I think, related to #3 and they'll become part of the official documentation.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 4 guests

cron