[Python Client] PyPy benchmark

Showing 1-1 of 1 messages
[Python Client] PyPy benchmark Joe Hillenbrand 10/1/12 12:47 PM
I thought you guys might be interested in the benchmarking I did with PyPy 1.9. This is using Couchbase 2.0 beta on a 4 core, 1 GB RAM desktop VM.

PyPy
PythonMemcache
 Set data...
    cmds/sec: 13963.8015515
 Get data...
    cmds/sec: 14510.1441181
MemcachedClient
 Set data...
    cmds/sec: 1665.47185465
 Get data...
    cmds/sec: 2730.90764793
VBucketAwareClient
 Set data...
    cmds/sec: 2780.81998621
 Get data...
    cmds/sec: 2441.40494033
CouchbaseClient
 Set data...
    cmds/sec: 490.537448891
 Get data...
    cmds/sec: 482.249937762

Compared to a Cpython run on the same server.

CPython 2.7
PythonMemcache
 Set data...
    cmds/sec: 1235.09524185
 Get data...
    cmds/sec: 1240.61652836
MemcachedClient
 Set data...
    cmds/sec: 1752.96316862
 Get data...
    cmds/sec: 2100.30476749
VBucketAwareClient
 Set data...
    cmds/sec: 2160.82053381
 Get data...
    cmds/sec: 2116.85847056
CouchbaseClient
 Set data...
    cmds/sec: 508.925204624
 Get data...
    cmds/sec: 487.211121589

I suspect that the reason the PythonMemcache test is so much faster is because it is pure python (CPython extension calls are slower in PyPy than in CPython which can negate the performance increase, http://doc.pypy.org/en/latest/faq.html#do-cpython-extension-modules-work-with-pypy) and doesn't do any threading (Threading hurts python performance because of the GIL, http://dabeaz.blogspot.com/2010/01/python-gil-visualized.html).