AltraMayor / AltraMayor/gatekeeper
Upgrade to LuaJIT 2.1
- Lenguaje dominante
- C
- Estrellas
- 1.6k
- Forks
- 252
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.