I can think of two cases where multiple instances of memcached on the same 
server are useful :
1/ to be able to use multiple processors without using the threaded version of 
memcached (but IMHO, using a single/multi-threaded version should be better)
2/ to be able to store datatypes with incompatible lifetime/storage policies or 
with specific flushing policies. ie :
- isolating a session cache from a data cache : you might not want new sessions 
to kick off important (complex to generate but accessed not very often) data, 
or having too many slabs for sessions when they could be of better use for data 
(if your data is not of the same size than your sessions)
- being able to flush all of datatype A without touching datatype B (you can't 
flush half of your cache, but you can flushall instance A without touching 
instance B).
 
Otherwise, IMHO, having a single instance with a lot of memory makes more sense 
(or better, two instances on two different servers, each with a lot of memory)
 
Jean-François


________________________________

        De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Ajinkya 
Nahar
        Envoyé : mercredi 26 septembre 2007 11:57
        À : 'Marcus Bointon'
        Cc : [email protected]; 'Nishith Shah'; 'Sunil'
        Objet : RE: Regarding Memcached Server configuration?
        
        

        Hi,

         

        I will be configuring memcached on a different server altogether.

        My query was regarding how much memory to allocate and how do I setup 
the memcached instances on that server.

         

        Thanks,

        Ajinkya

        
________________________________


        From: Marcus Bointon [mailto:[EMAIL PROTECTED] 
        Sent: Wednesday, September 26, 2007 2:44 PM
        To: Ajinkya Nahar
        Cc: [email protected]; 'Nishith Shah'; 'Sunil'
        Subject: Re: Regarding Memcached Server configuration?

         

        On 26 Sep 2007, at 07:04, Ajinkya Nahar wrote:

        
        
        

        I am working on a PHP - Mysql based web application.

         

        I am using memcached for caching purpose.

         

        I have one query regarding memcached server setup as follows -

         

        If we have 1.7 GB memory on a server, how much should we allocate to 
memcached assuming there is nothing else running on the server.

         

        Also, if we decide to allocate 1.5 GB, in that case, is it good to have 
just 1 memcached instance running or let's say 3 - each with 0.5 GB?

         

        We are using the latest PHP memcache client which implements consistent 
hashing strategy.

         

        If you are only running one server, you might be better off using APC 
for your caching. If you have 2 servers, you might get better performance by 
running your PHP on both, and also using both for memcache (with memcache the 
more physical servers you have, the faster it can go, on average). This will 
also give you a bit of redundancy, letting your service continue if one server 
dies.

         

        Marcus

        

        -- 

        Marcus Bointon

        Synchromedia Limited: Creators of http://www.smartmessages.net/

        UK resellers of [EMAIL PROTECTED] CRM solutions

        [EMAIL PROTECTED] | http://www.synchromedia.co.uk/

        
        
        

         

Reply via email to