Hi James, Being one of the developers of the BeIT Memcached client, I would of course recommend you to use it. :-)
Our client is used in one setup running 6 memcached servers (the linux version), a bunch of webservers, and up to 20000 concurrent online users. In it we cache a variety of small pieces of data (1-10kB or so) with a expiry time varying from 15 minutes for session stuff and 2 days for more static data. I actually don't know how much memory each server is using for memcached, maybe a GB or two? It doesn't change when you set up the server, it allocates what you tell it to. Smoothly adding and removing instances is kinda thinking about it wrong. The memcached server itself is very, very, very stable. Hardware failures do happen, and if it does, your application should be designed such that it can work without that server for a little while. As far as the BeIT memcached client is considered, if a server is down, you will get cache misses when trying to get data from it, and the various set methods will return false when you try to store data. It internally keeps track of dead servers and will retry every other minute. Your application should survive without a memcached server for a while, enough for you to restart it. If it's gonna take longer, you'll have to change your server config and restart your web applications. There's no failover or run-time re-configuration of the BeIT memcached client because that leads to synchronization problems. As for monitoring, there's plugins for mrtg (http://oss.oetiker.ch/mrtg/) that work great. If you monitor the current connections you can figure out optimal settings for the size of the connection pool in our client. I have to say that we had bad experiences with the windows version of the memcached server, at least the version that was available last year. After some time of heavy usage it would just eat all the cpu of one core and not stop until you restarted it. I have no idea if that problem is fixed in the latest windows version, if I understand it correctly there's a new maintainer for it. When we switched our memcached servers to linux and the linux version, it went a lot smoother. It just works and consumes almost no cpu power whatsoever. You ask about running multiple instances of the server on one host, and that might be needed if the windows version can only allocate 2GB or something, but I have no idea what its limitations are. However, considering that memcached consumes almost no cpu, a better strategy given your server farm would be to run memcached on every web server and allocate maybe 2GB to it on each. You end up with more webservers, and utilize the slack better. The BeIT memcached client also supports compression of data, and I think we set the default threshold to 100kB or so. In your case, you may want to set it above the biggest data you are going to store. It takes CPU power from the webservers to do the compression and decompression, but you save some internal bandwidth. It's a trade-off, and you need to figure out for yourselves what works best for you. If you have any further questions, just ask. /Henrik Schröder On Mon, May 5, 2008 at 9:41 PM, James Swindell <[EMAIL PROTECTED]> wrote: > Hi All, > > > > I've just sent out a message inquiring the group's knowledge ofusage from > other sites, however, I failed to follow up that post with configuration > information from the group. I'm curious as to an effective and efficient > way of setting up my environment. > > > > Our Environment > > > > I am specifically looking at the Win32 version of the Server/Client. Any > client recommendations? I have been looking at BeIT's and Enyim's. > > We have 15-20 servers, running 64 bit OS (Win 2003 Server) with 8GB RAM > per, ~6 can be devoted to memcached. > > We are looking to store different types of data, but most importantly for > memcached to be storing rendered html pages, ranging in size from 100-300k. > > Ideally our TTL settings are around 10 minutes max. > > We get ~ 1000 page req/sec > > > > > > Questions: > > How many servers are you running on? Do you run on multiple ports from the > same host? What are the benefits of this? > > On average, what's the memory usage range? Is there an optimal way of > setting up the services? > > Do you cache a lot of information? What's a respectable size limit to keep > the services running smoothly? > > How do you add memcached instances to the farm when an instance goes > down? How do you add/remove instances smoothly? > > What's the best way to monitor all the instances? > > > > I'd appreciate any information in the matter. I'm only looking to get a > better feel for the way I should be using it. > > > > James >
