AltraMayor / AltraMayor/gatekeeper
Upgrade to LuaJIT 2.1
- Lingua principale
- C
- Stelle
- 1.6k
- Fork
- 252
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
There are currently three motivations for upgrading LuaJIT from 2.0 to 2.1 in Gatekeeper:
1. [The 1GB memory limit **per process**.](https://stackoverflow.com/questions/35155444/why-is-luajits-memory-limited-to-1-2-gb-on-64-bit-platforms) Let $x$ be the amount of memory that a Lua state in an instance of the GT block consumes; this Lua state is responsible for running the Lua policy. A typical Grantor server has 2 instances of the GT Block. During Lua policy reloads, new Lua states are created in parallel to avoid hiccups while making policy decisions. Thus, $4x$ must be less than 1GiB, which implies that $x < 256MiB$; this is not much. Currently, Lua policies consume less than 1MB because most of its resources are allocated outside of Lua. LuaJIT 2.1 introduces the new garbage collector [GC64](https://blog.openresty.com/en/luajit-gc64-mode/), which lifts this limit to 128TB.
2. [There is no way to catch the "not enough memory" exception](https://www.freelists.org/post/luajit/Catch-PANIC-unprotected-error-in-call-to-Lua-API-not-enough-memory-event,1); also see the page [LuaJIT v2.0 Status](http://luajit.org/status.html). If this exception were catchable, GT instances could run the garbage collector and retry. This problem has been solved in LuaJIT 2.1.
3. Lua memory is not in huge pages or NUMA aware. Once GC64 is available, issue #143 can finally be implemented.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.