<?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>Chanel's Blog &#187; memcached</title>
	<atom:link href="http://cmunezero.com/tag/memcached/feed/" rel="self" type="application/rss+xml" />
	<link>http://cmunezero.com</link>
	<description>Where code meets love... and a lot of awkward silences...</description>
	<lastBuildDate>Tue, 11 May 2010 21:17:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Memcached Pool Bash Start Script</title>
		<link>http://cmunezero.com/2008/11/14/memcached-pool-bash-start-script/</link>
		<comments>http://cmunezero.com/2008/11/14/memcached-pool-bash-start-script/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 00:25:59 +0000</pubDate>
		<dc:creator>chanel</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux tutorial]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://cmunezero.com/?p=63</guid>
		<description><![CDATA[If you installed Memcached using Yum under the RedHat flavor of Linux, they have this really nice init.d scripts for starting and stopping Memcache.  I modified it in order to support creating a bunch memcache instances using contiguous ports.  What&#8217;s great is that only the &#8220;start&#8221; script has to be modified since the [...]]]></description>
			<content:encoded><![CDATA[<p>If you installed Memcached using Yum under the RedHat flavor of Linux, they have this really nice init.d scripts for starting and stopping Memcache.  I modified it in order to support creating a bunch memcache instances using contiguous ports.  What&#8217;s great is that only the &#8220;start&#8221; script has to be modified since the &#8220;stop&#8221; script uses a special RedHat function, <a href="http://man-wiki.net/index.php/8:killproc">killproc</a>, which can accept a program name or path and kill all instances of that program.  I&#8217;m still a noob at bash scripts but here is my only changes:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">NUMBUCKETS</span>=<span style="color: #000000;">3</span> <span style="color: #666666; font-style: italic;">#only new value needed</span>
start<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">i</span>=<span style="color: #000000;">1</span>;i<span style="color: #000000; font-weight: bold;">&lt;</span>=<span style="color: #007800;">$NUMBUCKETS</span>;i+=<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #000000; font-weight: bold;">do</span>
        <span style="color: #007800;">FULLPORT</span>=<span style="color: #800000;">${PORT}</span><span style="color: #800000;">${i}</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> $<span style="color: #ff0000;">&quot;Starting <span style="color: #007800;">$FULLPORT</span> (<span style="color: #007800;">$prog</span>): <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
        daemon <span style="color: #007800;">$prog</span> <span style="color: #660033;">-d</span> <span style="color: #660033;">-p</span> <span style="color: #007800;">$FULLPORT</span> <span style="color: #660033;">-u</span> <span style="color: #007800;">$USER</span> <span style="color: #660033;">-c</span> <span style="color: #007800;">$MAXCONN</span> <span style="color: #660033;">-m</span> <span style="color: #007800;">$CACHESIZE</span> <span style="color: #007800;">$OPTIONS</span>
        <span style="color: #007800;">RETVAL</span>=<span style="color: #007800;">$?</span>
    <span style="color: #000000; font-weight: bold;">done</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span>
    <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$RETVAL</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lock<span style="color: #000000; font-weight: bold;">/</span>subsys<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$prog</span>
    <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #007800;">$RETVAL</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://cmunezero.com/2008/11/14/memcached-pool-bash-start-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Memcached Equals Time Saver</title>
		<link>http://cmunezero.com/2008/05/12/memcached-equals-time-saver/</link>
		<comments>http://cmunezero.com/2008/05/12/memcached-equals-time-saver/#comments</comments>
		<pubDate>Mon, 12 May 2008 15:02:25 +0000</pubDate>
		<dc:creator>chanel</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[saver]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timesaver]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://cmunezero.com/2008/05/12/memcached-equals-time-saver/</guid>
		<description><![CDATA[Memcached is a wonderful tool to offload database calls by storing the needed information in cache.  One trick I&#8217;ve been using to increase productivity is that whenever I know I will be using complex or long running queries, I use a local instance of Memcached to cache the initial database calls.  As I [...]]]></description>
			<content:encoded><![CDATA[<p>Memcached is a wonderful tool to offload database calls by storing the needed information in cache.  One trick I&#8217;ve been using to increase productivity is that whenever I know I will be using complex or long running queries, I use a local instance of Memcached to cache the initial database calls.  As I debug the output or tweak the logic, the average runtime of the script stays almost constant because the bulk of the processing, database calls, has been cached.</p>
]]></content:encoded>
			<wfw:commentRss>http://cmunezero.com/2008/05/12/memcached-equals-time-saver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
