# Ngx\_openresty mainline version 1.4.3.7 released

**URL:** <https://www.ruby-forum.com/t/ngx-openresty-mainline-version-1-4-3-7-released/238065>\
**Category:** NGINX\
**Created:** [December 15, 2013, 1:43am UTC](https://www.ruby-forum.com/t/ngx-openresty-mainline-version-1-4-3-7-released/238065 "2013-12-15T01:43:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [December 15, 2013, 1:43am UTC](https://www.ruby-forum.com/t/ngx-openresty-mainline-version-1-4-3-7-released/238065/1 "2013-12-15T01:43:06Z")

</div>

Hello folks!

I am happy to announce that the new mainline version of ngx\_openresty,  
1.4.3.7, is now released:

```
http://openresty.org/#Download

```

Thanks all our contributors for making this happen!

The highlights of this release are the new LuaJIT v2.1 engine and the  
lua-resty-core library.

You should observe immediate speedup in your existing OpenResty/Lua  
apps after upgrading to this version. Sometimes the speedup can be 40%  
overall, as observed in CloudFlare’s Lua WAF system. Sometimes it may  
just be 10%, as observed in CloudFlare’s Lua CDN system. Thanks to all  
the new improvements in LuaJIT v2.1, especially the improvements in  
the JIT compiler; Mike Pall is my hero 😉 Special thanks go to  
CloudFlare for kindly sponsoring 3 development phases in LuaJIT v2.1  
(and phase #4 is also coming!).

The lua-resty-core library reimplements many Lua API functions  
provided by the ngx\_lua module with LuaJIT FFI, which means user Lua  
code paths using these API functions can finally be JIT compiled by  
LuaJIT (they used to be interpreted by LuaJIT’s interpreter only). So  
enabling lua-resty-core like below in nginx.conf may give another  
speedup in your Lua applications:

```
init_by_lua '
    require "resty.core"
';

```

Loading the resty.core module will replace a lot of ngx\_lua’s Lua API  
functions with resty.core’s own FFI-based implementations. So you can  
easily compare the performance with and without lua-resty-core 🙂  
Enabling lua-resty-core in CloudFlare’s Lua WAF system gives another  
33% ~ 37% overall speedup. Whee!

But if your don’t have enough Lua code paths (actually) JIT compiled,  
you MAY observe slowdown after enabling lua-resty-core. So always  
benchmark the performance of your app before enabling lua-resty-core  
in production. Or just resolve or workaround the blockers in your Lua  
code paths that cannot be JIT compiled, with the aid of LuaJIT’s jit.v  
or jit.dump modules. To use LuaJIT’s jit.v or jit.dump modules to  
analyze your Lua apps running in OpenResty/Nginx, you can put the  
following lines into your nginx.conf’s http {} block:

```
init_by_lua '
    local verbose = false
    if verbose then
        local dump = require "jit.dump"
        dump.on("b", "/tmp/jit.log")
    else
        local v = require "jit.v"
        v.on("/tmp/jit.log")
    end

    require "resty.core"
';

```

And load your app with tools like ab and weighttp to get your Lua code  
hot (for LuaJIT’s JIT compiler). Then you can check the outputs in the  
file /tmp/jit.log for all the detailed information from the JIT  
compiler.

Below is the complete change log for this release, as compared to the  
last (stable) release, 1.4.3.6:

- upgraded LuaJIT to v2.1-20131211.

- bundled LuaRestyCoreLibrary 0.0.2.

- upgraded LuaNginxModule to 0.9.3.

- upgraded HeadersMoreNginxModule to 0.24.

- upgraded SetMiscNginxModule to 0.23.

- upgraded MemcNginxModule to 0.14.

- upgraded RdsJsonNginxModule to 0.13.

- upgraded EchoNginxModule to 0.50.

- upgraded ArrayVarNginxModule to 0.03.

- upgraded RedisNginxModule module to 0.3.7.

- feature: applied the larger\_max\_error\_str patch to the nginx  
core to allow error log messages up to 4096 bytes and to allow  
the C macro “NGX\_MAX\_ERROR\_STR” to be overridden from the  
outside.

- feature: added new configure option  
“–with-pcre-conf-opt=OPTIONS” to the nginx core to allow custom  
PCRE ./configure build options. thanks Lance Li for the original  
patch.

The HTML version of the change log with lots of helpful hyper-links  
can be browsed here:

```
http://openresty.org/#ChangeLog1004003

```

OpenResty (aka. ngx\_openresty) is a full-fledged web application  
server by bundling the standard Nginx core, lots of 3rd-party Nginx  
modules and Lua libraries, as well as most of their external  
dependencies. See OpenResty’s homepage for details:

```
http://openresty.org/

```

We have run extensive testing on our Amazon EC2 test cluster and  
ensured that all the components (including the Nginx core) play well  
together. The latest test report can always be found here:

```
http://qa.openresty.org

```

Have fun!  
-agentzh

---

<div class="post-metadata">

**Author:** ![Yichun\_ZSSagentzh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/779978/32.png) [@Yichun\_ZSSagentzh](https://www.ruby-forum.com/u/Yichun_ZSSagentzh)\
**Post date:** [December 15, 2013, 4:27am UTC](https://www.ruby-forum.com/t/ngx-openresty-mainline-version-1-4-3-7-released/238065/2 "2013-12-15T04:27:19Z")

</div>

Hello!

On Sat, Dec 14, 2013 at 4:42 PM, Yichun Z. (agentzh) wrote:

> I am happy to announce that the new mainline version of ngx\_openresty,  
> 1.4.3.7, is now released:  
> [OpenResty® - Open source](http://openresty.org/#Download)

I just kicked out the ngx\_openresty 1.4.3.9 release, including an  
emergent fix for 1.4.3.7 where the LuaJIT include path was still  
pointing to luajit-2.0/ rather than luajit-2.1/.

Thanks Tor Hveem and lhmwzy for the report!

See [OpenResty® - Open source](http://openresty.org/#Download)

Best regards,  
-agentzh

---

<div class="post-metadata">

**Author:** ![Yichun\_ZSSagentzh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/779978/32.png) [@Yichun\_ZSSagentzh](https://www.ruby-forum.com/u/Yichun_ZSSagentzh)\
**Post date:** [December 15, 2013, 7:48am UTC](https://www.ruby-forum.com/t/ngx-openresty-mainline-version-1-4-3-7-released/238065/3 "2013-12-15T07:48:15Z")

</div>

configureмwarning£  
lib\_jit.c: In function ‘lj\_cf\_jit\_profile\_stop’:  
lib\_jit.c:594: warning: passing argument 2 of ‘setlightudV’ discards  
qualifiers from pointer target type  
lib\_jit.c:596: warning: passing argument 2 of ‘setlightudV’ discards  
qualifiers from pointer target type  
lib\_jit.c: In function ‘jit\_profile\_callback’:  
lib\_jit.c:550: warning: passing argument 2 of ‘setlightudV’ discards  
qualifiers from pointer target type  
lib\_jit.c: In function ‘lj\_cf\_jit\_profile\_start’:  
lib\_jit.c:577: warning: passing argument 2 of ‘setlightudV’ discards  
qualifiers from pointer target type  
lib\_jit.c:579: warning: passing argument 2 of ‘setlightudV’ discards  
qualifiers from pointer target type  
lib\_jit.c: In function ‘lj\_cf\_jit\_profile\_stop’:  
lib\_jit.c:594: warning: passing argument 2 of ‘setlightudV’ discards  
qualifiers from pointer target type  
lib\_jit.c:596: warning: passing argument 2 of ‘setlightudV’ discards  
qualifiers from pointer target type  
lib\_jit.c: In function ‘jit\_profile\_callback’:  
lib\_jit.c:550: warning: passing argument 2 of ‘setlightudV’ discards  
qualifiers from pointer target type  
lib\_jit.c: In function ‘lj\_cf\_jit\_profile\_start’:  
lib\_jit.c:577: warning: passing argument 2 of ‘setlightudV’ discards  
qualifiers from pointer target type  
lib\_jit.c:579: warning: passing argument 2 of ‘setlightudV’ discards  
qualifiers from pointer target type

ҽ\bundle\LuaJIT-2.1-20131211\src\lib\_jit.cļУĶ£  
542543е  
static const char KEY\_PROFILE\_THREAD = ‘t’;  
static const char KEY\_PROFILE\_FUNC = ‘f’;  
Ϊ  
static char KEY\_PROFILE\_THREAD = ‘t’;  
static char KEY\_PROFILE\_FUNC = ‘f’;

ٴconfigurewarningٳ֡  
׷봺ġ
