[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Are there any lua profilers that work with LuaJIT 2.x?
- From: "Yichun Zhang (agentzh)" <agentzh@...>
- Date: Wed, 4 Sep 2013 16:54:35 -0700
Hello!
On Mon, Sep 2, 2013 at 9:00 PM, <lua.greatwolf@mamber.net> wrote:
>
> I was wondering if there are any suitable profiling tools for checking
> script performance in LuaJIT. I've tried most of the profilers listed in the
> lua wiki:
>
We've been using tools based on systemtap to trace our Lua code in
production and have solved tons of bottlenecks in our Lua code and
even in LuaJIT 2.0 itself.
Basically we use the ngx-sample-bt tool to do VM level profiling and
ngx-sample-lua-bt to do Lua language level profiling (both Lua 5.1 and
LuaJIT 2.0 are supported):
https://github.com/agentzh/nginx-systemtap-toolkit#ngx-sample-bt
https://github.com/agentzh/nginx-systemtap-toolkit#ngx-sample-lua-bt
Flame graphs are the visualization method used here.
I've also talked about these tools and shown some production
flamegraphs in these slides:
http://agentzh.org/misc/slides/yapc-na-2013-flame-graphs.pdf
This approach does not only work for Lua 5.1 or LuaJIT 2.0/2.1, but
also work for Perl 5, Nginx, and other things. The runtime overhead is
quite small even for really busy online systems.
Best regards,
-agentzh