You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Di Li <di...@apple.com> on 2016/12/08 18:42:13 UTC

luajit vs lua in ATS

Hey Guys,

I’m trying to achieve some logic in ts-lua and  I’m wondering if I should use LuaJIT or just Lua, does anyone hit the LuaJIT 2G memory limitation so far ?

Any suggestion will be appreciated.


Thanks,
Di Li



Re: luajit vs lua in ATS

Posted by Leif Hedstrom <zw...@apache.org>.
> On Dec 8, 2016, at 10:15 PM, James Peach <jp...@apache.org> wrote:
> 
> 
>> On Dec 8, 2016, at 4:07 PM, Reindl Harald <h....@thelounge.net> wrote:
>> 
>> 
>> 
>> Am 09.12.2016 um 01:03 schrieb Shu Kit Chan:
>>> Recently we moved logging and metrics configuration files from XML
>>> format to lua. Thus making luajit a requirement for these changes.
>>> 
>>> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/logging.config.en.html
>>> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/metrics.config.en.html
>> 
>> oh - those both where ATS 7.0 is too stuoid to start if they don't exist and /etc is read-only
>> 
>> FATAL: [RollBack::Rollback] Unable to find configuration file metrics.config. Creation of a placeholder failed : Permission denied
> 
> Yes, we really should remove the rollbacks. I think this is a holdover from the days when Traffic Server was a cache appliance. There’s no UI or reasonable way to use rollbacks these days.


File Jira’s please (unless there are some already).

Cheers,

— leif


Re: luajit vs lua in ATS

Posted by James Peach <jp...@apache.org>.
> On Dec 8, 2016, at 4:07 PM, Reindl Harald <h....@thelounge.net> wrote:
> 
> 
> 
> Am 09.12.2016 um 01:03 schrieb Shu Kit Chan:
>> Recently we moved logging and metrics configuration files from XML
>> format to lua. Thus making luajit a requirement for these changes.
>> 
>> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/logging.config.en.html
>> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/metrics.config.en.html
> 
> oh - those both where ATS 7.0 is too stuoid to start if they don't exist and /etc is read-only
> 
> FATAL: [RollBack::Rollback] Unable to find configuration file metrics.config. Creation of a placeholder failed : Permission denied

Yes, we really should remove the rollbacks. I think this is a holdover from the days when Traffic Server was a cache appliance. There’s no UI or reasonable way to use rollbacks these days.

> it's ridiculous to rely on configs which obviously could be created at start from scratch as well as write configs in scripting languages

Well, I beg to differ on this. I’ve found it quite helpful to be able to parse JSON in logging.config. I don’t expect many people will extend metrics.config, but it was well worth it to remote the XML. In general, we want to make Traffic Server more programmable, so the embedded Lua will not be going away.

> - especially when those scripting languages are part of the bundeled source instead using system libraries

We used to have autoconf checks to build against the system Lua, but removed it in favor of the bundled LuaJIT install. LuaJIT is actually required since on Linux x86_64 it calls C++ destructors across Lua error handlers. I’d be happy to take a patch to optionally build against the system’s LuaJIT.

J

Re: luajit vs lua in ATS

Posted by Reindl Harald <h....@thelounge.net>.

Am 09.12.2016 um 01:03 schrieb Shu Kit Chan:
> Recently we moved logging and metrics configuration files from XML
> format to lua. Thus making luajit a requirement for these changes.
>
> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/logging.config.en.html
> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/metrics.config.en.html

oh - those both where ATS 7.0 is too stuoid to start if they don't exist 
and /etc is read-only

FATAL: [RollBack::Rollback] Unable to find configuration file 
metrics.config. Creation of a placeholder failed : Permission denied

it's ridiculous to rely on configs which obviously could be created at 
start from scratch as well as write configs in scripting languages - 
especially when those scripting languages are part of the bundeled 
source instead using system libraries

> On Thu, Dec 8, 2016 at 3:55 PM, Reindl Harald <h....@thelounge.net> wrote:
>>
>>
>> Am 08.12.2016 um 20:05 schrieb Shu Kit Chan:
>>>
>>> luajit is built-in so ts-lua will run without you doing anything
>>
>>
>> and it's bad that it is built-in with no longer a way to disable it in
>> ./configure - there are setups which don't need any fancy plugins and
>> scripting languages but just a fast reverse-proxy with as little as possible
>> footprint

Re: luajit vs lua in ATS

Posted by Shu Kit Chan <ch...@gmail.com>.
Recently we moved logging and metrics configuration files from XML
format to lua. Thus making luajit a requirement for these changes.

https://docs.trafficserver.apache.org/en/latest/admin-guide/files/logging.config.en.html
https://docs.trafficserver.apache.org/en/latest/admin-guide/files/metrics.config.en.html

Thanks.

On Thu, Dec 8, 2016 at 3:55 PM, Reindl Harald <h....@thelounge.net> wrote:
>
>
> Am 08.12.2016 um 20:05 schrieb Shu Kit Chan:
>>
>> luajit is built-in so ts-lua will run without you doing anything
>
>
> and it's bad that it is built-in with no longer a way to disable it in
> ./configure - there are setups which don't need any fancy plugins and
> scripting languages but just a fast reverse-proxy with as little as possible
> footprint

Re: luajit vs lua in ATS

Posted by Reindl Harald <h....@thelounge.net>.

Am 08.12.2016 um 20:05 schrieb Shu Kit Chan:
> luajit is built-in so ts-lua will run without you doing anything

and it's bad that it is built-in with no longer a way to disable it in 
./configure - there are setups which don't need any fancy plugins and 
scripting languages but just a fast reverse-proxy with as little as 
possible footprint

Re: luajit vs lua in ATS

Posted by Shu Kit Chan <ch...@gmail.com>.
luajit is built-in so ts-lua will run without you doing anything.

For the luaJIT memory limitation, you can check out some discussions
here in jira - https://issues.apache.org/jira/browse/TS-4994

Thanks.

Kit

On Thu, Dec 8, 2016 at 10:42 AM, Di Li <di...@apple.com> wrote:
> Hey Guys,
>
> I’m trying to achieve some logic in ts-lua and  I’m wondering if I should
> use LuaJIT or just Lua, does anyone hit the LuaJIT 2G memory limitation so
> far ?
>
> Any suggestion will be appreciated.
>
>
> Thanks,
> Di Li
>
>