ngx.re.match and PCRE JIT

199 views
Skip to first unread message

Hadi Rezaee

unread,
May 10, 2019, 4:22:43 PM5/10/19
to openresty-en
Hello there,

Well, I've used openresty/nginx in an recent deployment and I have called "ngx.re.match" with regex in several places.
For more optimization, I set "jo" in 'options' parameter. I can tell the installed PCRE is already 8.40+ , however i'm not sure which 'config options' has been used for installed PCRE package so i cannot tell for sure if it is built with "--enable-jit".

In other hand, after using "jo" in options parameter, the nginx server and the configurations looks fine and running good.
So, I was wondering how can i be sure if openresty could make the best use of PCRE JIT or not .

Thanks.

Robert Paprocki

unread,
May 10, 2019, 4:25:13 PM5/10/19
to openre...@googlegroups.com
Hi,

If the PCRE linked to Nginx hasn't been compiled with JIT, the 'j' option will be silently ignored. The 'o' option will still be used, as it doesn't require PCRE JIT (it's a Lua-land optimization).

Have a read of https://www.cryptobells.com/building-openresty-with-pcre-jit/ that details building and verifying PCRE JIT functionality with OpenResty.

--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openresty-en...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openresty-en/c5b5b8e3-67d8-44b6-a954-5a5ccd0bf218%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hadi Rezaee

unread,
May 11, 2019, 4:19:48 PM5/11/19
to openresty-en
Thanks alot for reply and the link :)


On Friday, May 10, 2019 at 10:55:13 PM UTC+2:30, rpaprocki wrote:
Hi,

If the PCRE linked to Nginx hasn't been compiled with JIT, the 'j' option will be silently ignored. The 'o' option will still be used, as it doesn't require PCRE JIT (it's a Lua-land optimization).

Have a read of https://www.cryptobells.com/building-openresty-with-pcre-jit/ that details building and verifying PCRE JIT functionality with OpenResty.

On Fri, May 10, 2019 at 1:22 PM Hadi Rezaee <rezae...@gmail.com> wrote:
Hello there,

Well, I've used openresty/nginx in an recent deployment and I have called "ngx.re.match" with regex in several places.
For more optimization, I set "jo" in 'options' parameter. I can tell the installed PCRE is already 8.40+ , however i'm not sure which 'config options' has been used for installed PCRE package so i cannot tell for sure if it is built with "--enable-jit".

In other hand, after using "jo" in options parameter, the nginx server and the configurations looks fine and running good.
So, I was wondering how can i be sure if openresty could make the best use of PCRE JIT or not .

Thanks.

--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openre...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages