Listing Keys in Cache ??

Sumit Datta sumitdatta at gmail.com
Fri Sep 7 08:30:30 UTC 2007


Hello all,
+1 to Clint Webb
I was pretty new to memcache 4 months back. But our site took some
heavy load since we spend very little on server (just one server USD
200/month) and do about 100K page views a day. Going memcache way was
our only option as we could not spend more on servers, and we liked
that way. Constraints allow you to get better designs.
I think this point of view works in memcache itself. If you want to
see all keys and delete/change some etc. I strongly feel there is
change needed in the plan. The application should know what keys are
in there. And delete/update accordingly. If you have a cache miss
while doing a get you have to just write it.
memcache is an object cache and it makes sense only that way.
We are on a pretty normal server (Intel Xeon Dual Core) with 10gigs of
RAM (just one server with Apache, PHP, MySQL, memcache) and memcache
does what it is supposed to do. We have tried to keep MySQL SELECTs to
a zero (we have not achieved that yet). The app knows what to do when
there are cache miss. Otherwise its all fine. It does not need to look
at memcache and ask a list of keys. Earlier MySQL used to do 100% of
CPU all the time because of the huge amount of SELECTs. Now memcache
hardly does 2 % and take more then 70% of the SELECT load. I really
think by design you should eliminate the need for key lookups.
--
Thanks
=Code is Poetry=
Sumit Datta
Web Developer


More information about the memcached mailing list