Update Lua to 5.2 #1579

Closed
wants to merge 5 commits into
from

Conversation

Projects
None yet
5 participants
@jbochi
Contributor

jbochi commented Mar 5, 2014

This was already discussed before (#253), but since Lua 5.2 has been available for more than two years now, I believe it makes sense to update it.

All tests are passing and only a few modifications were needed. And it works: \o/

127.0.0.1:6379> EVAL "return _VERSION" 0
"Lua 5.2"
@vbauer

This comment has been minimized.

Show comment Hide comment
@vbauer

vbauer Mar 21, 2014

👍

vbauer commented Mar 21, 2014

👍

@jbergstroem

This comment has been minimized.

Show comment Hide comment
@jbergstroem

jbergstroem Mar 21, 2014

Contributor

Would be nice to split the commit into updating just lua, and one for each extension. guessing you pulled latest lua_cjson (2.1.0), struct 0.2 and latest head from @antirez's lua_cmsgpack?

Contributor

jbergstroem commented Mar 21, 2014

Would be nice to split the commit into updating just lua, and one for each extension. guessing you pulled latest lua_cjson (2.1.0), struct 0.2 and latest head from @antirez's lua_cmsgpack?

@jbochi

This comment has been minimized.

Show comment Hide comment
@jbochi

jbochi Mar 22, 2014

Contributor

I split the commit as @jbergstroem suggested. I also included in the commit messages the changeset / versions that were used for each module. The last commit (7e8e099) is the only one that has changes of my own.

Contributor

jbochi commented Mar 22, 2014

I split the commit as @jbergstroem suggested. I also included in the commit messages the changeset / versions that were used for each module. The last commit (7e8e099) is the only one that has changes of my own.

@vbauer

This comment has been minimized.

Show comment Hide comment
@vbauer

vbauer Mar 22, 2014

@jbochi We actively use Lua scripting with Redis in our project. Could you please provide simple benchmarks to compare old and new version of Lua?

vbauer commented Mar 22, 2014

@jbochi We actively use Lua scripting with Redis in our project. Could you please provide simple benchmarks to compare old and new version of Lua?

@jbochi

This comment has been minimized.

Show comment Hide comment
@jbochi

jbochi Mar 22, 2014

Contributor

In a simple benchmark, I got slightly more requests/s with Lua 5.2. The tests were run on a Mac OS X.

With Lua 5.1

$ redis-benchmark -r 10000 -n 100000 eval 'return redis.call("ping")' 0
====== eval return redis.call("ping") 0 ======
  100000 requests completed in 2.59 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

0.25% <= 1 milliseconds
93.55% <= 2 milliseconds
99.93% <= 3 milliseconds
99.99% <= 4 milliseconds
99.99% <= 5 milliseconds
100.00% <= 6 milliseconds
100.00% <= 7 milliseconds
100.00% <= 8 milliseconds
100.00% <= 9 milliseconds
100.00% <= 10 milliseconds
38639.88 requests per second

Lua 5.2

$ redis-benchmark -r 10000 -n 100000 eval 'return redis.call("ping")' 0
====== eval return redis.call("ping") 0 ======
  100000 requests completed in 2.55 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

0.35% <= 1 milliseconds
95.74% <= 2 milliseconds
99.97% <= 3 milliseconds
100.00% <= 3 milliseconds
39292.73 requests per second
Contributor

jbochi commented Mar 22, 2014

In a simple benchmark, I got slightly more requests/s with Lua 5.2. The tests were run on a Mac OS X.

With Lua 5.1

$ redis-benchmark -r 10000 -n 100000 eval 'return redis.call("ping")' 0
====== eval return redis.call("ping") 0 ======
  100000 requests completed in 2.59 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

0.25% <= 1 milliseconds
93.55% <= 2 milliseconds
99.93% <= 3 milliseconds
99.99% <= 4 milliseconds
99.99% <= 5 milliseconds
100.00% <= 6 milliseconds
100.00% <= 7 milliseconds
100.00% <= 8 milliseconds
100.00% <= 9 milliseconds
100.00% <= 10 milliseconds
38639.88 requests per second

Lua 5.2

$ redis-benchmark -r 10000 -n 100000 eval 'return redis.call("ping")' 0
====== eval return redis.call("ping") 0 ======
  100000 requests completed in 2.55 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

0.35% <= 1 milliseconds
95.74% <= 2 milliseconds
99.97% <= 3 milliseconds
100.00% <= 3 milliseconds
39292.73 requests per second
@vbauer

This comment has been minimized.

Show comment Hide comment
@vbauer

vbauer Mar 22, 2014

@jbochi Perfect! Thank you for information.

vbauer commented Mar 22, 2014

@jbochi Perfect! Thank you for information.

@badboy badboy referenced this pull request Feb 7, 2015

Closed

Warning while making Lua #2373

@mrniko

This comment has been minimized.

Show comment Hide comment
@mrniko

mrniko Jan 5, 2016

+1

mrniko commented Jan 5, 2016

+1

@mathieumg

This comment has been minimized.

Show comment Hide comment
@mathieumg

mathieumg Mar 8, 2016

+1 👍

+1 👍

@jbochi jbochi closed this Jun 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment