Hey Guys, i am very beginner for memcache. i have clustured LAMP servers(8-9) which hosts high traffic sites. I would like to install memcache on each one of them to reduce database calls. I am not able to take decision about how much RAM should i allocate to each instance. FYI, every server of mine has 8Gig of RAM. Please help me with this. Thanks, Chandan
Memory size is depended on size of cached data and expiration time. You should try to cache some calls and do monitoring, after that increase or decrease memory size and cache other calls etc.
To extend netload's statement, to start install one memcache server with about 512mb, use this cache with all of your apachies and let this machine run 24 hours. After that, have a look at the cache hits percentage, you must(!) optimize your queries for memcache before scaling it up. Complex queries which read data from multiple tables are very often not suitable! Split up those queries to multiple queries to improve cache hit frequency. Note mate, memcache is no silver bullet. It could improve performance of your db access but also could be be just a waste of cpu cycles.