lua-nginx-module icon indicating copy to clipboard operation
lua-nginx-module copied to clipboard

lj_str_new high CPU usague when performance testing

Open lizj3624 opened this issue 3 years ago • 2 comments

I found lj_str_new high cpu usague

  1. env OpenResty-1.15.8,OS:CentOS6,CPU: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz, 15 worker http request 8k ~10k,10w qps

  2. lj_str_new high cpu usague when access_by_lua of ngx_lua ME1645502052074

lizj3624 avatar Feb 22 '22 04:02 lizj3624

You can try passing in the string length when calling ffi.string.

str = ffi.string(ptr [,len])

cppcoffee avatar Feb 22 '22 04:02 cppcoffee

thx,i try

lizj3624 avatar Feb 22 '22 05:02 lizj3624