low lua memory issue and a missunderstanding ?

low lua memory issue and a missunderstanding ?

Postby Festus1965 » Wed Mar 20, 2019 11:48 am

hello coders, programmers ... I learned some basic of this with the Commodore64 and sold first program to make inventory at years and faster at neighbour bakery somewhere in 1980 I think, during I was also visiting the first plusclass in programming on my middle school.
But after trainied in C++, Oracle, network and html + learn php in 200-2005, I quit my job and moved in another country ... whatever, and some basics of this old knowledge not changed yet.

* No computer run without memory
* every code, whatever it does uses/consumes memory

so depending on my research in low Lua memory, there is another fact I read
* 64 systems only give Lua/JIT 2 GB of ram,
* what is, depending on the system and code and version of lua and also not started at beginning, so that the we had the issue that OOM errors available memory are from just 14 MB up to my reported 1300 MB.

So for clear, a [Mod] uses memory as it is loaded via its init.lua by set true in world.mt file, and the problem yet was, we had no Idea which mod uses how much (? solved ?), or further which one gains more (unsolved).

So depending on my tick to ask after every loaded [Mod] the used lua mem with collectgarbage() (see thread)
and found out some very hungry mods listed there.

So with this evidence in consumption I made an issues at the 3 main programmers and got an answer.
As I said before, moretrees does not use a significant amount of memory. It's up to the engine to decide what to use and what not to. Hell, the whole Dreambuilder modpack (which includes moretrees) is only 60 MB.
If you're running short on memory, get more.


So take a few facts:
* if I false this mod, mod will not load, mod will not consume memory !
mean, it is the code of the mod, the decision of the programmer, wanted to load data = use memory and responsible for that
-- sure it is my decision if i use this mods, but when it keeps like this, and I wanna use Luajit, then some mods will be out, and after I can proof that it runs then without OOM, sure I will issue an warning for this mods together with LuaJIT using ...

* the engine is just doing what is coded in the mod, the engine does nothing load with out the code, belong to the code, as this is why after loading init.lua more memory of the available lua mem is used.
* yes getting more memory, by jump back to 32bit lua might help = 4 GB, if I am right,
-- sure the other solution is find out optimising Lua memory, getting more mem, or using better start position (waiting for LUA code upgrade)

So your meaning, better facts ... about this story here ...
Festus1965
Member
 
Posts: 747
Joined: Sun Jan 03, 2016 11:58 am
In-game: Thomas Explorer

Re: low lua memory issue and a missunderstanding ?

Postby Linuxdirk » Wed Mar 20, 2019 12:36 pm

Festus1965 wrote:So with this evidence in consumption I made an issues at the 3 main programmers and got an answer.
[...]If you're running short on memory, get more.

The problem with this is, that it does not work like this. It is easily possible to get OOM on all types of machines. I can get OOM on my 4 GB private hosted mini server, on my 8 GB office laptop, or on my 16 GB regular PC. Available system memory is simply irrelevant when using LuaJIT.
Linuxdirk
Member
 
Posts: 1871
Joined: Wed Sep 17, 2014 11:21 am
In-game: Linuxdirk

Re: low lua memory issue and a missunderstanding ?

Postby Festus1965 » Wed Mar 20, 2019 1:20 pm

Linuxdirk wrote:The problem with this is, that it does not work like this. It is easily possible to get OOM on all types of machines. I can get OOM on my 4 GB private hosted mini server, on my 8 GB office laptop, or on my 16 GB regular PC. Available system memory is simply irrelevant when using LuaJIT.


I know that, using a 32 GB server, also 32 GB work PC, but one coder of mod doesn't know that ...
Lua mem is limited, sure - depending on 32 or 64 and so ..., so I have a border with 2 GB and less, depending on other problems I read.

But anyway, as there IS a fixed border IN lua until now, coding mods MUST take care about this, and save as much as possible.

I just banned
* moreblocks (used 11936 KB) ans
* etherreal (used 6928 KB) of my server
and instead of used 72930 KB before, now just 41091 KB are used, so much more time to OOM crash at also 2 mods gone that might consume more during work.
* even think about to ban moretrees (using 9592 KB), it there is no soon rebuild of the code or we get 4 GB lua mem.

As technic with all parts together also is Top ranked (using near ~12000 KB) also nice to get low down it, as used to much on server now, just to cut it out.
Festus1965
Member
 
Posts: 747
Joined: Sun Jan 03, 2016 11:58 am
In-game: Thomas Explorer

Re: low lua memory issue and a missunderstanding ?

Postby Linuxdirk » Wed Mar 20, 2019 1:59 pm

Moretrees feels quite heavy, yes. The technic trinity (Mesecons, Pipeworks, Technic) likely is the heaviest combination of mods possible.
Linuxdirk
Member
 
Posts: 1871
Joined: Wed Sep 17, 2014 11:21 am
In-game: Linuxdirk

Re: low lua memory issue and a missunderstanding ?

Postby rubenwardy » Wed Mar 20, 2019 2:02 pm

To fix LuaJIT ooms:

  • Use a GC64 build of LuaJIT
  • Use puc Lua
  • Find and fix/remove mods which use a lot of memory

Linuxdirk wrote:Moretrees feels quite heavy, yes. The technic trinity (Mesecons, Pipeworks, Technic) likely is the heaviest combination of mods possible.


Exactly this - every time I see OOM I think biomelibs or moretrees.
rubenwardy
Moderator
 
Posts: 5685
Joined: Tue Jun 12, 2012 6:11 pm
GitHub: rubenwardy
In-game: rubenwardy



Return to Modding Discussion



Who is online

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