Open fairyqb opened 2 years ago
FlameGraph c-on-cpu.cbt c-on-cpu.bt.txt c-on-cpu.svg.txt
Remove file suffixes .txt
@agentzh @siddhesh @zhuizhuhaomeng @doujiang24
thanks
From the graph above, I suspected that the lj_BC_TGETS was the underlying cause of problem ,however ,there is little information except lj_BC_TGETS ,moreover, we don't know much about lj_BC_TGETS behind the screen, any ideas?
lj_bc.h lj_BC_TGETS is a field or method access in the interpreter, i.e. obj.field or obj:method
/ Table ops. / \ _(TNEW, dst, , lit, gc) \ (TDUP, dst, _, tab, gc) \ (GGET, dst, , str, index) \ _(GSET, var, __, str, newindex) \ (TGETV, dst, var, var, index) \ (TGETS, dst, var, str, index) \ (TGETB, dst, var, lit, index) \ (TGETR, dst, var, var, index) \ (TSETV, var, var, var, newindex) \ (TSETS, var, var, str, newindex) \ (TSETB, var, var, lit, newindex) \ (TSETM, base, , num, newindex) \ _(TSETR, var, var, var, newindex) \ \
which luajit version did you upgrade from? @fairyqb
upgrade LuaJIT-2.1-20180420 to luajit2-2.1-20220411 @zhuizhuhaomeng
@fairyqb would you please use the lj-lua-on-cpu in OpenResty XRay to profile your process?
@fairyqb would you please use the lj-lua-on-cpu in OpenResty XRay to profile your process?
results are similar to stapxx
@fairyqb is it possible for you to bisect luajit2 to find the changes that caused the problem?
@fairyqb is it possible for you to bisect luajit2 to find the changes that caused the problem?
bisect ??
man git bisect
client: ab -n10000000 -c40 -k http://www.hello.com/
server: openresty-1.13.6.2 LuaJIT-2.1-20180420 some lua scripts
upgrading the luajit version to luajit2-2.1-20220411 , the CPU increased by 20%, QPS and response time did not change(compared to the old luajit version)