note: Redis is running locally with a maximum of 10K connections
set LZ4 + MessagePack: 401.7 i/s
set Marshal: 232.3 i/s - 1.73x slower
set LZ4 + Marshal: 176.4 i/s - 2.28x slower
set to_s: 141.5 i/s - 2.84x slower
set Snappy + Marshal: 92.6 i/s - 4.34x slower
set zlib + MessagePack: 51.9 i/s - 7.73x slower
set zlib + Marshal: 41.4 i/s - 9.69x slower
note: everything is set to their defaults
Hash.to_s size 680000
Marshal size 740007
zlib size 380620
Snappy size 627216
LZ4 size 634926
How to get the maximum number of connections from your local Redis instance: