Open fairyqb opened 2 years ago
Your C backtrace is incomplete. Needs OpenResty XRay to get the full backtraces and flame graphs. OpenResty XRay can also get Lua-land flame graphs, which will be more helpful for profiling and analyzing this issue. Probably just bad Lua code on your side.
Your information above is not really helpful, unfortunately.
Your C backtrace is incomplete. Needs OpenResty XRay to get the full backtraces and flame graphs. OpenResty XRay can also get Lua-land flame graphs, which will be more helpful for profiling and analyzing this issue. Probably just bad Lua code on your side.
Your information above is not really helpful, unfortunately.
new flame graphs:
How long will cpu 100% last? I think you need to tweak the hash size of the mlcache with table.new(narray, nrecord)
How long will cpu 100% last? I think you need to tweak the hash size of the mlcache with table.new(narray, nrecord)
lasts many days mlcache.lua set LRU_SIZE = 512000
Which version of openresty are you using? Which OS are you running on? Can you provide a reproducible test case?
Which version of openresty are you using? Which OS are you running on? Can you provide a reproducible test case?
openresty version : v2.1-20180420
OS : Linux MY_011 3.10.0-1062.18.1.el7.x86_64
The new luajit version has fixed this, is testing it and seems to be working fine
The new luajit version has fixed this, is testing it and seems to be working fine That's great!
lj_str_new CPU 100% only in one core
large number of strings longer than 128 in the mlcache cache. biz logic necessity
Flame Graph:
Perf Data: Using host libthread_db library "/lib64/libthread_db.so.1". 0x00007f9086d786f9 in lj_str_new (L=0x53f113f0, str=0x40926ae0 "{\"event\":\"mlcache:invalidations:_cache\",\"source\":\"mlcache\",\"data\":\"AUTH_OUTER_VER_KEY_X4eTEiMr-jLHD5z0VzzRPFLPOtKLwgLKQXq-TAFyOjl8vv5u2Cn2uQPthlHjlqhr11y4ZioD6L\",\"pid\":12861}e\\":\\"bearer\\",\\"exp"..., lenx=180) at lj_str.c:198 198 lj_str.c:
https://github.com/openresty/luajit2/blob/v2.1-agentzh/src/lj_str.c
Related issue: https://github.com/openresty/luajit2/issues/60