Re: Any plans to increase the GC upper limit of LuaJIT on Linux x86_64?

  • From: Justin Cormack <justin@xxxxxxxxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 10 Aug 2012 09:41:14 +0100

On Thu, Aug 9, 2012 at 10:48 PM, agentzh <agentzh@xxxxxxxxx> wrote:

> Also, there's one interesting report on FreeBSD x86_64 [2] that shared
> memory zones created by Nginx's fastcgi modules (and possibly also
> others) can make LuaJIT 2.0 panic at the "not enough memory" exception
> even when the GC is allocating hundreds of kilobytes of memory. Does
> any work-around exist here?

Allocating hundreds of k? Sounds like it might be fragmentation issues
possibly. If you need lots of memory you can allocate it using mmap
through the ffi interface and use the full 64 bits, assuming that is
reasonable.

On the other part, I would be happy to look at any test case, but I
would look at 1. gc settings, 2. how much memory is being allocated.
1G RAM per process is a lot (using more nginx processes would
alleviate it of course), but it is hard to say without seeing example
code. If it is launching downstream requests these could be timing out
meaning coroutines are piling up for example, so it could be a matter
of timing out faster or anything.

Justin

Other related posts: