Multiple caches in memcached?
Steven Grimm
sgrimm at facebook.com
Wed Aug 2 09:10:25 UTC 2006
You can indeed set up two memcached instances on different ports. You
will have to make sure their combined maximum memory usage fits in your
machine's physical memory, and you will have to manually decide what
percentage of that memory goes to each cache (by setting the respective
memcached instances' maximum memory options to appropriate values). But
it should work fine. We run multiple memcached instances on a few of our
computers to take advantage of multiple CPUs with no issues.
But help me understand: why can you iterate through keys 1, 2, 3, 4,
etc., but not keys u1, u2, u3, u4, etc.? I am having a hard time coming
up with a scenario where that would involve more than stripping off or
prepending a character as you do exactly the same iteration you would do
without the prefixes. It is quite possible I simply don't understand
what you're trying to achieve, though.
-Steve
Abhishek Pokharna wrote:
> Thats what i dont want to do. There are situations where I dont know
> the keys and I need to performe some "global" operation on each type
> of cache,like iterating all users or groups and do something with each
> entity.
> Could I possibly start another daemon thread on a separate port which
> will imitate another type of cache? But would this be expensive on
> resources?
> Thanks
> Abhishek
More information about the memcached
mailing list