pbchou commented on issue #8728:
URL: https://github.com/apache/trafficserver/issues/8728#issuecomment-1069500337


   It sounds like your use case is different than ours. This might be something 
that could be included as a plugin parameter to decide whether to run the 
garbage collector on remap instance deletes.
   
   Let me explain why we added the garbage collector calls. Our current 
production config generates close to 1GB of Lua memory usage. With the current 
LuaJIT v2.1.0-beta3 that is standard, the memory usage is limited to 2GB on 
Linux. This means that we could not reload remap config more than once before 
running the garbage collector. If one is willing to take the latest non-tagged 
LuaJIT snapshot, the 2GB limit is gone. However, then you would eventually run 
into system memory limitations. We are very concerned about memory usage as we 
would prefer to use the RAM for caching. Is there a way to set and guarantee a 
maximum amount of time or memory usage threshold between garbage collector 
cycles? Otherwise, how would we engineer our network controller in terms of 
pushing config files and executing config reloads? Out of hundreds of caches 
maybe some have run GC and some have not.
   
   FYI, in looking through the LuaJIT source, there is a garbage collector 
option to stop garbage collection. It sounds like this might be useful to you 
since Lua deciding on its own to run the GC in your use case might be a time 
bomb.
   
   ```
   lua_gc(L, LUA_GCSTOP, 0);
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to