Open Popyllol opened 1 year ago
Hi,
You have unfortunately removed the part of our template that ask which version you use, if you compiled it yourself or installed from a package repository, and which repository in that case. So I'm going to have to guess that your recursor is compiled against LuaJIT
, and thus is not compatible with the bytecode obtained from luac
. In my experience LuaJIT
just-in-time compilation yields better performance than using pre-compiled code with Lua
, but YMMV.
cannot load incompatible bytecode
FWIW, this appears to be the LuaJIT error when attempting to load PUC-Rio Lua 5.x bytecode
Should we remove the luac
note from the docs? Or at least add some more explanation/warning to it? I also wonder if it's really worth any speedup (but the syntax check is nice, of course)
Given that e.g. on Debian it's possible to have five different Lua implementations installed at the same time, and LuaJIT doesn't have luac
, IIRC you do luajit -b raw
instead, plus having to know which Lua variant pdns is using ... writing clear instructions might be a challenge.
luajit worked for me on Ubuntu. Thanks a lot. A little more documentation about compiling lua and how big the benefit might be or not would be nice. It looks like the benefit in our case is very little as we just blow up the log with some more informations. Greetings, Lars
Short description
Hi PowerDNS-Team, When I just do a:
luac -o lua-script.compiled lua-script
to compile it (btw. without any errors). After starting the recursor again I just can see:Failed to load 'lua' script from 'etc/powerdns/lua-script.compiled': chunk: cannot load incompatible bytecode
I tried luac5.4 and luac5.3. The uncompiled lua script runs without problems.So I searched the docs and found nothing except:
Some mor details on compiling would be nice. Thank you, Lars
Usecase
Getting more performance while running the recursor in a high load environment.
Description