Hacker News new | past | comments | ask | show | jobs | submit login
Memcached: More Cache = Less Cash (rackspacecloud.com)
38 points by safun on Sept 29, 2009 | hide | past | favorite | 4 comments



Can someone who knows mysql well explain why the entire query cache for a table is thrown out whenever an update/insert/delete is made to the table?

Sounds very "baby with the bathwater"-ish.

The author of the article kind of makes it sound like this issue with mysql is the primary reason to use memcached. I'm sure not every RDBMS has the same issue (and I'm sure there are lots of other reasons to use memcached).


Cache invalidation is a deceptively difficult problem.

The direct answer is because it's pretty difficult to figure out how an insert/update/delete is going to affect all the various queries stored in the cache... without running them all again. And of course you're not going to rerun all the queries again on the off chance you might need them in the future; you're just going to throw them out of the cache and regenerate them the next time they're needed.

Note that this seems like an unfair comparison. I don't think many people consider MySQL's transparent query cache a substitute for the (not transparent) Memcache. Better would be memcache versus using a regular table in a MySQL DB as a cache (many popular PHP CMSes do this).


the mysql query cache is mostly useless anyway. The innodb_bufer_pool is what saves you and it does not throw out the whole cache when you update an item.


In the Facebook scale or similar scales if one relies only on OS instead of extra cache layers what would be the numbers? With this pace we would be talking about power efficient SRAM based caches in 10 years.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: