Hi everyone, I am a new user to this whole memcached thing and I am having some troubles wrapping my mind around it all. I'll start off with a brief synopsis of our implementation and hopefully someone can tell me if something is wrong.
We use a high-traffic MySQL database with greater than 60GB in it at any one time. The traffic is a mix of inserts (which lock tables due to MyISAM table engines) and selects from a high-traffic website. The insert side of our DB averages well over 5million inserts a day. The select side is mixed between a master and slave server. We are in the process of moving every feasible select to the slave server. I couldn't tell you how many selects there are from the website. Needless to say we need to cache some of these and table level caching isn't working as well as one would hope. We recently became aware of memcached and have started to implement it slowly in order to alleviate some of the stress on our DBs (the inserts and table level locking are causing an enormous problem). Memcached is just one of the strategies we are following in order to clear up the bottlenecks. Now on to our implementation of memcached. We have only moved a few things over to it, and we have also put some of the inserts to do it directly so that we can pull from the memcache server instead of the DB if it is there. We are also keeping track of every key used for the purpose of clearing the data when a critical insert would invalidate it. Our keys follow the format ##table, where ## is a unique identifier from the tables that we use throughout the site. Now comes my actual questions :P When I view the stats and extended stats for the server I am confused about the item counts. There is curr_items and total_items. I am not sure what the difference between the two is. When i run a delete these numbers don't go down by much (curr_items may drop by 5-10). I have given the memcache server 3.5GB to work with and we haven't reached the limit. Do these numbers get reset when deletes happen or will they grow until the server is full and it will even out? Also I have read that flush doesn't reset the count or remove the memory, but does delete? I am sure I will have many, many more questions but for now these are the critical ones. Thank you for the help and the time. Devon N.
