<?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>ICESQUARE - Solve Computer Server Problems, Computer Help, Server Support, Server Help</title>
	<atom:link href="http://icesquare.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://icesquare.com/wordpress</link>
	<description>Solve Computer Server Problems, Computer Help, Server Support, Server Help</description>
	<lastBuildDate>Sun, 20 May 2012 19:53:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>[FreeBSD]How to run PECL Tokyo Tyrant in PHP 5.4</title>
		<link>http://icesquare.com/wordpress/freebsdhow-to-run-pecl-tokyo-tyrant-in-php-5-4/</link>
		<comments>http://icesquare.com/wordpress/freebsdhow-to-run-pecl-tokyo-tyrant-in-php-5-4/#comments</comments>
		<pubDate>Sat, 19 May 2012 21:55:27 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Tokyo Cabinet]]></category>
		<category><![CDATA[Tokyo Tyrant]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2812</guid>
		<description><![CDATA[After upgrading to PHP 5.4.3 (which is the first version of PHP 5.4 available in the FreeBSD port), I found that the pecl-tokyo_tyrant could not be compiled. Here is the error messages: cd /usr/ports/databases/pecl-tokyo_tyrant sudo make /usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:1827: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php_tokyo_tyrant_class_methods' /usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:1867: error: expected '=', ',', ';', 'asm' or [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2012/04/happy-300x225.png" class="alignleft size-medium wp-image-2780" width="200"/></p>
<p>After upgrading to PHP 5.4.3 (which is the first version of PHP 5.4 available in the FreeBSD port), I found that the pecl-tokyo_tyrant could not be compiled. Here is the error messages:</p>
<div style="margin-bottom:70px;"></div>
<pre>
cd /usr/ports/databases/pecl-tokyo_tyrant
sudo make
</pre>
<pre style="font-size:0.9em;">
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:1827: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php_tokyo_tyrant_class_methods'
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:1867: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php_tokyo_tyrant_table_class_methods'
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:1911: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php_tokyo_tyrant_query_class_methods'
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:1936: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php_tokyo_tyrant_iterator_class_methods'
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c: In function 'php_tokyo_tyrant_query_object_new':
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:2001: error: 'zend_class_entry' has no member named 'default_properties'
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c: In function 'php_tokyo_tyrant_iterator_object_new':
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:2052: error: 'zend_class_entry' has no member named 'default_properties'
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c: In function 'php_tokyo_tyrant_object_new_ex':
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:2090: error: 'zend_class_entry' has no member named 'default_properties'
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c: In function 'zm_startup_tokyo_tyrant':
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:2166: error: 'php_tokyo_tyrant_class_methods' undeclared (first use in this function)
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:2166: error: (Each undeclared identifier is reported only once
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:2166: error: for each function it appears in.)
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:2171: error: 'php_tokyo_tyrant_table_class_methods' undeclared (first use in this function)
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:2176: error: 'php_tokyo_tyrant_query_class_methods' undeclared (first use in this function)
/usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0/tokyo_tyrant.c:2182: error: 'php_tokyo_tyrant_iterator_class_methods' undeclared (first use in this function)
*** Error code 1

Stop in /usr/ports/databases/pecl-tokyo_tyrant/work/tokyo_tyrant-0.6.0.
*** Error code 1

Stop in /usr/ports/databases/pecl-tokyo_tyrant.
</pre>
<p>Basically, it means that the pecl-tokyo_tyrant is not happy with the new version of PHP 5.4. I&#8217;ve tried several methods, including using pkg_add, compiling from source, copying a working tokyo_tyrant.so etc, unfortunately none of these methods works.</p>
<p>Finally, I found that the maintainer of this package has made a new version available(0.6.2) at github. Here is how I did it:</p>
<p>First, go to <a href="https://github.com/mkoppanen/php-tokyo_tyrant/downloads" target="_blank">here</a> to grab the source code. Make sure that you download the tag.gz version because it has the file attribute available.</p>
<p>Second, let&#8217;s remove the pecl-tokyo_tyrant from your system. You can either do it in the port or pkg_delete:</p>
<p>From port:</p>
<pre>
cd /usr/ports/databases/pecl-tokyo_tyrant
sudo make deinstall
</pre>
<p>Or using pkg_delete:</p>
<pre>
sudo pkg_delete pecl-tokyo_tyrant-0.6.0
</pre>
<p>Now, extract the files and compile it from source:</p>
<pre>
tar -zxvf mkoppanen-php-tokyo_tyrant-0.6.0-2-gb0d7e0c.tar.gz
cd mkoppanen-php-tokyo_tyrant-b0d7e0c
sudo phpize
sudo ./configure
sudo make
sudo make install
</pre>
<p>and don&#8217;t forget to include the .so file in your configuration:</p>
<pre>
sudo nano /usr/local/etc/php/extensions.ini
</pre>
<p>Add the following (if not available) to the end of the file:</p>
<pre>
extension=tokyo_tyrant.so
</pre>
<p>Finally, let&#8217;s restart the Apache:</p>
<pre>
sudo apachectl stop
sudo apachectl start
</pre>
<p>That&#8217;s it! Have fun with Tokyo Tyrant with PHP 5.4.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2812"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffreebsdhow-to-run-pecl-tokyo-tyrant-in-php-5-4%2F' data-shr_title='%5BFreeBSD%5DHow+to+run+PECL+Tokyo+Tyrant+in+PHP+5.4'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffreebsdhow-to-run-pecl-tokyo-tyrant-in-php-5-4%2F' data-shr_title='%5BFreeBSD%5DHow+to+run+PECL+Tokyo+Tyrant+in+PHP+5.4'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/freebsdhow-to-run-pecl-tokyo-tyrant-in-php-5-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP/FreeBSD]===&gt;&gt;&gt; The databases/php5-sqlite port has been deleted: Removed from core php ===&gt;&gt;&gt; Aborting update</title>
		<link>http://icesquare.com/wordpress/phpfreebsd-the-databasesphp5-sqlite-port-has-been-deleted-removed-from-core-php-aborting-update/</link>
		<comments>http://icesquare.com/wordpress/phpfreebsd-the-databasesphp5-sqlite-port-has-been-deleted-removed-from-core-php-aborting-update/#comments</comments>
		<pubDate>Thu, 17 May 2012 05:17:38 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2792</guid>
		<description><![CDATA[When PHP 5.4 was available few months ago, I was hesitated to upgrade my FreeBSD box to upgrade to 5.4, because it comes with lots of big changes, including removing LOTS of old stuffs that were available in 5.3 or earlier versions. Today PHP 5.4.3 becomes available in FreeBSD ports. I guess it is stable [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p></p>
<p><img src="/wordpress/wp-content/uploads/2012/05/homer-woo-hoo-211x300.jpg" alt="" title="head-in-hands1-628x418" height="300" class="alignleft size-medium wp-image-2804" /></p>
<p>When PHP 5.4 was available few months ago, I was hesitated to upgrade my FreeBSD box to upgrade to 5.4, because it comes with lots of big changes, including removing LOTS of old stuffs that were available in 5.3 or earlier versions. </p>
<p>Today PHP 5.4.3 becomes available in FreeBSD ports. I guess it is stable enough and I should give it a try, and I am glad that I tried it in my test machine first. </p>
<p>Warning: Before you upgrade to PHP 5.4, make sure that you are not using any of the following packages, because they are not compatible with the PHP 5.4. Unfortunately, I don&#8217;t have a solution yet. Basically, I could not get them compiled.</p>
<ul>
<li><strong>eAccelerator</strong>: /usr/ports/www/eaccelerator/</li>
<li><strong>PECL-TokyoTyrant</strong>: /usr/ports/databases/pecl-tokyo_tyrant/ (Updated: I just came up a solution <a href="/wordpress/freebsdhow-to-run-pecl-tokyo-tyrant-in-php-5-4/">here</a>)</li>
</ul>
<p>When I performed the upgrade using the following command:</p>
<pre>
sudo portsnap fetch update
sudo portmaster -Da
</pre>
<p>I got the following error message:</p>
<pre>
===>>> The databases/php5-sqlite port has been deleted: Removed from core php
===>>> Aborting update
</pre>
<p>The reason why you see this problem because php5-sqlite is no longer available in PHP 5.4. In order to solve this problem, you will need to delete the php5-sqlite extension.</p>
<pre>
cd /usr/port/lang/php5-extensions
sudo make config
</pre>
<p>Uncheck the following: <strong>sqlite3 support</strong></p>
<p>Now, deinstall this port. Yes, let&#8217;s remove it and install it again. (I&#8217;ve tried the <strong>reinstall</strong> option and it didn&#8217;t work, so let&#8217;s stick with <strong>deinstall</strong> and <strong>install</strong>.</p>
<pre>
sudo make deinstall clean install clean
</pre>
<p>Now let&#8217;s find out which php-SQLite we should delete:</p>
<pre>
pkg_info | grep php5-sqlite
</pre>
<p>In my case, I deleted this one:</p>
<pre>
sudo pkg_delete php5-sqlite-5.3.13
</pre>
<p>Now upgrade the port again and FreeBSD should be happy about it. Enjoy PHP 5.4.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2792"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fphpfreebsd-the-databasesphp5-sqlite-port-has-been-deleted-removed-from-core-php-aborting-update%2F' data-shr_title='%5BPHP%2FFreeBSD%5D%3D%3D%3D%3E%3E%3E+The+databases%2Fphp5-sqlite+port+has+been+deleted%3A+Removed+from+core+php+%3D%3D%3D%3E%3E%3E+Aborting+update'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fphpfreebsd-the-databasesphp5-sqlite-port-has-been-deleted-removed-from-core-php-aborting-update%2F' data-shr_title='%5BPHP%2FFreeBSD%5D%3D%3D%3D%3E%3E%3E+The+databases%2Fphp5-sqlite+port+has+been+deleted%3A+Removed+from+core+php+%3D%3D%3D%3E%3E%3E+Aborting+update'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/phpfreebsd-the-databasesphp5-sqlite-port-has-been-deleted-removed-from-core-php-aborting-update/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>[PHP]Fatal error: Allowed memory size of x bytes exhausted (tried to allocate y bytes)</title>
		<link>http://icesquare.com/wordpress/phpfatal-error-allowed-memory-size-of-x-bytes-exhausted-tried-to-allocate-y-bytes/</link>
		<comments>http://icesquare.com/wordpress/phpfatal-error-allowed-memory-size-of-x-bytes-exhausted-tried-to-allocate-y-bytes/#comments</comments>
		<pubDate>Fri, 04 May 2012 15:32:52 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2788</guid>
		<description><![CDATA[A user complained to me that my PHP web applications stopped working today. After I digged into the error log, I found that following message: PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261900 bytes) in Unknown on line 0 Obviously, this is related to the memory error. Therefore I [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p></p>
<p><img src="/wordpress/wp-content/uploads/2011/12/computer-problem.jpg" alt="" title="tftp-title" class="alignleft size-thumbnail wp-image-1813"/></p>
<div style="margin-bottom:30px;"></div>
<p>A user complained to me that my PHP web applications stopped working today. After I digged into the error log, I found that following message:</p>
<pre>
PHP Fatal error:  Allowed memory size of 262144 bytes exhausted (tried to allocate 261900 bytes) in Unknown on line 0
</pre>
<p>Obviously, this is related to the memory error. Therefore I tried to increase the limit of memory_limit in php.ini. Since I have 8G of memory in my box, I think it is okay to set the memory limit of PHP to 4GB.</p>
<pre>
;memory_limit = 128M
memory_limit = 4096M
</pre>
<p>When I restart the Apache/PHP, I found another nightmare. My web application stopped working! When the user tries to access http://mywebsite/index.php, instead of rendering the code, the browser kept prompting the user to download the file.</p>
<p>After scratching my head for a while, I found that I missed something, which is very very important. I was running XAMPP (32-bit) on a Fedora 64-bit machine. See the problem? Since XAMPP is running in 32-bit, it does not understand what is 4096 MB. (If you install 4GB of memory in any Windows 32-bit machine, you will notice that Windows can only allocate 3GB of them, and the 1GB left memory is sitting inside your computer and doing nothing&#8230;) Therefore, I decrease the memory_limit to 2048MB, and that solved the problem.</p>
<p>Time to move away from XAMPP.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2788"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fphpfatal-error-allowed-memory-size-of-x-bytes-exhausted-tried-to-allocate-y-bytes%2F' data-shr_title='%5BPHP%5DFatal+error%3A+Allowed+memory+size+of+x+bytes+exhausted+%28tried+to+allocate+y+bytes%29'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fphpfatal-error-allowed-memory-size-of-x-bytes-exhausted-tried-to-allocate-y-bytes%2F' data-shr_title='%5BPHP%5DFatal+error%3A+Allowed+memory+size+of+x+bytes+exhausted+%28tried+to+allocate+y+bytes%29'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/phpfatal-error-allowed-memory-size-of-x-bytes-exhausted-tried-to-allocate-y-bytes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Solved]Problem to Update OpenLDAP in FreeBSD</title>
		<link>http://icesquare.com/wordpress/solvedproblem-to-update-openldap-in-freebsd/</link>
		<comments>http://icesquare.com/wordpress/solvedproblem-to-update-openldap-in-freebsd/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 04:44:49 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[LDAP]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2777</guid>
		<description><![CDATA[Recently, I found the following error message when updating my FreeBSD system regarding to the OpenLDAP: ===> Installing for openldap-client-2.4.31 ===> Generating temporary packing list ===> Checking if net/openldap24-client already installed ===> Creating users and/or groups. Using existing group `ldap'. Creating user `ldap' with uid `389'. pw: user 'ldap' already exists *** Error code 74 [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2012/04/happy-300x225.png" class="alignleft size-medium wp-image-2780" width="200"/></p>
<p style="margin-bottom:120px;">Recently, I found the following error message when updating my FreeBSD system regarding to the OpenLDAP:</p>
<pre>
===>  Installing for openldap-client-2.4.31
===>   Generating temporary packing list
===>  Checking if net/openldap24-client already installed
===> Creating users and/or groups.
Using existing group `ldap'.
Creating user `ldap' with uid `389'.
pw: user 'ldap' already exists
*** Error code 74

Stop in /usr/ports/net/openldap24-client.
*** Error code 1

Stop in /usr/ports/net/openldap24-client.
</pre>
<p>And I don&#8217;t use LDAP in particular, however it affects other applications that use LDAP, e.g., PHP</p>
<pre>
php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/ldap.so' - Shared object "libldap-2.4.so.8" not found, required by "ldap.so" in Unknown on line 0
PHP 5.3.10 with Suhosin-Patch (cli) (built: Feb 14 2012 16:59:15)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
</pre>
<p>It is very simple to solve this problem. All you need is to remove the user &#8216;ldap&#8217;, and install the port again. First, let&#8217;s remove the user &#8216;ldap&#8217; first:</p>
<pre>
sudo vipw
</pre>
<p>You will see this line:</p>
<pre>
ldap:*:389:389::0:0:OpenLDAP Server:/nonexistent:/usr/sbin/nologin
</pre>
<p>Remove the line by pressing &#8216;dd&#8217;, hit &#8216;ESC&#8217; button, and then press &#8216;:wq&#8217; to save the file and quit the editor.</p>
<p>After that, let&#8217;s clean the port and run the update again:</p>
<pre>
cd /usr/ports/net/openldap24-client
sudo make clean
sudo make install clean
</pre>
<p>That&#8217;s it. Your LDAP will be happy and your applications (such as PHP) will not complain.</p>
<p><br />
&#8211;Derrick</p>
<div class="shr-publisher-2777"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fsolvedproblem-to-update-openldap-in-freebsd%2F' data-shr_title='%5BSolved%5DProblem+to+Update+OpenLDAP+in+FreeBSD'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fsolvedproblem-to-update-openldap-in-freebsd%2F' data-shr_title='%5BSolved%5DProblem+to+Update+OpenLDAP+in+FreeBSD'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/solvedproblem-to-update-openldap-in-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to improve ZFS performance</title>
		<link>http://icesquare.com/wordpress/how-to-improve-zfs-performance/</link>
		<comments>http://icesquare.com/wordpress/how-to-improve-zfs-performance/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 16:31:53 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[ZFS]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[ZPOOL]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=1380</guid>
		<description><![CDATA[Recently, I built a FreeBSD server with ZFS file system using six 2TB harddisks. If you like to learn what I have done or understand more about ZFS, you can read the story here: ZFS+USB: Building a Super Large Server Using USB Memory, CF Card and SD Card.. Many people found a problem on their [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><style>
h3{
font-weight:bold;
}
</style>
<p><img src="/wordpress/wp-content/uploads/2011/01/zfs_logo-150x150.jpg" alt="" title="zfs_logo" width="150" height="150" class="alignleft size-thumbnail wp-image-1260" /></p>
<p>Recently, I built a FreeBSD server with ZFS file system using six 2TB harddisks. If you like to learn what I have done or understand more about ZFS, you can read the story here: <a href="/wordpress/zfsusb-building-a-super-large-server-using-usb-memory-cf-card-and-sd-card/" title="ZFS+USB: Building a Super Large Server Using USB Memory, CF Card and SD Card." target="_blank">ZFS+USB: Building a Super Large Server Using USB Memory, CF Card and SD Card.</a>.</p>
<p>Many people found a problem on their ZFS system. The speed is slow! It is slow to read or write files to the system. In this article, I am going to show you some tips on improving the speed of your ZFS file system.</p>
<fieldset style="border:1px solid #999; margin:10px; padding:10px;">
<legend>Table of Content</legend>
<ol>
<li><a href="#section1">A 64-bit decent CPU + Lots of memory</a></li>
<li><a href="#section2">Tweaking the Boot Loader</a></li>
<li><a href="#section3">Use disks with the same specifications</a></li>
<li><a href="#section4">Compression</a></li>
<li><a href="#section5">Disable the unwanted features</a></li>
<li><a href="#section6">Keep your ZFS up to date</a></li>
<li><a href="#section7">Use Cache / Log Devices</a></li>
<li><a href="#section8">Two is better than one <strong>(Updated on Jan 9, 2012)</strong></a></li>
<li><a href="#section9">Use Mirror, not RAIDZ if speed is your first concern.</a></li>
<li><a href="#section10">Distribute your free space evenly <strong>(Updated on Jan 9, 2012)</strong></a></li>
<li><a href="#section11">Backup the data on different machine, not on the same pool</a></li>
<li><a href="#section12">Rsync or ZFS send? <strong>(Updated on Apr 18, 2012)</strong></a></li>
<li><a href="#section13">Did you enable dedup? Disable it! <strong>(Updated on Feb 13, 2012)</strong></a></li>
</ol>
</fieldset>
<p><a name="section1"></a></p>
<h3>
Improve ZFS Performance: Step 1<br />
<br />
A 64-bit decent CPU + Lots of memory<br />
</h3>
<div class="alignright"></div>
<p style="padding-right:20px; margin-right:20px;">
Traditionally, we are told to use a less powerful computer for a file/data server. That&#8217;s not true on ZFS. ZFS is more than a file system. It uses a lot of resources to improve the performance of the input/output, such as compression on the fly. For example, suppose you need to write a 1GB file. Without enabling the compression, the system will write the entire 1GB file on the disk. With the compression being enabled, the CPU will compress the data first, and write the data on the disk after that. Since the compressed file is smaller, it takes shorter time to write to the disk, which results a higher writing speed. Same for the reading. ZFS can cache the file for you in the memory, which results a higher reading speed.</p>
<p>That&#8217;s why a 64-bit CPU and higher amount of memory is recommended. I recommended at least a Quad Core CPU with 4GB of memory (I personally use i7 + 8GB). Of course, the faster the CPU, the more the memory, the better performance. Of course, you need a 64-bit operating system.</p>
<p>Don&#8217;t believe? Let&#8217;s do an experiment. Suppose I am going to create a 10GB file with all zero. Let&#8217;s see how long does it take to write on the disk:</p>
<pre>
#CPU: i7 920 (8 cores) + 8GB Memory + FreeBSD 8.2 64-bit
#time dd if=/dev/zero of=./file.out bs=1M count=10k
10240+0 records in
10240+0 records out
10737418240 bytes transferred in 6.138918 secs (1749073364 bytes/sec)

real    0m6.140s
user    0m0.023s
sys     0m3.658s
</pre>
<p>That&#8217;s <strong>1.6GB/s</strong>! What is it so fast? That&#8217;s because it is a zero based file. After the compression, a compressed 10GB file may result in several bytes only. Since the performance of the compression is highly depended on the CPU, that&#8217;s why a fast CPU matters.</p>
<p>Now, let&#8217;s do the same thing on a not-so-fast CPU:</p>
<pre>
#CPU: AMD 4600 (2 cores) + 5GB Memory + FreeBSD 8.2 64-bit
#time dd if=/dev/zero of=./file.out bs=1M count=10k
10240+0 records in
10240+0 records out
10737418240 bytes transferred in 23.672373 secs (453584362 bytes/sec)

real    0m23.675s
user    0m0.091s
sys     0m22.409s
</pre>
<p>That&#8217;s <strong>434MB/s</strong> only. See the difference?</p>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section2"></a></p>
<h3>
Improve ZFS Performance: Step 2<br />
<br />
Tweaking the Boot Loader Parameters<br />
</h3>
<div class="alignright"></div>
<p>Many people complain about ZFS for its stability issues, such as kernel panic, reboot randomly, crash when copying large files (> 2GB) etc. It has something to do with the boot loader settings. By default, ZFS will not work smoothly without tweaking the system parameters system. Even FreeBSD claims that no tweaking is necessary for 64-bit system, my FreeBSD server crashes very often when writing large files to the pool. After trial and error for many times, I figure out an equation. You can tweak your boot loader (/boot/loader.conf) using the following parameters:</p>
<pre>
#I have 8G of Ram
vfs.zfs.prefetch_disable=0

#If Ram = 4GB, set the value to 512M
#If Ram = 8GB, set the value to 1024M
vfs.zfs.arc_min="1024M"

#Ram x 0.5 - 512 MB
vfs.zfs.arc_max="3584M"

#Ram x 2
vm.kmem_size_max="16G"

#Ram x 1.5
vm.kmem_size="12G"
</pre>
<p>Don&#8217;t forget to reboot your system after making any changes. After changing to the new settings, the writing speed improves from 60MB/s to 80MB/s, sometimes it even goes above 110MB/s! That&#8217;s a 33% improvement!</p>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section3"></a></p>
<h3>
Improve ZFS Performance: Step 3<br />
<br />
Use disks with the same specifications<br />
</h3>
<div class="alignright"></div>
<p>A lot of people may not realize the importance of using exact the same hardware. Mixing different disks of different models/manufacturers can bring performance penalty. For example, if you are mixing a slower disk (e.g., 5900 rpm) and a faster disk(7200 rpm) in the same virtual device (vdev), the overall speed will depend on the slowest disk. Also, different harddrives may have different sector size. For example, Western Digital releases a harddrive with 4k sector, while the general harddrives use 512 byte. Mixing harddrives with different sectors can bring performance penalty too. Here is a quick way to check the model of your harddrive:</p>
<pre>
sudo dmesg | grep ad
</pre>
<p>In my cases, I have the following:</p>
<pre>
ad10: 1907729MB Hitachi HDS722020ALA330 JKAOA20N at ata5-master UDMA100 SATA 3Gb/s
ad11: 1907729MB Seagate ST32000542AS CC34 at ata5-slave UDMA100 SATA 3Gb/s
ad12: 1907729MB WDC WD20EARS-00MVWB0 51.0AB51 at ata6-master UDMA100 SATA 3Gb/s
ad13: 1907729MB Hitachi HDS5C3020ALA632 ML6OA580 at ata6-slave UDMA100 SATA 3Gb/s
ad14: 1907729MB WDC WD20EARS-00MVWB0 50.0AB50 at ata7-master UDMA100 SATA 3Gb/s
ad16: 1907729MB WDC WD20EARS-00MVWB0 51.0AB51 at ata8-master UDMA100 SATA 3Gb/s
</pre>
<p>Notice that my Western Digital harddrives with 4k sectors all ends with EARS in the model number.</p>
<p>If you don&#8217;t have enough budget to replace all disks with the same specifications, try to group the disks with similar specifications in the same vdev. </p>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section4"></a></p>
<h3>
Improve ZFS Performance: Step 4<br />
<br />
Compression<br />
</h3>
<div class="alignright"></div>
<p>ZFS supports compressing the data on the fly. This is a nice feature that improves the I/O speed &#8211; only if you have a high speed CPU (such as Quad core or higher). If your CPU is not fast enough, I don&#8217;t recommend you to turn on the compression feature, because the benefit from reducing the file size is smaller than the time spent on the CPU calculation. Also, the compression algorithm plays an important role here. ZFS supports two compression algorithms, LZJB and GZIP. I personally use LZJB because it gives a better balance between the compression radio and the performance. You can also use GZIP and specify your own compression ratio (i.e., GZIP-N). FYI, I tried GZIP-9 (The maximum compression ratio available) and I found that the overall performance gets worse on my i7 with 8GB of memory.</p>
<p>There is no solid answer here because it all depends on what files you store. Different files such as large file, small files, already compressed files (such as Xvid movie) need different compression settings.</p>
<p>If you cannot decide, just go with lzjb. It can&#8217;t be wrong:</p>
<pre>
sudo zfs set compression=lzjb mypool
</pre>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section5"></a></p>
<h3>
Improve ZFS Performance: Step 5<br />
<br />
Disable the unwanted features<br />
</h3>
<p>By default, ZFS enables a lot of settings for data security, such as checksum etc. If you don&#8217;t care about the additional data security, just disable them. You can use the following command to view your ZFS settings.</p>
<pre>
sudo zfs get all
</pre>
<p>FYI, I usually disable the following:</p>
<pre>
#I don't care about the checksum.
sudo zfs set checksum=off myzpool

#I don't need ZFS to update the access time when reading the file
sudo zfs set atime=off myzpool
</pre>
<p>For more info, go to:</p>
<pre>
man zfs
</pre>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section6"></a></p>
<h3>
Improve ZFS Performance: Step 6<br />
<br />
Keep your ZFS up to date<br />
</h3>
<p>By default, ZFS will not update the file system itself even if a newer version is available on the system. For example, I created a ZFS file system on FreeBSD 8.1 with ZFS version 14. After upgrading to FreeBSD 8.2 (which supports ZFS version 15), my ZFS file system was still on version 14. I needed to upgrade it manually using the following commands:</p>
<pre>
sudo zfs upgrade my_pool
sudo zpool upgrade my_pool
</pre>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section7"></a></p>
<h3>
Improve ZFS Performance: Step 7<br />
<br />
Use Cache / Log Devices<br />
</h3>
<p>Suppose you have a very fast SSD harddrive. You can use it for logging/caching the data for your ZFS pool.</p>
<p>To improve the reading performance:</p>
<pre>
sudo zpool add 'zpool name' cache 'ssd device name'
</pre>
<p>To improve the writing performance:</p>
<pre>
sudo zpool add 'zpool name' log 'ssd device name'
</pre>
<p>
It was impossible to remove the log devices without losing the data until ZFS v.19 (FreeBSD 8.3+/9.0+). I highly recommend to add the log drives as a mirror, i.e.,</p>
<pre>
sudo zpool add zpool_name log mirror /dev/log_drive1 /dev/log_drive2
</pre>
<p>Now you may ask a question. How about using a ram disk as log / cache devices? First, ZFS already uses your system memory for I/O, so you don&#8217;t need to set up a dedicated ram disk by yourself. Also, using a ram disk for log (writing) devices is not a good idea. When somethings go wrong, such as power failure, you will end up losing your data during the writing.</p>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section8"></a></p>
<h3>
Improve ZFS Performance: Step 8<br />
<br />
Two is better than one<br />
</h3>
<p>Do you know ZFS works faster on multiple devices pool than single device pool, even they have the same storage size?</p>
<p align="center">
<a href="/wordpress/wp-content/uploads/2011/11/ZFS-Improve_Performance-1.png"  class="fancybox"><img src="/wordpress/wp-content/uploads/2011/11/ZFS-Improve_Performance-1.png" alt="" title="Two is better than one" width="500" /></a>
</p>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section9"></a></p>
<h3>
Improve ZFS Performance: Step 9<br />
<br />
Use Mirror, not RAIDZ if speed is your first concern.<br />
</h3>
<div class="alignright"></div>
<p>If you need performance, go with mirror, not RAIDZ. When ZFS stores the data in a mirror pool, it simply stores the whole file in each device. When it reads the file, it simply get the partial copy from each device first, and combine them at the end. Since this process can happen in parallel, it will speed up the reading process.</p>
<p>On the other hand, RAIDZ works a bit differently. Suppose there are N devices in your RAIDZ pool. When the data is written to a RAIDZ pool, ZFS needs to divided it into N-1 parts first, calculate the parity, and write all of them into the N devices. When reading the data, ZFS will read the N-1 devices first, make sure that the result is okay (otherwise it will read the data again from the remaining device), and combine them together. This additional work adds more work. That&#8217;s why RAIDZ is always slower than mirror.</p>
<p>So this is the ideal set up (given that you have enough budget):</p>
<p align="center">
<a href="/wordpress/wp-content/uploads/2011/11/ZFS-Strip-Mirror.jpg"  class="fancybox"><img src="/wordpress/wp-content/uploads/2011/11/ZFS-Strip-Mirror.jpg" alt="" title="ZFS-Strip-Mirror" width="500" /></a>
</p>
<p>Command to create a mirror zpool.</p>
<pre>
sudo zpool create zpool_name mirror /dev/hd1 /dev/hd2 mirror /dev/hd3 /dev/hd4 mirror /dev/hd5 /dev/hd6
</pre>
<p>Here is another model: Strip only, very fast with no data security.</p>
<p align="center">
<a href="/wordpress/wp-content/uploads/2011/11/ZFS-Strip-Only.jpg"  class="fancybox"><img src="/wordpress/wp-content/uploads/2011/11/ZFS-Strip-Only.jpg" alt="" title="ZFS-Strip-Only" width="500" /></a>
</p>
<p>Command to create a strip only zpool.</p>
<pre>
sudo zpool create zpool_name /dev/hd1 /dev/hd2 /dev/hd3 /dev/hd4 /dev/hd5 /dev/hd6
</pre>
<p>Here is the most popular model: RAIDZ, not so fast, but with okay data security.</p>
<p align="center">
<a href="/wordpress/wp-content/uploads/2011/11/ZFS-RAIDZ.jpg"  class="fancybox"><img src="/wordpress/wp-content/uploads/2011/11/ZFS-RAIDZ.jpg" alt="" title="ZFS-RAIDZ" width="500" /></a>
</p>
<p>Command to create a RAIDZ zpool.</p>
<pre>
sudo zpool create zpool_name raidz /dev/hd1 /dev/hd2 /dev/hd3 /dev/hd4 /dev/hd5 /dev/hd6
</pre>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section10"></a></p>
<h3>
Improve ZFS Performance: Step 10<br />
<br />
Distribute your free space evenly<br />
</h3>
<p>One of the important tricks to improve ZFS performance is to keep the free space evenly distributed across all devices.</p>
<p align="center">
<a href="/wordpress/wp-content/uploads/2011/11/ZFS-Improve_Performance-2.png"  class="fancybox"><img src="/wordpress/wp-content/uploads/2011/11/ZFS-Improve_Performance-2.png" alt="" title="Two is better than one" width="500" /></a>
</p>
<p>You can check it using the following command:</p>
<pre>
zpool iostat -v
</pre>
<p>The free space is show on the second column (available capacity)</p>
<pre>
               capacity     operations    bandwidth
pool         used  avail   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
storage     3.23T  1.41T      0      3  49.1K   439K
  ad4        647G   281G      0      0  5.79K  49.2K
  ad8        647G   281G      0      0  5.79K  49.6K
  ad10       647G   281G      0      0  5.82K  49.6K
  ad16       647G   281G      0      0  5.82K  49.6K
  ad18       647G   281G      0      0  5.77K  49.5K
</pre>
<p>When ZFS writes a new file to replace the old file in the system, it will first write the file in the free space first, then move the file pointer from the old one to the new one. In this case, even there is a power failure during writing the data, no data will be lost because the file pointer is still pointing to the old file. That&#8217;s why ZFS does not need fsck (file system check).</p>
<p>In order to keep the performance at a good level, we need to make sure that the free space is available in every device in the pool. Otherwise ZFS can only write the data to some of the devices only (instead of all). In the other words, the higher number of devices ZFS write, the better the performance.</p>
<p>Technically, if the structure of a zpool has not been modified or alternated, you should not need to worry about the free space distribution because ZFS will take care of that for you automatically. However, when you add a new device to an existing pool, that will be a different story, e.g.,</p>
<pre>
               capacity     operations    bandwidth
pool         used  avail   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
storage     3.88T  2.33T      0      3  49.1K   439K
  ad4        647G   281G      0      0  5.79K  49.2K
  ad8        647G   281G      0      0  5.79K  49.6K
  ad10       647G   281G      0      0  5.82K  49.6K
  ad16       647G   281G      0      0  5.82K  49.6K
  ad18       647G   281G      0      0  5.77K  49.5K
  ad20          0   928G      0      0  5.77K  49.5K
</pre>
<p>In this example, I add a 1TB hard drive (ad20) to my existing pool, which gives about 928GB of free space. Let say I add a 6GB file, the free space will look something like this:</p>
<pre>
               capacity     operations    bandwidth
pool         used  avail   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
storage     4.48T  1.73T      0      3  49.1K   439K
  ad4        648G   280G      0      0  5.79K  49.2K
  ad8        648G   280G      0      0  5.79K  49.6K
  ad10       648G   280G      0      0  5.82K  49.6K
  ad16       648G   280G      0      0  5.82K  49.6K
  ad18       648G   280G      0      0  5.77K  49.5K
  ad20         1G   927G      0      0  5.77K  49.5K
</pre>
<p>In the other words, ZFS will still divide my 6GB file into six <strong>equal</strong> pieces and write each piece to each device. Eventually, ZFS will use up the free space in the older devices, and it can write the data to the new devices only (ad20), which will decrease the performance. Unfortunately, there is no way to redistribute the data / free space evenly without destroying the pool, i.e.,</p>
<pre>
1. Back up your data
2. Destroy the pool
3. Rebuild the pool
4. Put the data back
</pre>
<p>Depending on how much data do you have, it can take 2 to 3 days to copy 5TB of data from one server to another server over a gigabit network. You don&#8217;t want to use scp to do it because you will need to re-do everything again if the process is dropped. In my case, I use rsync:</p>
<p>(One single line)</p>
<pre>
#Run this command on the production server:
rsync -avzr --delete-before backup_server:/path_to_zpool_in_backup_server /path_to_zpool_in_production_server
</pre>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section11"></a></p>
<h3>
Improve ZFS Performance: Step 11<br />
<br />
Backup the data on different machine, not on the same pool<br />
</h3>
<p>ZFS comes with a very cool feature. It allows you to save multiple copies of the same data in the same pool. This adds an additional layer on data security. However, I don&#8217;t recommend using this feature for backup purpose because it adds more work when writing the data to the disks. Also, I don&#8217;t think this is a good way to secure the data. I prefer to set up a mirror on a different server (Master-Slave). Since the chance of two machines fail at the same time is much smaller than one machine fails. Therefore the data is safer in this settings.</p>
<p>Here is how I synchronize two machines together:</p>
<p>Create a script in the slave machine: getContentFromMaster.sh<br />
(One single line)</p>
<pre>
rsync -avzr -e ssh --delete-before master:/path/to/zpool/in/master/machine /path/to/zpool/in/slave/machine
</pre>
<p>And put this file in a cronjob, i.e.,<br />
/etc/crontab</p>
<pre>
@daily root /path/to/getContentFromMaster.sh
</pre>
<p>Now, you may ask a question. Should I go with strip-only ZFS (i.e., stripping only. No mirror, RAIDZ, RAIDZ2) when I set up my pool? Yes or no. ZFS allows you to mix any size of har ddrive in one single pool. Unlike RAIZ{0,1,5,10} and concatenation, it can be any size and there is no lost in the disk space, i.e., you can connect 1TB, 2TB, 3TB into one single pool while enjoying the data-stripping (Total usable space = 6TB). It is fast (because there is no overhead such as parity etc) and simple. The only down side is that the entire pool will stop working if there is at least one device fails.</p>
<p>Let&#8217;s come back to the question, should we employ simple stripping in production environment? I prefer not. Strip-only ZFS divides all data into all vdev. If each vdev is simply a hard drive, and if one fails, there is NO WAY to get the original data back. If something screws up in the master machine, the only way is to destroy and rebuild the pool, and restore the data from the backup. (This process can takes hours to days if you have large amount of data, say 6TB.) Therefore, I strongly recommend to use at least RAIDZ in the production environment. If one device fails, the pool will keep working and no data is lost. Simply replace the bad hard drive with a good one and everything is good to go.</p>
<p>To minimize the downtime when something goes wrong, go with at least RAIDZ in a production environment (ideally, RAIDZ or strip-mirror).</p>
<p>For the backup machine, I think using simple stripping is completely fine.</p>
<p>Here is how to build a pool with simple stripping, i.e., no parity, mirror or anything</p>
<pre>
zpool create mypool /dev/dev1 /dev/dev2 /dev/dev3
</pre>
<p>And here is how to monitor the health</p>
<pre>
zpool status
</pre>
<p>Some websites suggest to use the following command instead:</p>
<pre>
zpool status -x
</pre>
<p>Don&#8217;t believe it! This command will return &#8220;all pools are healthy&#8221; even if one device is failed in a RAIDZ pool. In the other words, your data is healthy doesn&#8217;t mean all devices in your pool are healthy. So go with &#8220;zpool status&#8221; at any time.</p>
<p>FYI, it can easily takes few days to copy 10TB of data from one machine to another through a gigabit network. In case you need to restore large amount of data through the network, use rsync, not scp. I found that scp sometimes fail in the middle of transfer. Using rsync allows me to resume it at any time.</p>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section12"></a></p>
<h3>
Improve ZFS Performance: Step 12<br />
<br />
rsync or ZFS send?<br />
</h3>
<div class="alignright"></div>
<p>So what&#8217;s the main difference between rsync and ZFS send? What&#8217;s the advantage of one over the other?</p>
</p>
<p>rsync is a file level synchronization tool. It simply goes through the source, find out which files have been changed, and copy the corresponding files to the destination.</p>
<p>ZFS send is doing something similar. First, it takes a snapshot on the ZFS pool first:</p>
<p></p>
<pre>
zfs snapshot mypool/vdev@20120417
</pre>
<p>After that, you can generate a file that contains the pool and data information, copy to the new server to restore it:</p>
<pre>
#Method 1: Generate a file first
zfs send mypool/vdev@20120417 > myZFSfile
scp myZFSfile backupServer:~/
zfs receive mypool/vdev@20120417 < ~/myZFSfile
</pre>
<p>Or you can do everything in one single command line:</p>
</pre>
<pre>
#Method 2: Do everything over the pipe (One command)
zfs send pool/vdev@20120417 | ssh backupServer zfs receive pool/vdev@20120417
</pre>
<p>In general, the preparation time of ZFS send is much shorter than rsync, because ZFS already knows which files have been modified. Unlike rsync, a file-level tool, ZFS send does not need to go though the entire pool and find out such information. In terms of the transfer speed, both of them are similar.</p>
<p>So why do I prefer rsync over ZFS send (both methods)? It&#8217;s because the latter one is not practical! In method #1, the obvious issue is the storage space. Since it requires generating a file that contains your entire pool information. For example, suppose your pool is 10TB, and you have 8TB of data (i.e., 2TB of free space), if you go with method #1, you will need another 8TB of free space to store the file. In the other words, you will need to make sure that at least 50% of free space is available all the time. This is a quite expensive way to run ZFS.</p>
<p>What about method #2? Yes, it does not have the storage problem because it copies everything over the pipe line. However, what if the process is interrupted? It is a common thing due to high traffic in the network, high I/O to the disk etc. Worst worst case, you will need to re-do everything again, say, copying 8TB over the network, again.</p>
<p>rsync does not have these two problems. In rsync, it uses relatively small space for temporary storage, and in case the rsync process is interrupted, you can easily resume the process without copying everything again.</p>
<div style="border-bottom: 1px dotted #999; margin:10px 0px 10px 0px;"></div>
<p><a name="section13"></a></p>
<h3>
Improve ZFS Performance: Step 13<br />
<br />
Disable dedup if you don&#8217;t have enough memory (2GB memory per 1TB storage)<br />
</h3>
<div class="alignright"></div>
<p>Deduplication (dedup) is a space-saving technology. It simply stores one copy of your file instead of storing multiple copies. For example, suppose you have ten identical folders with the same files. If the dedup is enabled, ZFS only stores one copy instead of multiple copies. Notice that dedup is not the same as compression. <a href="http://icesquare.com/wordpress/zfs-compression-vs-deduplication-dedup-in-simple-english/" target="_blank">ZFS: Compression VS Deduplication(Dedup) in Simple English</a>
</p>
<p>
The idea of dedup is very simple. ZFS maintains an index of your files. Before writing any incoming files to the pool, it checks whether the storage has a copy of this file or not. If the file already exists, it will skip the file. With dedup enabled, instead of store 10 identical files, it stores one only copy. Unfortunately, the drawback is that it needs to check every incoming file before making any decision.
</p>
<p>
After upgrading my ZFS pool to version 28, I enabled dedup for testing. I found that it really caused <strong>huge performance hit</strong>. The writing speed over the network dropped from 80MB/s to 5MB/s!!! After disabling this feature, the speed goes up again.
</p>
<pre>
sudo zfs set dedup=off your-zpool
</pre>
<p>
In general, dedup is an expensive feature that requires a lot of hardware resources. You will need 2GB memory per 1TB. For example, if zpool is 10TB, I will need 20GB of memory! (Which I only have 12GB). Therefore, think twice before enabling dedup!
</p>
<p>Notice that it won&#8217;t solve all the performance problem by disabling the dedup. For example, if you enable dedup before and disable it afterward, all files stored during this period are dedup dependent, even dedup is disabled. When you need to update these files (e.g., delete), the system still needs to check again the dedup index before any processing your file. Therefore, the performance issue still exists when working with these affected files. For the new files, it should be okay. Unfortunately, there is no way to find out the affected dedup files. The only way is to re-build/empty the ZFS pool, which will clear the list of dedup files.</p>
<p>Enjoy ZFS.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-1380"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fhow-to-improve-zfs-performance%2F' data-shr_title='How+to+improve+ZFS+performance'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fhow-to-improve-zfs-performance%2F' data-shr_title='How+to+improve+ZFS+performance'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/how-to-improve-zfs-performance/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>[FreeBSD] Samba does not start after updating to 3.5.14</title>
		<link>http://icesquare.com/wordpress/freebsd-samba-does-not-start-after-updating-to-3-5-14/</link>
		<comments>http://icesquare.com/wordpress/freebsd-samba-does-not-start-after-updating-to-3-5-14/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 19:47:59 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2752</guid>
		<description><![CDATA[After I updated my Samba to 3.5.14 on my FreeBSD box today, it stopped working. I couldn&#8217;t connect to the Samba server from my Windows clients. Initially, I thought it was the memory cache issues, and I thought the problem would be solved by rebooting both machines. Unfortunately, it didn&#8217;t work. Therefore, I accessed to [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p></p>
<p><img src="/wordpress/wp-content/uploads/2011/12/computer-problem.jpg" alt="" title="tftp-title" class="alignleft size-thumbnail wp-image-1813"/></p>
<p>After I updated my Samba to 3.5.14 on my FreeBSD box today, it stopped working. I couldn&#8217;t connect to the Samba server from my Windows clients. Initially, I thought it was the memory cache issues, and I thought the problem would be solved by rebooting both machines. Unfortunately, it didn&#8217;t work. Therefore, I accessed to the server and check the cause of the problem.</p>
<p>First, I found that Samba was not evening running.</p>
<pre>
ps -ax | grep smb
</pre>
<p>So I started the Samba service manually:</p>
<pre>
sudo /usr/local/etc/rc.d/samba start
</pre>
<p>And it returned me the following message:</p>
<pre>
Cannot 'start' samba. Set winbindd_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'.
</pre>
<p>Oh that was easy. All I need to do was to modify my rc.conf:</p>
<pre>
#Samba service
samba_enable="YES"
winbindd_enable="YES"
</pre>
<p>And then I started the Samba again:</p>
<pre>
sudo /usr/local/etc/rc.d/samba start
</pre>
<p>Yay, Samba is up and running again!</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2752"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffreebsd-samba-does-not-start-after-updating-to-3-5-14%2F' data-shr_title='%5BFreeBSD%5D+Samba+does+not+start+after+updating+to+3.5.14'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffreebsd-samba-does-not-start-after-updating-to-3-5-14%2F' data-shr_title='%5BFreeBSD%5D+Samba+does+not+start+after+updating+to+3.5.14'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/freebsd-samba-does-not-start-after-updating-to-3-5-14/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install a 2.5TB, 3TB drives on Linux</title>
		<link>http://icesquare.com/wordpress/how-to-install-a-3tb-drive-on-linux/</link>
		<comments>http://icesquare.com/wordpress/how-to-install-a-3tb-drive-on-linux/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 18:45:32 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2739</guid>
		<description><![CDATA[Recently I got a new hard drive (3TB) for my Linux box at work. I didn&#8217;t realize that it is problematic / nightmare to do such a simple work. First, if you try to use fdisk to add the drive, it won&#8217;t work. Or I should say&#8230; it works, but it only give you a [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="alignleft size-thumbnail wp-image-1834" src="/wordpress/wp-content/uploads/2011/02/Hardware.png" width="200"/></p>
<p>Recently I got a new hard drive (3TB) for my Linux box at work. I didn&#8217;t realize that it is problematic / nightmare to do such a simple work.</p>
<p>First, if you try to use fdisk to add the drive, it won&#8217;t work. Or I should say&#8230; it works, but it only give you a 2TB usable space. This is a limitation of fdisk, because it can handle up to 2^32 -1 sectors (or 2TB). That&#8217;s why fdisk is not a solution here.</p>
<p>It seems that the only solution is using <strong>parted</strong>.</p>
<pre>
sudo parted /dev/sdd
</pre>
<p></p>
<p>It will return something like this:</p>
<pre>
GNU Parted 2.3
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
</pre>
<p>First, we want to create a label:</p>
<pre>
(parted) mklabel gpt
Warning: The existing disk label on /dev/sdd will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes
</pre>
<p>Then, we want to specify the unit:</p>
<pre>
(parted) unit TB
</pre>
<p>And tell parted to use all available space:</p>
<pre>
(parted) mkpart primary 0 -0
</pre>
<p>Next, we need to review the summary:</p>
<pre>
(parted) print
Model: ATA WDC WD30EZRX-00M (scsi)
Disk /dev/sdd: 3.00TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      0.00TB  3.00TB  3.00TB  ext2         primary
</pre>
<p>As you can see, the size is 3TB. Don&#8217;t worry about the file system for now (ext2). If it looks good to you, now we need to leave parted.</p>
<pre>
(parted) quit
Information: You may need to update /etc/fstab.
</pre>
<p>Next, we need to format the partition:</p>
<pre>
sudo mkfs.ext4 /dev/sdd1
</pre>
<p>After few seconds, it will give you some more information about your drive:</p>
<pre>
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=1 blocks
183148544 inodes, 732566272 blocks
36628313 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
22357 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
</pre>
<p>Now you can use your drive, such as mounting or putting it into /etc/fstab</p>
<pre>
sudo mount /dev/sdd1 /mnt/
df
/dev/sdd1             2.8T   42G  2.6T   2% /mnt
</pre>
<p>That&#8217;s it! Enjoy your new disk.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2739"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fhow-to-install-a-3tb-drive-on-linux%2F' data-shr_title='How+to+Install+a+2.5TB%2C+3TB+drives+on+Linux'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fhow-to-install-a-3tb-drive-on-linux%2F' data-shr_title='How+to+Install+a+2.5TB%2C+3TB+drives+on+Linux'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/how-to-install-a-3tb-drive-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add-ons for New Version of Firefox 11</title>
		<link>http://icesquare.com/wordpress/firefox-add-ons/</link>
		<comments>http://icesquare.com/wordpress/firefox-add-ons/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 17:22:40 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[Everyday Computer Problem]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[add-on]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=1438</guid>
		<description><![CDATA[Every time Firefox releases a major upgrade, we love it because it comes with lots of cool features. At the mean time, we hate it because lots of our favorite add-ons are not working with the new Firefox. Sometimes, the owners of the add-ons might be too busy, and it might take a while to [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2011/11/firefox-09-intro-150x150.png" alt="" title="Firefox" width="150" height="150" class="alignleft size-thumbnail wp-image-1765" /></p>
<p>Every time Firefox releases a major upgrade, we love it because it comes with lots of cool features. At the mean time, we hate it because lots of our favorite add-ons are not working with the new Firefox. Sometimes, the owners of the add-ons might be too busy, and it might take a while to release a compatible version. That&#8217;s why I put some of my favorite add-ons here. They are 100% compatible with the new Firefox, and I only modified the source codes that by-pass the version compatibly check.</p>
<p>In the other words, the add-on will work the way it was in the old version, and you will receive an upgrade if the owner releases a newer version.</p>
<p>So far I have made the following add-ons available in the latest version of Firefox:</p>
<style>
.tableHeader{
   border:1px dashed #666; padding:5px; font-weight:bold; font-size:15px;
}</p>
<p>.tableContent{
   border:1px dashed #666; padding:10px; font-weight:bold; font-size:13px;
}
</style>
<table style="border:1px dashed #666; padding:5px; margin:10px;">
<tr>
<td class="tableHeader">Add-On</td>
<td class="tableHeader">Download</td>
<td class="tableHeader">Comment</td>
<td class="tableHeader">Author&#8217;s URL</td>
</tr>
<tr>
<td class="tableHeader">BandWidthTester 0.5.9</td>
<td class="tableHeader"><a href="/download/BandWidthTester-0.5.9-icesquare.com.xpi" title="BandWidthTester 0.5.9">Download</a></td>
<td class="tableHeader">Not tested</td>
<td class="tableHeader">N.A</td>
</tr>
<tr>
<td class="tableHeader">BlockSite 0.7.1.1</td>
<td class="tableHeader"><a href="/download/blocksite-0.7.1.1-fx-icesquare.com.xpi" title="BlockSite 0.7.1.1">Download</a></td>
<td class="tableHeader">Tested</td>
<td class="tableHeader"><a href="https://addons.mozilla.org/en-us/firefox/addon/blocksite/" title="BlockSite" target="_blank">Add-on Homepage</a></td>
</tr>
<tr>
<td class="tableHeader">Bookmark Duplicate Detector 0.7.5</td>
<td class="tableHeader"><a href="/download/bookmark_duplicate_detector-0.7.5-fx_icesquare.com.xpi" title="Bookmark Duplicate Detector 0.7.5">Download</a></td>
<td class="tableHeader">Not tested</td>
<td class="tableHeader"><a href="https://addons.mozilla.org/en-US/firefox/addon/bookmark-duplicate-detector/" title="Bookmark Duplicate Detector" target="_blank">Add-on Homepage</a></td>
</tr>
<tr>
<td class="tableHeader">CopyPlainText 0.3.4</td>
<td class="tableHeader"><a href="/download/CopyPlainText-0.3.4.xpi" title="CopyPlainText 0.3.4">Download</a></td>
<td class="tableHeader">Not tested</td>
<td class="tableHeader">N.A.</td>
</tr>
<tr>
<td class="tableHeader">del.icio.us 1.2.1</td>
<td class="tableHeader"><a href="/download/del.icio.us_buttons-1.2.1-updated.xpi" title="del.icio.us 1.2.1">Download</a></td>
<td class="tableHeader">Not tested</td>
<td class="tableHeader">N.A.</td>
</tr>
<tr>
<td class="tableHeader">FireSheep 0.1.1</td>
<td class="tableHeader"><a href="/download/firesheep-0.1-1-icesquare.xpi" title="FireSheep 0.1.1">Download</a></td>
<td class="tableHeader">Not tested</td>
<td class="tableHeader"><a href="https://github.com/codebutler/firesheep/downloads" title="FireSheep" target="_blank">Add-on Homepage</a></td>
</tr>
<tr>
<td class="tableHeader">Google Calendar Tab 3.8</td>
<td class="tableHeader"><a href="/download/google_calendar_tab-3.8-tb.xpi" title="Google Calendar Tab 3.8">Download</a></td>
<td class="tableHeader">Tested</td>
<td class="tableHeader">N.A.</td>
</tr>
<tr>
<td class="tableHeader">Multiproxy Switch 1.33</td>
<td class="tableHeader"><a href="/download/multiproxy_switch_1.33-icesquare.com.xpi" title="Multiproxy Switch 1.33">Download</a></td>
<td class="tableHeader">Tested</td>
<td class="tableHeader"><a href="http://sites.google.com/site/switchproxy/" title="Multiproxy Switch" target="_blank">Add-on Homepage</a></td>
</tr>
<tr>
<td class="tableHeader">PermaTabs Mod 1.93</td>
<td class="tableHeader"><a href="/download/permatabs_mod-1.9.3-fx-icesquare.com.xpi" title="PermaTabs Mod 1.93">Download</a></td>
<td class="tableHeader">Not Tested</td>
<td class="tableHeader"><a href="http://snaplinks.mozdev.org" title="Snap Links Plus" target="_blank">Add-on Homepage</a></td>
</tr>
<tr>
<td class="tableHeader">Snap Links Plus 1.08</td>
<td class="tableHeader"><a href="/download/snaplinks-1.0.8-fx+sm-icesquare.com.xpi" title="Snap Links 1.0.8">Download</a></td>
<td class="tableHeader">Tested</td>
<td class="tableHeader">N.A.</td>
</tr>
</table>
<p>If you need any add-on, please post in the comment below. I will try to make it available here.</p>
<p>Enjoy your new Firefox!</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-1438"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffirefox-add-ons%2F' data-shr_title='Add-ons+for+New+Version+of+Firefox+11'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffirefox-add-ons%2F' data-shr_title='Add-ons+for+New+Version+of+Firefox+11'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/firefox-add-ons/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>ZFS: Compression VS Deduplication (Dedup) in Simple English</title>
		<link>http://icesquare.com/wordpress/zfs-compression-vs-deduplication-dedup-in-simple-english/</link>
		<comments>http://icesquare.com/wordpress/zfs-compression-vs-deduplication-dedup-in-simple-english/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 16:36:45 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[dedup]]></category>
		<category><![CDATA[deduplication]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2689</guid>
		<description><![CDATA[Many people are confused between the compression and deduplication because they are so similar. Both of them are designed to reduce the size of the data being stored in the storage. Let me explain the difference between them in simple English. 1. This is how your data looks like originally (Assuming only one unique file): [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><style>
.separator{
   border:1px dashed #999;
   margin:20px;
}
</style>
<p><img src="/wordpress/wp-content/uploads/2012/02/Data.png" alt="" title="Data" width="165" height="167" class="alignleft" /></p>
<p>Many people are confused between the compression and deduplication because they are so similar. Both of them are designed to reduce the size of the data being stored in the storage. Let me explain the difference between them in simple English.</p>
<div style="margin-top:100px;"></div>
<h3>1. This is how your data looks like originally (Assuming only one unique file):</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/></p>
<div class="separator"></div>
<h3>2. This is how your data look like after being stored in a ZFS pool with compression enabled.</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_small.png"/></p>
<div class="separator"></div>
<h3>3. This is how your data look like after being stored in a ZFS pool with deduplication enabled.</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/></p>
<div class="separator"></div>
<h3>4. Let say we are storing three identical files, i.e., </h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/></p>
<div class="separator"></div>
<h3>5. ZFS: Compression Only</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_small.png"/><img src="/wordpress/wp-content/uploads/2012/02/apple_small.png"/><img src="/wordpress/wp-content/uploads/2012/02/apple_small.png"/></p>
<div class="separator"></div>
<h3>6. ZFS: Deduplication Only</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/></p>
<div class="separator"></div>
<h3>7. ZFS: Compression + Deduplication</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_small.png"/></p>
<div style="margin-top:100px;"></div>
<p>Of course, enabling both compression and deduplication will save lots of free space. However, it comes with a very high price tag. If you like to enable deduplication, you need to make sure that you have at least 2GB of memory per 1TB of storage. For example, if your ZFS pool is 10TB, you need to have 20GB of memory installed in your system. Otherwise, you will experience a huge performance hit.</p>
<p>Hope this article helps you to understand the difference between compression and deduplication.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2689"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fzfs-compression-vs-deduplication-dedup-in-simple-english%2F' data-shr_title='ZFS%3A+Compression+VS+Deduplication+%28Dedup%29+in+Simple+English'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fzfs-compression-vs-deduplication-dedup-in-simple-english%2F' data-shr_title='ZFS%3A+Compression+VS+Deduplication+%28Dedup%29+in+Simple+English'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/zfs-compression-vs-deduplication-dedup-in-simple-english/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Top Reason Why You Should NOT Use Microsoft Exchange in Your Business</title>
		<link>http://icesquare.com/wordpress/top-reason-why-you-should-not-use-microsoft-exchange-in-your-business/</link>
		<comments>http://icesquare.com/wordpress/top-reason-why-you-should-not-use-microsoft-exchange-in-your-business/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 21:39:35 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Fun Stuffs]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Microsoft Exchange]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2671</guid>
		<description><![CDATA[Today, I sent a message to a company through their contact page on their website. It is a standard contact page, i.e., you need to fill in your contact information and the details of your request, and they will follow up with you later. An hour later, I received a reply from them, saying that [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2012/02/failure-sign1-300x198.jpg" alt="" title="Failure" width="300" height="198" class="alignleft size-medium wp-image-2675" /></p>
<p>Today, I sent a message to a company through their contact page on their website. It is a standard contact page, i.e., you need to fill in your contact information and the details of your request, and they will follow up with you later. An hour later, I received a reply from them, saying that they would like more information from me. Therefore, I reply to their email. Few seconds later, I got the following:</p>
<pre>
Delivery has failed to these recipients or distribution lists:

Assistly@company.com
Your message wasn't delivered because of security policies. Microsoft Exchange will not try to redeliver this message for you. Please provide the following diagnostic text to your system administrator.
Sent by Microsoft Exchange Server 2007

Diagnostic information for administrators:

....

(Another 100 lines of error messages)
</pre>
<p>
Initially, I thought I made a mistake when typing the email address. Therefore, I redid it and verified every single letter in the email address. Unfortunately, I got the same message again. After trying it for 5 times, I gave up, and this company loses a sale.</p>
<p>
There are few things we&#8217;ve learned here. First, never display very technical error messages to the customers. They are very boring for non-engineers. Second, don&#8217;t assume that every customer is patient. Not every one is willing to re-send the same email for 5 times. Third, it takes many years to build a city but it only takes few hours to destroy it. With today&#8217;s technology, it is too easy to spread out the bad words.</p>
<p>
I think this is not a right way to run a custom request management system (or ticket system). It should never yell to the customer. Instead, it should let the stuffs to evaluate the customer&#8217;s reply rather than letting the Microsoft Exchange Server to do it.</p>
<p>I don&#8217;t recommend using Microsoft Exchange for your business. It just hurts your business.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2671"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ftop-reason-why-you-should-not-use-microsoft-exchange-in-your-business%2F' data-shr_title='Top+Reason+Why+You+Should+NOT+Use+Microsoft+Exchange+in+Your+Business'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ftop-reason-why-you-should-not-use-microsoft-exchange-in-your-business%2F' data-shr_title='Top+Reason+Why+You+Should+NOT+Use+Microsoft+Exchange+in+Your+Business'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/top-reason-why-you-should-not-use-microsoft-exchange-in-your-business/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

