Kit,

Did not hear back from you regarding the memory limit for the Lua plugin on 
Linux.

Previously, I had tested on the command line with the luajit executable, but I 
have completed some testing with the ATS master branch.

I am running with Ubuntu 18.04 LTS Server 64-bit which ships with 'LuaJIT 
2.1.0-beta3'.

Using the following configuration, I got good results, able to allocated up to 
2GB memory.

plugin.config -

tslua.so --states=1 test-memory.lua

test-memory.lua -

function __init__(argtb)
   count = 0
   t = {}
   max = 2000

   FH = io.open("/dev/urandom", "rb")

   for i = 1, max, 1 do
      t[i] = FH:read(1024000)
      count = count + string.len(t[1])
   end

   io.close(FH)

   ts.debug("Total bytes allocated = " .. count .. " bytes")
   ts.debug("Garbage Collector reports = " .. collectgarbage("count") .. " MB")
end

Result -

pebc@piplup2:~/opt/ats-gh-master/bin$ ./traffic_server -V
Traffic Server 9.0.0 Jun 18 2019 14:16:03 piplup2
traffic_server: using root directory '/home/pebc/opt/ats-gh-master/'
Apache Traffic Server - traffic_server - 9.0.0 - (build # 061814 on Jun 18 2019 
at 14:16:03)
pebc@piplup2:~/opt/ats-gh-master/bin$ ./traffic_server
Traffic Server 9.0.0 Jun 18 2019 14:16:03 piplup2
traffic_server: using root directory '/home/pebc/opt/ats-gh-master/'
[Jun 19 11:54:42.681] traffic_server DIAG: (ts_lua) Total bytes allocated = 
2048000000 bytes
[Jun 19 11:54:42.681] traffic_server DIAG: (ts_lua) Garbage Collector reports = 
2001149.2382813 MB

Appreciate it if you could take a look and validate these results.

Thanks,
Peter

Reply via email to