Premature Optimization ... we all know it. The proxy is now in a state were we can start to optimize the code a bit. After getting some complaints about the performance with keepalive I took a deeper look into the problem and came up with:

  • a global script-cache with reload on cache
  • less GC-runs
  • less overhead per lua-script-call

It is all in SVN now, enjoy it.

To test if we make progress I use mysqlslap in its most basic form:

$ mysqlslap --host=127.0.0.1 --port=4040 \
  --create-schema=mysqlslap --iterations=1000 --concurrency=10

which only connects and closes the connection again.

The run-time over 10.000 connects is

proxy, no cache, lua_gc()  11.553s
proxy, cache, lua_gc()      7.065s
proxy, cache, no lua_gc()   6.458s

Comments

Enable javascript to load comments.