AltraMayor / AltraMayor/gatekeeper

Upgrade to LuaJIT 2.1

オープン
#637 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
C
スター
1.6k
フォーク
252
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。