| From | Sent On | Attachments |
|---|---|---|
| agentzh | Feb 9, 2011 2:03 am | |
| agentzh | Feb 9, 2011 9:29 pm | |
| Eugaia | Feb 10, 2011 1:04 am | |
| Alexander Kunz | Feb 10, 2011 2:25 am | |
| agentzh | Feb 10, 2011 2:35 am | |
| Akins, Brian | Feb 10, 2011 10:12 am | |
| Roman Vasilyev | Feb 10, 2011 2:38 pm | |
| Roman Vasilyev | Feb 10, 2011 2:41 pm | |
| kindy | Feb 10, 2011 6:02 pm | |
| agentzh | Feb 10, 2011 7:54 pm | |
| agentzh | Feb 10, 2011 9:01 pm | |
| Justin Cormack | Feb 11, 2011 1:10 am | |
| agentzh | Feb 11, 2011 2:59 am | |
| Roman Vasilyev | Feb 11, 2011 11:56 am | |
| Roman Vasilyev | Feb 11, 2011 12:39 pm | |
| Roman Vasilyev | Feb 11, 2011 3:06 pm | .png |
| agentzh | Feb 11, 2011 7:06 pm | |
| agentzh | Aug 8, 2011 9:02 pm | |
| agentzh | Aug 8, 2011 9:04 pm |
| Subject: | Re: [ANN] ngx_lua v0.1.5: ability to capture multiple parallelsubrequests | |
|---|---|---|
| From: | Justin Cormack (jus...@specialbusservice.com) | |
| Date: | Feb 11, 2011 1:10:54 am | |
| List: | ru.sysoev.nginx | |
On Fri, 2011-02-11 at 11:55 +0800, agentzh wrote:
On Fri, Feb 11, 2011 at 2:12 AM, Akins, Brian <Bria...@turner.com> wrote:
agentzh,
I was wondering if you had considered having a capture mode that used a callback rather than coroutines? In really high traffic servers, the coroutines seem to eat a good bit of memory.
Have you tried getting Lua to garbage collect before yielding? That might help.
Have you tried LuaJIT 2.0? It saves 25+% of the total RAM used by our nginx worker processes in our business, compared to the standard Lua 5.1 interpreter. Also the latter's coroutine implementation is suboptimal.
Another issue is that most of the upstream modules do not release its output bufs as early as possible in the context of subrequests, they usually rely on the nginx memory pool to release all those bufs when the pool is destroyed at the end of the main request, which is quite unacceptable. We'll fix our upstream modules and possibly other standard modules (via patches) to release buffers at the end of the subrequest, rather than main request.
That sounds a good fix...
Technically speaking, callbacks won't save memory, we still need to save all your Lua context such that you can get access to data in the outer context in your Lua callback, or it'll be useless :)
Cheers, -agentzh
_______________________________________________ nginx mailing list ngi...@nginx.org http://nginx.org/mailman/listinfo/nginx
_______________________________________________ nginx mailing list ngi...@nginx.org http://nginx.org/mailman/listinfo/nginx






.png