Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Cache::Memcached -- performance question

by Thilosophy (Curate)
on May 20, 2005 at 03:22 UTC ( [id://458846]=perlquestion: print w/replies, xml ) Need Help??

Thilosophy has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks,

I just stumbled upon Cache::Memcached, which looks very interesting for use in load-balanced web applications. Before starting my own experiments with it, I thought I'd ask the Monastery about their experiences with memcached.

I am wondering

  1. how much slower it is versus an in-process-memory cache (which probably differs for small and large data)
  2. how much slower it is versus shared memory
  3. if it makes sense to use it for HTML::Template's cache (replacing in-memory or shared memory)
  4. if it is possible to share data between languages (say Perl and Java) -- probably not, seeing that it uses Storable
  5. how reliable people have found it to be
  6. any caveats you need to be aware of

  • Comment on Cache::Memcached -- performance question

Replies are listed 'Best First'.
Re: Cache::MemCached
by perrin (Chancellor) on May 20, 2005 at 04:06 UTC
    It's about the same speed as a simple MySQL query on a single unique key. It's much faster than Cache::Cache and most of the other caching modules out there. It's about half as fast as BerkeleyDB or Cache::FastMmap. It's not even close to the speed of an in-process memory cache.

    It is possible to share a cache server between multiple languages if you make both languages serialize in the same way. Memcached just stores bytes, so it doesn't care.

    Some large sites use it, so you can probably expect it to be reliable. Check the mailing list for anecodotes and testimonials.

Re: Cache::Memcached -- performance question
by samizdat (Vicar) on May 20, 2005 at 15:10 UTC
    I tried setting it up a while back and was unsuccessful in getting it to work in my configuration. I use Embperl as my templating system, and, for some reason, Apache::Session::memcached would not cooperate with Embperl. Nobody here (PM) had any answers, neither the embperl or memcached lists was helpful, and I had to move on. I was able to access the memcached in other ways, just not through embperl. See this node.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://458846]
Approved by moot
Front-paged by Tanktalus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-24 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found