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

Re^2: persistent cache using Cache::FileCache

by perrin (Chancellor)
on Nov 05, 2004 at 21:38 UTC ( [id://405648]=note: print w/replies, xml ) Need Help??


in reply to Re: persistent cache using Cache::FileCache
in thread persistent cache using Cache::FileCache

It is very scalable, but it's not as fast as BerkleyDB or Cache::FastMmap for local storage. It's also not really faster than MySQL for simple primary key lookups.

Replies are listed 'Best First'.
Re^3: persistent cache using Cache::FileCache
by gaal (Parson) on Nov 05, 2004 at 23:48 UTC
    Hmmm, have you run benchmarks? For reads, it's going to be "fast": faster, I'd expect, than BerkleyDB, and more or less as fast as MySQL if indeed the queries are for simple indexed keys, significantly faster otherwise. I don't know anything about Cache::FastMap. (But I'll read up on it; sounds interesting!)

    If you have lots of RAM, and your data is big, too, memcached will outperform MySQL because you can run several daemons and circumvent the process size limit problem. (Talking 32-bit here.)

      I've run benchmarks -- I wouldn't make statements like that without trying it. BerkeleyDB is insanely fast. You can run Rob Mueller's benchmark yourself and see what you think, although it doesn't currently include a memcached comparison. It makes sense that it would be faster than Memcached, since it has no network overhead or separate server process and can cache things in shared memory.

      Striping your data across multiple machines is an advantage of memcached, although it doesn't seem relevant to this particular person's needs.

        Thanks for the very interesting benchmarks. I didn't realize BerkeleyDB was so fast.

        If you mentioned striping in response to my point about huge data, then note that you can get the benefits even on a single machine. If, for example, you have 8GB of RAM, you can run several memcached instances on the same machine, all under 2GB in size, but still have an effective cache size that is close to your potential maximum. Of course in a few years when 64-bit machines become common this advantage goes away, but in the meanwhile memcached works around it pretty much transparently.

        But yes, this is not necessarily as useful for the OP's needs as it was for the designers of memcached.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://405648]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-03-28 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found