<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><o:SmartTagType name="country-region"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType
name="place"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if !mso]>
<STYLE>st1\:* {
        BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
        font-family: Helvetica;
}
@font-face {
        font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.EmailStyle18 {
        COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US
style="WORD-WRAP: break-word; webkit-nbsp-mode: space; webkit-line-break: after-white-space"
vLink=blue link=blue>
<DIV dir=ltr align=left><SPAN class=292430206-27092007><FONT face=Arial
color=#0000ff size=2>I can think of two cases where multiple instances of
memcached on the same server are useful :</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=292430206-27092007><FONT face=Arial
color=#0000ff size=2>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)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=292430206-27092007><FONT face=Arial
color=#0000ff size=2>2/ to be able to store datatypes with incompatible
lifetime/storage policies or with specific flushing policies.
</FONT></SPAN><SPAN class=292430206-27092007><FONT face=Arial color=#0000ff
size=2>ie :</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=292430206-27092007><FONT face=Arial
color=#0000ff size=2>- 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)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=292430206-27092007><FONT face=Arial
color=#0000ff size=2>- 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).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=292430206-27092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=292430206-27092007><FONT face=Arial
color=#0000ff size=2>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)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=292430206-27092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=292430206-27092007><FONT face=Arial
color=#0000ff size=2>Jean-François</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De :</B> memcached-bounces@lists.danga.com
[mailto:memcached-bounces@lists.danga.com] <B>De la part de</B> Ajinkya
Nahar<BR><B>Envoyé :</B> mercredi 26 septembre 2007
11:57<BR><B>À :</B> 'Marcus Bointon'<BR><B>Cc :</B>
memcached@lists.danga.com; 'Nishith Shah'; 'Sunil'<BR><B>Objet :</B> RE:
Regarding Memcached Server configuration?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Hi,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I will be configuring
memcached on a different server altogether.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">My query was
regarding how much memory to allocate and how do I setup the memcached
instances on that server.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Ajinkya<o:p></o:p></SPAN></FONT></P>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" color=navy size=3><SPAN
style="FONT-SIZE: 12pt; COLOR: navy">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> Marcus
Bointon [mailto:marcus@synchromedia.co.uk] <BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, September 26, 2007 2:44
PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Ajinkya
Nahar<BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B>
memcached@lists.danga.com; 'Nishith Shah'; 'Sunil'<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: Regarding Memcached Server
configuration?</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">On 26 Sep 2007, at 07:04, Ajinkya Nahar
wrote:<o:p></o:p></SPAN></FONT></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><BR><BR><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><SPAN
style="WORD-SPACING: 0px; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px; webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0">I
am working on a PHP – Mysql based web
application.<U1:P></U1:P></SPAN></FONT><FONT color=black><SPAN
style="COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><U1:P> </U1:P></SPAN></FONT><FONT
color=black><SPAN style="COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">I am using memcached
for caching purpose.<U1:P></U1:P></SPAN></FONT><FONT color=black><SPAN
style="COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><U1:P> </U1:P></SPAN></FONT><FONT
color=black><SPAN style="COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">I have one query
regarding memcached server setup as follows –<U1:P></U1:P></SPAN></FONT><FONT
color=black><SPAN style="COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><U1:P> </U1:P></SPAN></FONT><FONT
color=black><SPAN style="COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">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.<U1:P></U1:P></SPAN></FONT><FONT
color=black><SPAN style="COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><U1:P> </U1:P></SPAN></FONT><FONT
color=black><SPAN style="COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">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?<U1:P></U1:P></SPAN></FONT><FONT
color=black><SPAN style="COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><U1:P> </U1:P></SPAN></FONT><FONT
color=black><SPAN style="COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">We are using the
latest PHP memcache client which implements consistent hashing
strategy.</SPAN></FONT><FONT color=black><SPAN
style="COLOR: black"><o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">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.<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">Marcus<o:p></o:p></SPAN></FONT></P>
<DIV><SPAN
style="WORD-SPACING: 0px; orphans: 2; widows: 2; border-spacing: 0px 0px; khtml-text-decorations-in-effect: none; apple-text-size-adjust: auto"><SPAN
style="WORD-SPACING: 0px; orphans: 2; widows: 2; border-spacing: 0px 0px; khtml-text-decorations-in-effect: none; apple-text-size-adjust: auto">
<DIV>
<DIV>
<P class=MsoNormal><FONT face=Helvetica color=black size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Helvetica"><SPAN
style="WORD-SPACING: 0px; orphans: 2; widows: 2; border-spacing: 0px 0px; khtml-text-decorations-in-effect: none; apple-text-size-adjust: auto">-- <o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Helvetica color=black size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Helvetica">Marcus
Bointon<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Helvetica color=black size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Helvetica">Synchromedia
Limited: Creators of <A
href="http://www.smartmessages.net">http://www.smartmessages.net</A>/<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><st1:country-region w:st="on"><st1:place w:st="on"><FONT
face=Helvetica color=black size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Helvetica">UK</SPAN></FONT></st1:place></st1:country-region><FONT
face=Helvetica color=black size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Helvetica"> resellers of
info@hand CRM solutions<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Helvetica color=black size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Helvetica">marcus@synchromedia.co.uk
| <A
href="http://www.synchromedia.co.uk">http://www.synchromedia.co.uk</A>/<o:p></o:p></SPAN></FONT></P></DIV></DIV>
<P class=MsoNormal><FONT face=Helvetica color=black size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Helvetica"><BR><BR></SPAN></FONT><o:p></o:p></P></DIV></SPAN></SPAN></SPAN>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>