在 2017年8月6日,下午9:21,fc1...@gmail.com 写道:我用yum install openresty,用lua-resty-http请求第三方资源,然后编辑第三方返回的内容,并返回给客户端,随着程序运行时间增加,CPU使用率也在增大。用strace监控,主要是munmap,mremap消耗。httpc设置的是60s,目前还没找到原因。-- --
sample-bt -p 22134 -t 60 -u > a.bt
hello,建议使用火焰图(https://github.com/openresty/openresty-systemtap-toolkit#sample-bt)照一下,对比on/off CPU的消耗情况在 2017年8月6日,下午9:21,fc1...@gmail.com 写道:我用yum install openresty,用lua-resty-http请求第三方资源,然后编辑第三方返回的内容,并返回给客户端,随着程序运行时间增加,CPU使用率也在增大。用strace监控,主要是munmap,mremap消耗。httpc设置的是60s,目前还没找到原因。-- -- 邮件来自列表“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
在 2017年8月6日,下午9:21,fc1...@gmail.com 写道:我用yum install openresty,用lua-resty-http请求第三方资源,然后编辑第三方返回的内容,并返回给客户端,随着程序运行时间增加,CPU使用率也在增大。用strace监控,主要是munmap,mremap消耗。httpc设置的是60s,目前还没找到原因。-- -- 邮件来自列表“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
上面是我的火焰图,60秒的,命令为 sample-bt -p 22134 -t 60 -u > a.bt在 2017年8月7日星期一 UTC+8上午10:02:55,Kwanhur Huang写道:hello,建议使用火焰图(https://github.com/openresty/openresty-systemtap-toolkit#sample-bt)照一下,对比on/off CPU的消耗情况在 2017年8月6日,下午9:21,fc1...@gmail.com 写道:我用yum install openresty,用lua-resty-http请求第三方资源,然后编辑第三方返回的内容,并返回给客户端,随着程序运行时间增加,CPU使用率也在增大。用strace监控,主要是munmap,mremap消耗。httpc设置的是60s,目前还没找到原因。-- -- 邮件来自列表“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
看火焰图,你是在连接一个字符串?看看能不能用 table.concat 来优化连接的过程。在 2017年8月7日星期一 UTC+8上午10:14:16,fc1...@gmail.com写道:上面是我的火焰图,60秒的,命令为 sample-bt -p 22134 -t 60 -u > a.bt在 2017年8月7日星期一 UTC+8上午10:02:55,Kwanhur Huang写道:hello,建议使用火焰图(https://github.com/openresty/openresty-systemtap-toolkit#sample-bt)照一下,对比on/off CPU的消耗情况在 2017年8月6日,下午9:21,fc1...@gmail.com 写道:我用yum install openresty,用lua-resty-http请求第三方资源,然后编辑第三方返回的内容,并返回给客户端,随着程序运行时间增加,CPU使用率也在增大。用strace监控,主要是munmap,mremap消耗。httpc设置的是60s,目前还没找到原因。-- -- 邮件来自列表“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
您好,怎么看出的是连接字符串?我的字符串是一个链接,最多1000个字符。在 2017年8月7日星期一 UTC+8上午10:21:42,Zexuan Luo写道:看火焰图,你是在连接一个字符串?看看能不能用 table.concat 来优化连接的过程。在 2017年8月7日星期一 UTC+8上午10:14:16,fc1...@gmail.com写道:上面是我的火焰图,60秒的,命令为 sample-bt -p 22134 -t 60 -u > a.bt在 2017年8月7日星期一 UTC+8上午10:02:55,Kwanhur Huang写道:hello,建议使用火焰图(https://github.com/openresty/openresty-systemtap-toolkit#sample-bt)照一下,对比on/off CPU的消耗情况在 2017年8月6日,下午9:21,fc1...@gmail.com 写道:我用yum install openresty,用lua-resty-http请求第三方资源,然后编辑第三方返回的内容,并返回给客户端,随着程序运行时间增加,CPU使用率也在增大。用strace监控,主要是munmap,mremap消耗。httpc设置的是60s,目前还没找到原因。-- -- 邮件来自列表“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
因为 lj_BC_CAT 一路上去的函数都是字符串连接处理。建议做个 lj-lua-stacks 的火焰图,现在只有 Nginx 和 LuaJIT 两块的信息,缺少中间 Lua 代码的部分。按理说,1000个字符的内存分配是不可能走 m*map 这几个系统调用的。在 2017年8月7日星期一 UTC+8上午10:28:28,fc1...@gmail.com写道:您好,怎么看出的是连接字符串?我的字符串是一个链接,最多1000个字符。在 2017年8月7日星期一 UTC+8上午10:21:42,Zexuan Luo写道:看火焰图,你是在连接一个字符串?看看能不能用 table.concat 来优化连接的过程。在 2017年8月7日星期一 UTC+8上午10:14:16,fc1...@gmail.com写道:上面是我的火焰图,60秒的,命令为 sample-bt -p 22134 -t 60 -u > a.bt在 2017年8月7日星期一 UTC+8上午10:02:55,Kwanhur Huang写道:hello,建议使用火焰图(https://github.com/openresty/openresty-systemtap-toolkit#sample-bt)照一下,对比on/off CPU的消耗情况在 2017年8月6日,下午9:21,fc1...@gmail.com 写道:我用yum install openresty,用lua-resty-http请求第三方资源,然后编辑第三方返回的内容,并返回给客户端,随着程序运行时间增加,CPU使用率也在增大。用strace监控,主要是munmap,mremap消耗。httpc设置的是60s,目前还没找到原因。-- -- 邮件来自列表“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