Best Python memcache client: Python-memcached v/s Pylibmc

Recently, I tried to access memcached server on local and remote setup in a Python application. I am sharing my experience with two of most popular clients.


  • The first choice was a pure  Python solution to access memcached, that is python-memcached. It is a simple to install, understand and use solution.
  • It do not offer many customization setting, at least on its README 🙂
  • Very less or non-existent, useful documentation
  • Fails consistently for a high frequency request to memcached server. Failures are for simultaneous read on a file xxx.  I could not find an easy fix for this problem.
  • I do not suggest using it for a highly scalable application.


  • Bare minimum Python wrapper to C/C++ API to memcached
  • Installation was simple similar to Python-memcached
  • Offers many useful options during connection setup (such as non-blocking requests, TCP no-delay disable)
  • Shows no problem in demanding and highly scalable application
  • Shows better performance than Python-memcached

My verdict: Pylibmc is a clear winner 🙂

  One thought on “Best Python memcache client: Python-memcached v/s Pylibmc

  1. s.
    October 31, 2013 at 3:34 PM

    Exactly the question I was wondering, thanks !


  2. sanjivsingh
    October 27, 2014 at 8:57 AM

    Thanks that helps … I had to decide on which one to pick !


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: