<?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; Uncategorized</title>
	<atom:link href="http://charles.lescampeurs.org/category/uncategorized/feed" rel="self" type="application/rss+xml" />
	<link>http://charles.lescampeurs.org</link>
	<description>random bits.</description>
	<lastBuildDate>Thu, 02 Feb 2012 14:34:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Set the number of reserved filesystem blocks of a disk</title>
		<link>http://charles.lescampeurs.org/2009/06/30/set-the-number-of-reserved-filesystem-blocks-of-a-disk?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=set-the-number-of-reserved-filesystem-blocks-of-a-disk</link>
		<comments>http://charles.lescampeurs.org/2009/06/30/set-the-number-of-reserved-filesystem-blocks-of-a-disk#comments</comments>
		<pubDate>Tue, 30 Jun 2009 07:55:25 +0000</pubDate>
		<dc:creator>CharlyBr</dc:creator>
				<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[tune2fs]]></category>

		<guid isPermaLink="false">http://charles.lescampeurs.org/?p=188</guid>
		<description><![CDATA[The default value of &#8220;Reserved block count&#8221; takes 5% of usable disk. On a large fs like 813G, it represents about 40G. These blocks are reserved to the super user to recover from situations where user processes fill up filesystems. It is absolutely safe to reduce this space to one hundred or so MB. check [...]]]></description>
			<content:encoded><![CDATA[<p>The default value of &#8220;Reserved block count&#8221; takes 5% of usable disk. On a large fs like 813G, it represents about 40G.</p>
<p>These blocks are reserved to the super user to recover from situations where user processes fill up filesystems.<br />
It is absolutely safe to reduce this space to one hundred or so MB.</p>
<ul>
<li>check disk space of our filesystem:</li>
</ul>
<pre>$ df -h /dev/sda4
/dev/sda4             813G  418G  354G  55% /home</pre>
<p>Before the tuning, we have 354G free.</p>
<ul>
<li>check the current number of reserved blocks:</li>
</ul>
<pre>$ tune2fs -l /dev/sda4
...
Reserved block count:     10816865
...</pre>
<p>Change this number to 20000.<br />
The blocksize is 4096, 20000 blocks represent about 80MB.</p>
<pre>$ tune2fs -r20000 /dev/sda4
...
Reserved block count:     20000
...</pre>
<ul>
<li>check disk space of our filesystem:</li>
</ul>
<pre>$ df -h /dev/sda4
/dev/sda4             813G  418G  395G  52% /home</pre>
<p>We now have a gain of 40GB of free space!</p>
 <img src="http://charles.lescampeurs.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=188" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://charles.lescampeurs.org/2009/06/30/set-the-number-of-reserved-filesystem-blocks-of-a-disk/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use multiple memcached daemons on FreeBSD</title>
		<link>http://charles.lescampeurs.org/2008/10/02/use-multiple-memcached-daemons-on-freebsd?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=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[<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>
 <img src="http://charles.lescampeurs.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=85" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://charles.lescampeurs.org/2008/10/02/use-multiple-memcached-daemons-on-freebsd/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to know the maximum RAM supported by your server?</title>
		<link>http://charles.lescampeurs.org/2008/08/04/how-to-know-the-maximum-ram-supported-by-your-server?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-know-the-maximum-ram-supported-by-your-server</link>
		<comments>http://charles.lescampeurs.org/2008/08/04/how-to-know-the-maximum-ram-supported-by-your-server#comments</comments>
		<pubDate>Mon, 04 Aug 2008 06:42:09 +0000</pubDate>
		<dc:creator>CharlyBr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dmidecode]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://charles.lescampeurs.org/?p=39</guid>
		<description><![CDATA[The dmidecode command gives you all informations available about your memory. With the special parameter &#8220;-t 16&#8243;, you can see the maximum (physical) memory that your server can have: $ dmidecode -t 16 # dmidecode 2.8 SMBIOS 2.4 present. Handle 0x1000, DMI type 16, 15 bytes Physical Memory Array Location: System Board Or Motherboard Use: [...]]]></description>
			<content:encoded><![CDATA[<p>The dmidecode command gives you all informations available about your memory.</p>
<p>With the special parameter <em>&#8220;-t 16&#8243;</em>, you can see the maximum (physical) memory that your server can have:</p>
<pre>$ dmidecode -t 16
# dmidecode 2.8
SMBIOS 2.4 present.

Handle 0x1000, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: Multi-bit ECC
<strong>Maximum Capacity: 32 GB</strong>
Error Information Handle: Not Provided
Number Of Devices: 8</pre>
<p>Here we can see that your server can handle up to 32Gb</p>
<h2>Check empty memory slots</h2>
<p>To know which slots are used or not use the <i>&#8220;-t 17&#8243;</i> flag.</p>
<pre>dmidecode -t 17 | grep Size
        Size: 2048 MB
        Size: 2048 MB
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed</pre>
<h2>Links</h2>
<ul>
<li><a title="DMI specification" href="http://www.dmtf.org/standards/dmi/" target="_blank">DMI specification</a></li>
<li><a title="SMBIOS specification" href="http://www.dmtf.org/standards/smbios/" target="_blank">SMBIOS specification</a></li>
</ul>
 <img src="http://charles.lescampeurs.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=39" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://charles.lescampeurs.org/2008/08/04/how-to-know-the-maximum-ram-supported-by-your-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

