<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MrBrown blob &#187; memcached</title>
	<atom:link href="http://charles.lescampeurs.org/tag/memcached/feed" rel="self" type="application/rss+xml" />
	<link>http://charles.lescampeurs.org</link>
	<description>random bits.</description>
	<lastBuildDate>Sat, 10 Apr 2010 09:02:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Use multiple memcached daemons on FreeBSD</title>
		<link>http://charles.lescampeurs.org/2008/10/02/use-multiple-memcached-daemons-on-freebsd</link>
		<comments>http://charles.lescampeurs.org/2008/10/02/use-multiple-memcached-daemons-on-freebsd#comments</comments>
		<pubDate>Thu, 02 Oct 2008 10:23:59 +0000</pubDate>
		<dc:creator>CharlyBr</dc:creator>
				<category><![CDATA[Distro]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[memcached]]></category>

		<guid isPermaLink="false">http://charles.lescampeurs.org/?p=85</guid>
		<description><![CDATA[As you may know, when using memcached on 32-bit servers, processes can only address 4GB of virtual memory making the memcached daemon handle only 2 or 3 Gb of memory. If you want to address more memory, you need to launch multiple memcached daemons. I wrote an rc script , mmemcached, for FreeBSD to manage [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcharles.lescampeurs.org%2F2008%2F10%2F02%2Fuse-multiple-memcached-daemons-on-freebsd"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcharles.lescampeurs.org%2F2008%2F10%2F02%2Fuse-multiple-memcached-daemons-on-freebsd&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://charles.lescampeurs.org/wp-content/uploads/2008/10/picture-7.png"><img class="alignleft size-full wp-image-86" title="memcached" src="http://charles.lescampeurs.org/wp-content/uploads/2008/10/picture-7.png" alt="" width="160" height="160" /></a>As you may know, when using <a title="memcached homepage" href="http://www.danga.com/memcached/" target="_blank">memcached</a> on 32-bit servers, processes can only address 4GB of virtual memory making the memcached daemon handle only 2 or 3 Gb of memory.</p>
<p>If you want to address more memory, you need to launch multiple memcached daemons.</p>
<p>I wrote an rc script , <a title="mmemcached FreeBSD rc script" href="http://github.com/CharlyBr/freebsd-snippets/tree/master/mmemcached" target="_blank">mmemcached</a>, for FreeBSD to manage this.</p>
<p>To use it, you need to add this in /etc/rc.conf:</p>
<pre>mmemcached_enable="YES"
mmemcached_servers="1 2"
mmemcached_user="nobody"
mmemcached_args="-c 8192 -t 2 -m 2048 -d"</pre>
<p>Copy the mmemcached script in /usr/local/etc/rc.d for example and launch it with the start argument. With the above configuration it will launch two memcached daemons listening on ports 11211 and 11212 (mmemcached_servers parameter) with 2Gb of memory.</p>
<h2>Configuration</h2>
<p>Details of the rc.conf configuration:</p>
<ul>
<li>mmemcached_enabled: let this script &#8220;startable&#8221;,</li>
<li>mmemcached_servers: List of the daemons you want to start. Each number is used to generate the port number of the daemon. For example, 2 will launch a daemon listening on port 11212,</li>
<li>mmemcached_user: user that will start the daemon,</li>
<li>mmemcached_args: flags to pass to the daemon.</li>
</ul>
<h2>Download</h2>
<p><a title="mmemcached FreeBSD" href="http://github.com/CharlyBr/freebsd-snippets/tarball/master" target="_blank">Download the script</a> on <a title="FreeBSD snippets" href="http://github.com/CharlyBr/freebsd-snippets/tree/master" target="_blank">github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://charles.lescampeurs.org/2008/10/02/use-multiple-memcached-daemons-on-freebsd/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
