火焰图显示lj_str_new和lj_buf_putstr是瓶颈,但是没有下层调用的debug symbol

92 views
Skip to first unread message

陈柠檬

unread,
Aug 23, 2018, 5:12:35 AM8/23/18
to openresty
如附件svg,
不知道这俩函数一般是在哪些调用里面?
a.svg

woodvillage

unread,
Aug 23, 2018, 5:15:43 AM8/23/18
to openresty
目前系统的问题时cpu 被打满,sys占用很高(40-50),请求延时很大(大于两秒)

在 2018年8月23日星期四 UTC+8下午5:12:35,woodvillage写道:
如附件svg,
不知道这俩函数一般是在哪些调用里面?

woodvillage

unread,
Aug 23, 2018, 6:32:57 AM8/23/18
to openresty
代码比较长,我就不贴了,用到的string相关函数有 string.sub string.revers string.find ..连接 等等

在 2018年8月23日星期四 UTC+8下午5:15:43,woodvillage写道:

tokers

unread,
Aug 23, 2018, 6:58:43 AM8/23/18
to openresty
Hello!

从火焰图来看,可能是代码里有一些相对低效的字符串操作,比如很多短字符串拼接。
可以看下是否有这些情况,尽可能避免一些低效的字符串操作。

DeJiang Zhu

unread,
Sep 9, 2018, 5:06:03 AM9/9/18
to open...@googlegroups.com

这个时候来一张 Lua Land 的火焰突就比较清晰了

陈柠檬 <198...@gmail.com> 于2018年8月23日周四 下午5:12写道:
如附件svg,
不知道这俩函数一般是在哪些调用里面?

--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty...@googlegroups.com
发言: 请发邮件到 open...@googlegroups.com
退订: 请发邮件至 openresty+...@googlegroups.com
归档: http://groups.google.com/group/openresty
官网: http://openresty.org/
仓库: https://github.com/agentzh/ngx_openresty
教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html
Reply all
Reply to author
Forward
0 new messages