giltene / wrk2

A constant throughput, correct latency recording variant of wrk
Apache License 2.0
4.23k stars 381 forks source link

Update LuaJIT #106

Open ayende opened 3 years ago

ayende commented 3 years ago

Just FYI, certain scripts can cause LuaJIT's string hashing to go into O(N^2) mode

This was fixed here: https://github.com/LuaJIT/LuaJIT/issues/555

But the LuaJIT version bundled with wrk2 is a lot older.

Sample scenario:

local cnt = 0
local prefix = nil -- change to '' for perf boost 

request = function ()
    c = c + 1
    local f = string.format('aaaa-%s-%6d-zzzz', prefix, c)
     return wrk.format(nil, '/run?id=' .. f)
end

This will hit the issue and cause wrk2 to slowly become slower and slower over time.