<?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>Andryan's Random Notes</title>
	<atom:link href="http://blog.nirkabel.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nirkabel.org</link>
	<description>This blog is here to stay</description>
	<lastBuildDate>Thu, 01 Jul 2010 17:28:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Issues with NTP</title>
		<link>http://blog.nirkabel.org/2010/06/23/issues-with-ntp/</link>
		<comments>http://blog.nirkabel.org/2010/06/23/issues-with-ntp/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 05:53:46 +0000</pubDate>
		<dc:creator>Andryan</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.nirkabel.org/?p=137</guid>
		<description><![CDATA[If you wonder why your VPS or specifically OpenVZ VE&#8217;s ntpd is stuck at stratum 16 or stratum 0 while ntpq -p shows no abnormality (use ntpq -c rv to check state, it should say state=3 when abnormal), then try executing ntpdate manually. If it says &#8220;ntpdate: step-systime: Operation not permitted&#8221;, then you need to [...]]]></description>
			<content:encoded><![CDATA[<p>If you wonder why your VPS or specifically OpenVZ VE&#8217;s ntpd is stuck at stratum 16 or stratum 0 while <strong>ntpq -p</strong> shows no abnormality (use <strong>ntpq -c rv</strong> to check state, it should say state=3 when abnormal), then try executing <strong>ntpdate</strong> manually. If it says &#8220;ntpdate: step-systime: Operation not permitted&#8221;, then you need to reconfigure your OpenVZ VE or ask your host to do it for you: <strong>vzctl set 123 &#8211;capability sys_time:on &#8211;save</strong></p>
<p>If everything is fine but this message &#8220;ntpdate: no server suitable for synchronization found&#8221; keeps coming up, then it could be your ISP blocking UDP port 123. Use <strong>ntpdate -u</strong> to verify, this option should circumvent the firewall.</p>
<p>References:<br />
<a href="http://blog.haite.ch/2009/05/22/1242984900000.html" target="_blank"> http://blog.haite.ch/2009/05/22/1242984900000.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nirkabel.org/2010/06/23/issues-with-ntp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iptables mangle and NAT notes, etc.</title>
		<link>http://blog.nirkabel.org/2010/06/05/iptables-mangle-and-nat-notes/</link>
		<comments>http://blog.nirkabel.org/2010/06/05/iptables-mangle-and-nat-notes/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 17:55:08 +0000</pubDate>
		<dc:creator>Andryan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MikroTik]]></category>
		<category><![CDATA[Netfilter]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[RouterOS]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://andryan.wordpress.com/2007/05/31/iptables-mangle-and-nat-notes/</guid>
		<description><![CDATA[PREROUTING in nat table: DNAT, REDIRECT POSTROUTING in nat table: SNAT/MASQUERADE PREROUTING in mangle table: alter routing (e.g. source-based routing) FORWARD in mangle table: traffic shaping for tc (flowid) In MikroTik RouterOS, /ip firewall nat: srcnat chain = PREROUTING dstnat chain = POSTROUTING /ip firewall mangle: prerouting chain = global-in forward chain = global-out (support [...]]]></description>
			<content:encoded><![CDATA[<p>PREROUTING in nat table: DNAT, REDIRECT<br />
POSTROUTING in nat table: SNAT/MASQUERADE</p>
<p>PREROUTING in mangle table: alter routing (e.g. source-based routing)<br />
FORWARD in mangle table: traffic shaping for tc (flowid)</p>
<p>In MikroTik RouterOS, /ip firewall nat:<br />
srcnat chain = PREROUTING<br />
dstnat chain = POSTROUTING</p>
<p>/ip firewall mangle:<br />
prerouting chain = global-in<br />
forward chain = global-out (support NAT traffic shaping, higher load on router)</p>
<p>Update: I used to think that global-in literally means global input, while global-out literally means global output.  Apparently I was mistaken.  The parent queues MUST be matched to the right parent, either global-in, global-out, global-total, or one of the network interfaces depending on the mangle rules.  Top-most queue parent (global-in, global-out, global-total) doesn&#8217;t decide whether it&#8217;s up/down.  The mangle rules do the direction decision trick, whether a packet is incoming/download or outgoing/upload.  This makes perfect sense now! (doh)  I kept wondering why half of my queues (download queues&#8217; top-most parent was global-in) weren&#8217;t working, when all my mangle rules were in forward chain.  Obviously they wouldn&#8217;t, because global-in marks both direction in prerouting chain.</p>
<p>This didn&#8217;t make sense until I read the URL listed below under References.  Silly me!  Assumption is the root of most, if not all, problems indeed.</p>
<p>References:<br />
<a href="http://wiki.ispadmin.eu/index.php/Documentation/Mikrotik_guide#.22Global-in.22_vs._.22global-out.22_setup" target="_blank">http://wiki.ispadmin.eu/index.php/Documentation/Mikrotik_guide#.22Global-in.22_vs._.22global-out.22_setup </a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nirkabel.org/2010/06/05/iptables-mangle-and-nat-notes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MikroTik simple script to update ZoneEdit Dynamic DNS</title>
		<link>http://blog.nirkabel.org/2010/04/22/mikrotik-simple-script-to-update-zoneedit-dynamic-dns/</link>
		<comments>http://blog.nirkabel.org/2010/04/22/mikrotik-simple-script-to-update-zoneedit-dynamic-dns/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 15:01:37 +0000</pubDate>
		<dc:creator>Andryan</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[MikroTik]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.nirkabel.org/?p=118</guid>
		<description><![CDATA[I have a MikroTik router (RouterOS v4.x) with an ADSL connection at work, unfortunately it comes with dynamic public IP address.  I need to connect to my office workstation or simply the MikroTik router from home or elsewhere but I need to know its latest IP address all the time, so I decided to use [...]]]></description>
			<content:encoded><![CDATA[<p>I have a MikroTik router (RouterOS v4.x) with an ADSL connection at work, unfortunately it comes with dynamic public IP address.  I need to connect to my office workstation or simply the MikroTik router from home or elsewhere but I need to know its latest IP address all the time, so I decided to use ZoneEdit&#8217;s Dynamic DNS service.</p>
<p>Add a new script to the MikroTik router (replace those in bold):</p>
<ul>
<li> /system script add name=zoneedit-dyndns source=&#8221;/tool fetch url=\&#8221;http://dynamic.zoneedit.com/auth/dynamic.html\?host=<strong>dyndns.example.com</strong>&amp;dnsto=127.0.0.1\&#8221; user=<strong>ZEUser</strong> password=<strong>ZEPass</strong> keep-result=no\r\n/delay 30\r\n/tool fetch url=\&#8221;http://dynamic.zoneedit.com/auth/dynamic.html\?host=<strong>dyndns.example.com</strong>\&#8221; user=<strong>ZEUser</strong> password=<strong>ZEPass</strong> keep-result=no&#8221; policy=read</li>
</ul>
<p>Test the script by running it manually:</p>
<ul>
<li> /system script run zoneedit-dyndns</li>
</ul>
<p>If it shows 2 lines of &#8220;status: finished&#8221;, then the script works properly.</p>
<p>Schedule the script to run regularly (in this case, every 10 minutes):</p>
<ul>
<li> /system scheduler add name=&#8221;zoneedit-dyndns&#8221; interval=10m on-event=&#8221;/system script run zoneedit-dyndns&#8221; policy=read,test</li>
</ul>
<p>Why does it require 2 &#8220;fetch&#8221; commands to update?  I think there is a bug in ZoneEdit&#8217;s Dynamic DNS updater, so it needs to be <em>forced</em>. The new dynamic DNS change entry has to be significantly different from the previous dynamic DNS entry before the ZoneEdit backend would <strong>really</strong> update it.</p>
<p>Thanks, ZoneEdit!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nirkabel.org/2010/04/22/mikrotik-simple-script-to-update-zoneedit-dynamic-dns/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BIS-capable SSH client for BlackBerry</title>
		<link>http://blog.nirkabel.org/2010/02/18/bis-capable-ssh-client-for-blackberry/</link>
		<comments>http://blog.nirkabel.org/2010/02/18/bis-capable-ssh-client-for-blackberry/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 11:03:30 +0000</pubDate>
		<dc:creator>Andryan</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.nirkabel.org/?p=113</guid>
		<description><![CDATA[If you need an SSH client for BlackBerry, you can use MidpSSH. However, this client doesn&#8217;t allow you to use your BIS subscription. Luckily someone has modified MidpSSH to work over BIS. Once you have installed the modified MidpSSH, there is a very good chance that your mobile operator blocks outgoing TCP port 22 on [...]]]></description>
			<content:encoded><![CDATA[<p>If you need an SSH client for BlackBerry, you can use <a href="www.xk72.com/midpssh/" target="_blank">MidpSSH</a>. However, this client doesn&#8217;t allow you to use your BIS subscription. Luckily someone has modified <a href="http://www.deltatech.com.mx/midpssh/" target="_blank">MidpSSH to work over BIS</a>.</p>
<p>Once you have installed the modified MidpSSH, there is a very good chance that your mobile operator blocks outgoing TCP port 22 on your BIS plan. You need to reconfigure your SSH server to listen on another port (port 2222 works for me).</p>
<p>In case you wonder how to specify the custom port (since there is no specific port field), specify the port in the Host field, e.g. 127.0.0.1:2222.</p>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nirkabel.org/2010/02/18/bis-capable-ssh-client-for-blackberry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VPS (HyperVM) initial setup</title>
		<link>http://blog.nirkabel.org/2009/08/03/vps-hypervm-initial-setup/</link>
		<comments>http://blog.nirkabel.org/2009/08/03/vps-hypervm-initial-setup/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 10:05:34 +0000</pubDate>
		<dc:creator>Andryan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://blog.nirkabel.org/?p=106</guid>
		<description><![CDATA[I just purchased a VPS account from a local VPS provider (using HyperVM). The first thing I was to rebuild the VPS because it has LXAdmin installed by default. I want a lightweight VPS with everything minimal. I was excited to see some minimal OS templates on the web Control Panel. I have a Debian [...]]]></description>
			<content:encoded><![CDATA[<p>I just purchased a VPS account from <a href="http://www.vps.co.id/" target="_blank">a local VPS provider</a> (using HyperVM). The first thing I was to rebuild the VPS because it has LXAdmin installed by default. I want a lightweight VPS with everything minimal.</p>
<p>I was excited to see some minimal OS templates on the web Control Panel. I have a Debian 4.0 <a href="http://www.bitfolk.com/" target="_blank">UK VPS</a>. This time I choose Ubuntu 6.06, because there are lots of Ubuntu repository mirrors in Indonesia. <img src='http://blog.nirkabel.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Once I rebuilt the VPS with Ubuntu template, the VPS cannot be instantly ssh&#8217;d into. sshd fails to start because  <strong>udev</strong> is installed and we need to remove that. Quickly remove udev by typing the following on Command Center: apt-get -y remove udev</p>
<p>Once it&#8217;s removed, reboot the VPS. Voila! You should be able to login using SSH now. <img src='http://blog.nirkabel.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>No need to do mknod /dev/random c 1 8,  mknod /dev/urandom c 1 9, /sbin/MAKEDEV tty, /sbin/MAKEDEV ttyp, nor /sbin/MAKEDEV pts.</p>
<p>References:<br />
<a href="http://prajizworld.com/?p=5" target="_blank">http://prajizworld.com/?p=5</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nirkabel.org/2009/08/03/vps-hypervm-initial-setup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FreeBSD 6.3-RELEASE on Tyan TA26 B5397 barebones</title>
		<link>http://blog.nirkabel.org/2009/01/18/freebsd-63-release-on-tyan-ta26-b5397-barebones/</link>
		<comments>http://blog.nirkabel.org/2009/01/18/freebsd-63-release-on-tyan-ta26-b5397-barebones/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 14:29:08 +0000</pubDate>
		<dc:creator>Andryan</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.nirkabel.org/?p=96</guid>
		<description><![CDATA[I have several Tyan TA26 B5397 barebones (with latest BIOS) which need to be installed with FreeBSD 6.3-RELEASE (32-bit). The installation went smoothly, but after finishing post-install setups and exiting the setup program, it wouldn&#8217;t reboot. Initially I thought this was a small issue but eventually after the system boots up, I couldn&#8217;t restart the [...]]]></description>
			<content:encoded><![CDATA[<p>I have several Tyan TA26 B5397 barebones (with latest BIOS) which need to be installed with FreeBSD 6.3-RELEASE (32-bit). The installation went smoothly, but after finishing post-install setups and exiting the setup program, it wouldn&#8217;t reboot.</p>
<p>Initially I thought this was a small issue but eventually after the system boots up, I couldn&#8217;t restart the system with reboot, shutdown, nor init 6. It would stuck/freeze/hang at the &#8220;Uptime: &#8230;&#8221; line and before the &#8220;Rebooting..&#8221; line. I tried with 2 other barebones thinking that it is hardware issue, I got same results though. Clearly this is a bug in FreeBSD 6.3-RELEASE&#8217;s kernel.</p>
<p>I tried installing FreeBSD 6.4-RELEASE (32-bit) and it restarted properly. I was going to update the system to 6.3-STABLE &#8212; the server has to run 6.3, as 6.4 is not acceptable yet due to software compatibility issues &#8212; to see if the issue has been addressed in the -STABLE branch, but when I tried recompiling the kernel with PAE (in addition to SMP) support (still using -RELEASE kernel source tree), the reboot problem disappeared. YAY! I got it the fix by accident!</p>
<p>I&#8217;m not sure what is wrong since similar reboot problem seems to be popping around randomly since FreeBSD 5.X (after doing some Google searches). Browsing the PR database of FreeBSD didn&#8217;t help much either. Maybe if you know exactly what is wrong, you can share it here to help others with similar problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nirkabel.org/2009/01/18/freebsd-63-release-on-tyan-ta26-b5397-barebones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>errno.h problem</title>
		<link>http://blog.nirkabel.org/2009/01/18/errnoh-problem/</link>
		<comments>http://blog.nirkabel.org/2009/01/18/errnoh-problem/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 14:13:06 +0000</pubDate>
		<dc:creator>Andryan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.nirkabel.org/?p=94</guid>
		<description><![CDATA[If you see an error like the following when compiling, then most likely it&#8217;s the errno.h problem: /usr/bin/ld: errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS reference in envdir.o /lib64/libc.so.6: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [envdir] Error 1 If there is a conf-cc file, then [...]]]></description>
			<content:encoded><![CDATA[<p>If you see an error like the following when compiling, then most likely it&#8217;s the errno.h problem:</p>
<blockquote><p>/usr/bin/ld: errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS reference in envdir.o<br />
/lib64/libc.so.6: could not read symbols: Bad value<br />
collect2: ld returned 1 exit status<br />
make: *** [envdir] Error 1</p></blockquote>
<p>If there is a conf-cc file, then add &#8220;&#8211;include /path/to/errno.h&#8221; to the gcc line. Normally the file is at /usr/include/errno.h.</p>
<p>References:<br />
<a href="http://cr.yp.to/docs/unixport.html#errno" target="_blank">http://cr.yp.to/docs/unixport.html#errno</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nirkabel.org/2009/01/18/errnoh-problem/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linux Source-based Routing</title>
		<link>http://blog.nirkabel.org/2008/12/07/source-based-routing/</link>
		<comments>http://blog.nirkabel.org/2008/12/07/source-based-routing/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 16:01:26 +0000</pubDate>
		<dc:creator>Andryan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://andryan.wordpress.com/2007/03/18/source-based-routing/</guid>
		<description><![CDATA[References: http://www.widianto.org/2006/08/18/source-based-routing/]]></description>
			<content:encoded><![CDATA[<p>References:<br />
<a href="http://www.widianto.org/2006/08/18/source-based-routing/" target="_blank">http://www.widianto.org/2006/08/18/source-based-routing/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nirkabel.org/2008/12/07/source-based-routing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ext3 write barriers and write caching</title>
		<link>http://blog.nirkabel.org/2008/12/07/ext3-write-barriers-and-write-caching/</link>
		<comments>http://blog.nirkabel.org/2008/12/07/ext3-write-barriers-and-write-caching/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 14:48:19 +0000</pubDate>
		<dc:creator>Andryan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.nirkabel.org/?p=75</guid>
		<description><![CDATA[I was reading on ext4 articles just now and read its advantages compared to ext3, which is the most popular Linux file system today. I read that performance-wise, ext4 is faster at handling large files but does not provide significant improvements over real world tasks. ext4 is also backward-compatible to be mounted as ext3 as [...]]]></description>
			<content:encoded><![CDATA[<p>I was reading on <a href="http://en.wikipedia.org/wiki/Ext4" target="_blank">ext4</a> articles just now and read its advantages compared to <a href="http://en.wikipedia.org/wiki/Ext3" target="_blank">ext3</a>, which is the most popular Linux file system today. I read that performance-wise, ext4 is faster at handling large files but does not provide significant improvements over real world tasks. ext4 is also backward-compatible to be mounted as ext3 as long as extents are not used in that particular file system.</p>
<p>Out of the few advantages ext4 has over ext3, there is one feature which is very useful to ensure integrity of the file system, journal checksumming.</p>
<p>Quoting <a href="http://en.wikipedia.org/wiki/Ext3#No_checksumming_in_journal" target="_blank">Wikipedia&#8217;s article on ext3</a>:</p>
<blockquote><p>Ext3 does not do checksumming when writing to the journal. If barrier=1 is not enabled as a mount option (in /etc/fstab), and if the hardware is doing out-of-order write caching, one runs the risk of severe filesystem corruption during a crash.</p>
<p>Consider the following scenario: If hard disk writes are done out-of-order (due to modern hard disks caching writes in order to amortize write speeds), it is likely that one will write a commit block of a transaction before the other relevant blocks are written. If a power failure or unrecoverable crash should occur before the other blocks get written, the system will have to be rebooted. Upon reboot, the file system will replay the log as normal, and replay the &#8220;winners&#8221; (transactions with a commit block, including the invalid transaction above which happened to be tagged with a valid commit block). The unfinished disk write above will thus proceed, but using corrupt journal data. The file system will thus mistakenly overwrite normal data with corrupt data while replaying the journal. There is a test program available to trigger the problematic behavior. If checksums had been used, where the blocks of the &#8220;fake winner&#8221; transaction were tagged with a mutual checksum, the file system could have known better and not replayed the corrupt data onto the disk. Journal checksumming has been added to EXT4.</p>
<p>The ext3 barrier option is not enabled by default on almost all popular Linux distributions, and thus most distributions are at risk. In addition, filesystems going through the device mapper interface (including software RAID and LVM implementations) may not support barriers, and will issue a warning if that mount option is used. There are also some disks that do not properly implement the write cache flushing extension necessary for barriers to work, which causes a similar warning. In these situations, where barriers are not supported or practical, reliable write ordering is possible by turning off the disk&#8217;s write cache and using the data=journal mount option.</p></blockquote>
<p>ext3 apparently has a feature called write barriers which can help maintain integrity without journal checksumming, but there is a conflicting report over its performance impact.</p>
<p>Quoted from Andreas Dilger in <a href="http://archives.free.net.ph/message/20070518.190346.7a4c0f9f.en.html" target="_blank">a mail to ext3-users mailing list</a> in May 2007:</p>
<blockquote><p>Ideally, the jbd layer could be notified when the transaction blocks are flushed from device cache before writing the commit block, but the current linux mechanism to do this (write barriers) sucks perforance-wise (it sent throughput from 180MB/s to 7MB/s when enabled in our test systems). It was better to just turn off write cache entirely than to use barriers.</p></blockquote>
<p>contradicts <a href="http://hightechsorcery.com/2008/10/evaluating-performance-ext3-using-write-barriers-and-write-caching" target="_blank">this post made by </a><span class="submitted"><a href="http://hightechsorcery.com/2008/10/evaluating-performance-ext3-using-write-barriers-and-write-caching" target="_blank">specialj</a> in October 2008:</span></p>
<blockquote><p>Well, I think I see where ext3 gets its reputation for slow deletes. With the write cache off the delete performance is terrible, nearly 70% lower. It’s clear that enabling write barriers does something as the numbers are lower on a number of items (though not all). However it’s clear that write barriers is minor loss of performance compared to turning the write cache off. I think this leads me to consider how many servers I can run with just ext3 and md raid1 so as to keep the write cache enabled and the filesystem safe. I’ll have to weigh the performance gains against the benefits of using LVM (especially snapshots) and dm-crypt (which might have limited benefits on a server anyway).</p></blockquote>
<p>Maybe some improvements had been done at the write barriers feature of ext3 since Andreas Dilger&#8217;s post, but I couldn&#8217;t find anything on Google about it. I couldn&#8217;t even find a website which has proper documentation on ext3&#8242;s write barriers. At least now I have specialj&#8217;s Bonnie++ test results from 2 months ago and it&#8217;s good enough to convince me enabling write barriers on all of my servers which run md raid1.</p>
<p>Thanks, specialj! <img src='http://blog.nirkabel.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>References:<br />
<a href="http://hightechsorcery.com/2008/10/evaluating-performance-ext3-using-write-barriers-and-write-caching" target="_blank">http://hightechsorcery.com/2008/10/evaluating-performance-ext3-using-write-barriers-and-write-caching</a><br />
<a href="http://hightechsorcery.com/2008/06/linux-write-barriers-write-caching-lvm-and-filesystems" target="_blank">http://hightechsorcery.com/2008/06/linux-write-barriers-write-caching-lvm-and-filesystems</a><br />
<a href="http://archives.free.net.ph/message/20070518.190346.7a4c0f9f.en.html" target="_blank">http://archives.free.net.ph/message/20070518.190346.7a4c0f9f.en.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nirkabel.org/2008/12/07/ext3-write-barriers-and-write-caching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Painfully slow CentOS system</title>
		<link>http://blog.nirkabel.org/2008/12/06/painfully-slow-centos-system/</link>
		<comments>http://blog.nirkabel.org/2008/12/06/painfully-slow-centos-system/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 14:55:45 +0000</pubDate>
		<dc:creator>Andryan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.nirkabel.org/?p=72</guid>
		<description><![CDATA[Today I was installing CentOS 5.2 to a Tyan barebone server with Intel Xeon X3220 processor, 2GB of RAM, and 2 Western Digital SATA II 250GB HDD. I chose to use software RAID 1 for my /boot and /. I didn&#8217;t create RAID 1 for swap partition because it is useless and in fact it [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was installing CentOS 5.2 to a Tyan barebone server with Intel Xeon X3220 processor, 2GB of RAM, and 2 Western Digital SATA II 250GB HDD. I chose to use software RAID 1 for my /boot and /. I didn&#8217;t create RAID 1 for swap partition because it is useless and in fact it might slow down performance. It took more than 2 hours to complete the whole installation process even when I used bare minimum packages selection. The format process of / partition itself took quite a while to complete.</p>
<p>Once the installation was complete, it rebooted and I found a painfully slow newly-installed CentOS system. The keyboard response was slow as if I were connected to a remote server with 1 second latency. I wasn&#8217;t happy because this is a quad-core processor server with acceptable amount of RAM. When I looked at /proc/mdstat to see how the software RAID is doing, I noticed that the sync speed is only around 1000KB/s. I tried looking for solutions on Google and found <a href="http://lists.centos.org/pipermail/centos/2005-February/002068.html" target="_blank">this</a> and <a href="http://www.ducea.com/2006/06/25/increase-the-speed-of-linux-software-raid-reconstruction/" target="_blank">this</a>. The solution I got didn&#8217;t help increase the sync speed, nor the slow response I was getting typing on the console or remotely.</p>
<p>I then somehow managed to find another possible solution. I can&#8217;t remember how I finally got <a href="http://www.cyberciti.biz/faq/linux-sata-drive-displayed-as-devhda/" target="_blank">this solution</a> (thanks to nixCraft/CyberCiti). I didn&#8217;t notice that the hard drives were actually detected as hdX (IDE/PATA) instead of sdX (SATA). Now this makes sense because PATA is much slower than SATA. It turned out to be an issue with the hardware detection process. Somehow CentOS detected the HDDs and used PATA driver instead of SATA driver, so the devices were named hdX and treated as PATA hence the slow sync speed. I made the BIOS changes as mentioned in the solution and attempted another install, it was REALLY fast this time and the software RAID 1 sync speed was over 70000KB/s.</p>
<p>References:<br />
<a href="http://www.centos.org/modules/newbb/viewtopic.php?topic_id=16178" target="_blank">http://www.centos.org/modules/newbb/viewtopic.php?topic_id=16178</a><br />
<a href="http://lists.centos.org/pipermail/centos/2005-February/002068.html" target="_blank">http://lists.centos.org/pipermail/centos/2005-February/002068.html</a><br />
<a href="http://www.ducea.com/2006/06/25/increase-the-speed-of-linux-software-raid-reconstruction/" target="_blank">http://www.ducea.com/2006/06/25/increase-the-speed-of-linux-software-raid-reconstruction/</a><br />
<a href="http://www.cyberciti.biz/faq/linux-sata-drive-displayed-as-devhda/" target="_blank">http://www.cyberciti.biz/faq/linux-sata-drive-displayed-as-devhda/</a><br />
<a href="http://www.nodeofcrash.com/?p=57" target="_blank">http://www.nodeofcrash.com/?p=57</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nirkabel.org/2008/12/06/painfully-slow-centos-system/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
