<?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>Poojan&#039;s Tech Blog</title>
	<atom:link href="http://tech.poojanblog.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.poojanblog.com/blog</link>
	<description>Blog about software, gadgets, cloud computing</description>
	<lastBuildDate>Sat, 21 Jan 2012 22:38:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://tech.poojanblog.com/blog/?pushpress=hub'/>
		<item>
		<title>FreeBSD 9.0 post-install Samba performance</title>
		<link>http://tech.poojanblog.com/blog/unix-linux/freebsd-9-0-post-install-samba-performance/</link>
		<comments>http://tech.poojanblog.com/blog/unix-linux/freebsd-9-0-post-install-samba-performance/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 22:26:39 +0000</pubDate>
		<dc:creator>PoojanWagh</dc:creator>
				<category><![CDATA[Unix and Linux]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[dedup]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://tech.poojanblog.com/blog/?p=649</guid>
		<description><![CDATA[Note that the Samba shares resides in a ZFS pool with dedup turned on. Since the blocks that make up the file being sent are probably already on the pool, it&#8217;s not necessarily writing the block data to disk. Using the same method as last time: C:\Users\Poojan\Desktop&#62;time_recv.bat 1 file(s) copied. Took: 112.75 sec. C:\Users\Poojan\Desktop&#62;time_send 1 [...]]]></description>
			<content:encoded><![CDATA[<p>Note that the Samba shares resides in a ZFS pool with dedup turned on. Since the blocks that make up the file being sent are probably already on the pool, it&#8217;s not necessarily writing the block data to disk. Using the same method as <a title="Samba FreeBSD 8.2 benchmarks (pre-upgrade to FreeBSD 9.0)" href="http://tech.poojanblog.com/blog/unix-linux/samba-freebsd-8-2-benchmarks-pre-upgrade-to-freebsd-9-0/">last time</a>:</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_recv.bat<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 112.75 sec.</div></div>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_send<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 198.55 sec.</div></div>
<p>Whoa. That&#8217;s way worse than before. Let&#8217;s re-run each:</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_recv.bat<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 62.88 sec.</div></div>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_send<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 114.41 sec.</div></div>
<p>That&#8217;s better, but still not as good as before. One thing to note: I did not delete the file after the first run copied it over to the server. This shouldn&#8217;t matter much, since it&#8217;s in a snapshot of the zfs dataset somewhere, so the dedup algorithm should always return that the file doesn&#8217;t need to be saved to disk&#8211;although the algorithm itself probably takes quite a while to run on the server&#8217;s Atom D525 processor. Anyway, I deleted the file this time</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop&gt;time_send<br />
1 file(s) copied.<br />
<br />
Took: 107.59 sec.</div></div>
<p>I&#8217;ve turned off dedup on the server:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">server# </span>zfs <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">dedup</span>=off tank</div></div>
<p>I deleted the file on the server.</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_send<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 58.01 sec.</div></div>
<p>Running again a little later with dedup back on. Deleted the file on the server:</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_send<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 123.14 sec.</div></div>
<p>Deleted file again.</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_send<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 107.19 sec.</div></div>
<p>Note that the second run here is 16 seconds faster than the first. Seems like caching effects have a 16 second impact. The dedup on/off has a 9 second impact.</p>
<p>Check-summing on dedup makes a difference. I notice during the send transfer that with dedup on, kernel takes 100%  of a CPU (of 4 hyperthreads), whereas with it off, kernel only takes 3%. Since we have a multi-threaded CPU, Samba takes one thread and dedup (kernel) takes another. It doesn&#8217;t really impact things much (much being greater than 10%)&#8211;which is an assumption the ZFS designers made with dedup. The assumption being that CPU processing is more available than I/O bandwidth.</p>
<p>In my case, on my Atom D525 they may be about even. Note that the first time I ran the send, the time was 199 seconds. One hypotehsis is that in this case, the checksum had to run but the file still needed to be stored to disk&#8211;however, I&#8217;m almost certain that a snapshot of the data exists in the pool (I snapshot every 15 minutes). Another possibility is that there are some dedup data structures that zfs needs to create on the first write, and so the data structures were being created in addition to the checksums being run. I&#8217;m basically speculating here.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.poojanblog.com/blog/unix-linux/freebsd-9-0-post-install-samba-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subsonic can&#8217;t bind to address on FreeBSD dual stack</title>
		<link>http://tech.poojanblog.com/blog/unix-linux/subsonic-cant-bind-to-address-on-freebsd-dual-stack/</link>
		<comments>http://tech.poojanblog.com/blog/unix-linux/subsonic-cant-bind-to-address-on-freebsd-dual-stack/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 06:27:09 +0000</pubDate>
		<dc:creator>PoojanWagh</dc:creator>
				<category><![CDATA[Unix and Linux]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[subsonic]]></category>

		<guid isPermaLink="false">http://tech.poojanblog.com/blog/?p=644</guid>
		<description><![CDATA[Either build Java without IPv6, or you need the following in /etc/rc.conf: tomcat60_enable=&#34;YES&#34; tomcat60_java_opts=&#34;-Djava.awt.headless=true -Djava.net.preferIPv4Stack=true&#34; (The java.awt.headless is if you&#8217;re running without an X console.) Also, delete everyting in /usr/local/apache-tomcat-6.0/webapps/ except for subsonic and subsonic.war and rename these ROOT and ROOT.war respectively. Make sure www:www is the owner of everything (including your subsonic databases in [...]]]></description>
			<content:encoded><![CDATA[<p>Either build Java without IPv6, or you need the following in /etc/rc.conf:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tomcat60_enable=&quot;YES&quot;<br />
tomcat60_java_opts=&quot;-Djava.awt.headless=true -Djava.net.preferIPv4Stack=true&quot;</div></div>
<p>(The <code class="codecolorer text default"><span class="text">java.awt.headless</span></code> is if you&#8217;re running without an X console.)</p>
<p>Also, delete everyting in <code class="codecolorer text default"><span class="text">/usr/local/apache-tomcat-6.0/webapps/</span></code> except for <code class="codecolorer text default"><span class="text">subsonic</span></code> and <code class="codecolorer text default"><span class="text">subsonic.war</span></code> and rename these <code class="codecolorer text default"><span class="text">ROOT</span></code> and <code class="codecolorer text default"><span class="text">ROOT.war</span></code> respectively. Make sure <code class="codecolorer text default"><span class="text">www:www</span></code> is the owner of everything (including your subsonic databases in <code class="codecolorer text default"><span class="text">/var/subsonic</span></code>).</p>
<p>While you&#8217;re here, edit <code class="codecolorer text default"><span class="text">webapps/ROOT/WEB-INF/classes/ehcache.xml</span></code> and change to (just an example):</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cache</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;musicFolderCache&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">maxElementsInMemory</span>=<span style="color: #ff0000;">&quot;128&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">eternal</span>=<span style="color: #ff0000;">&quot;true&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">diskPersistent</span>=<span style="color: #ff0000;">&quot;true&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">overflowToDisk</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cache</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;chatCache&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">maxElementsInMemory</span>=<span style="color: #ff0000;">&quot;128&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">eternal</span>=<span style="color: #ff0000;">&quot;true&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">diskPersistent</span>=<span style="color: #ff0000;">&quot;true&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">overflowToDisk</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://tech.poojanblog.com/blog/unix-linux/subsonic-cant-bind-to-address-on-freebsd-dual-stack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Corsair USB 3.0 16GB CMFVYGT3-16GB speed test</title>
		<link>http://tech.poojanblog.com/blog/desk/corsair-usb-3-0-16gb-cmfvygt3-16gb-speed-test/</link>
		<comments>http://tech.poojanblog.com/blog/desk/corsair-usb-3-0-16gb-cmfvygt3-16gb-speed-test/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 04:53:15 +0000</pubDate>
		<dc:creator>PoojanWagh</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[drive]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://tech.poojanblog.com/blog/?p=638</guid>
		<description><![CDATA[Looks basically like that other Corsair I bought a month ago. I basically bought another one so I can set up my FreeBSD root as a mirror of two 16 GB USB drives that are relatively fast for USB (even in a USB 2.0 port). This is in a USB 3.0 port: ----------------------------------------------------------------------- CrystalDiskMark 3.0.1 [...]]]></description>
			<content:encoded><![CDATA[<p>Looks basically like that <a title="USB 3.0 (SuperSpeed) flash/SSD drive tests" href="http://tech.poojanblog.com/blog/desk/usb-3-0-superspeed-flashssd-drive-tests/">other Corsair </a>I bought a month ago. I basically bought another one so I can set up my FreeBSD root as a mirror of two 16 GB USB drives that are relatively fast for USB (even in a USB 2.0 port). This is in a USB 3.0 port:</p>
<pre>-----------------------------------------------------------------------
CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo
                           Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

           Sequential Read :    80.246 MB/s
          Sequential Write :    21.428 MB/s
         Random Read 512KB :    76.034 MB/s
        Random Write 512KB :     1.573 MB/s
    Random Read 4KB (QD=1) :    10.279 MB/s [  2509.5 IOPS]
   Random Write 4KB (QD=1) :     0.030 MB/s [     7.4 IOPS]
   Random Read 4KB (QD=32) :    10.862 MB/s [  2651.8 IOPS]
  Random Write 4KB (QD=32) :     0.032 MB/s [     7.8 IOPS]

  Test : 1000 MB [I: 0.0% (0.0/14.9 GB)] (x9)
  Date : 2012/01/19 22:51:41
    OS : Windows 7 Home Premium Edition SP1 [6.1 Build 7601] (x64)</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.poojanblog.com/blog/desk/corsair-usb-3-0-16gb-cmfvygt3-16gb-speed-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Allow LAN-only password login to sshd</title>
		<link>http://tech.poojanblog.com/blog/unix-linux/allow-lan-password-login-to-sshd/</link>
		<comments>http://tech.poojanblog.com/blog/unix-linux/allow-lan-password-login-to-sshd/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 06:03:26 +0000</pubDate>
		<dc:creator>PoojanWagh</dc:creator>
				<category><![CDATA[Unix and Linux]]></category>
		<category><![CDATA[sshd]]></category>

		<guid isPermaLink="false">http://tech.poojanblog.com/blog/?p=631</guid>
		<description><![CDATA[See here and then add this to /etc/sshsshd_config: Match Address 192.168.1.0/24 PasswordAuthentication yes This allows clients on the local network to login using password authentication while limiting the Internet in general to key-based authentication.]]></description>
			<content:encoded><![CDATA[<p>See <a title="Locking down a publicly-exposed ssh server" href="http://tech.poojanblog.com/blog/unix-linux/locking-down-a-publicly-exposed-ssh-server/">here</a> and then add this to <code class="codecolorer text default"><span class="text">/etc/sshsshd_config</span></code>:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Match Address 192.168.1.0/24<br />
PasswordAuthentication yes</div></div>
<p>This allows clients on the local network to login using password authentication while limiting the Internet in general to key-based authentication.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.poojanblog.com/blog/unix-linux/allow-lan-password-login-to-sshd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Samba FreeBSD 8.2 benchmarks (pre-upgrade to FreeBSD 9.0)</title>
		<link>http://tech.poojanblog.com/blog/unix-linux/samba-freebsd-8-2-benchmarks-pre-upgrade-to-freebsd-9-0/</link>
		<comments>http://tech.poojanblog.com/blog/unix-linux/samba-freebsd-8-2-benchmarks-pre-upgrade-to-freebsd-9-0/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 14:56:20 +0000</pubDate>
		<dc:creator>PoojanWagh</dc:creator>
				<category><![CDATA[Unix and Linux]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[iozone]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://tech.poojanblog.com/blog/?p=621</guid>
		<description><![CDATA[I&#8217;m about to upgrade to FreeBSD. While I csup the latest RELENG-9.0 branch, I&#8217;m looking at my Samba performance on 8.2. I&#8217;m measuring a copy of FreeBSD-8.2-RELEASE-i386-dvd1.iso to the Samba server using the following batch file (taken from here): @echo off set starttime=%TIME% set startcsec=%STARTTIME:~9,2% set startsecs=%STARTTIME:~6,2% set startmins=%STARTTIME:~3,2% set starthour=%STARTTIME:~0,2% set /a starttime=(%starthour%*60*60*100)+(%startmins%*60*100)+(%startsecs%*100)+ (%startcsec%) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m about to upgrade to FreeBSD. While I csup the latest RELENG-9.0 branch, I&#8217;m looking at my Samba performance on 8.2.</p>
<p>I&#8217;m measuring a copy of <code class="codecolorer text default"><span class="text">FreeBSD-8.2-RELEASE-i386-dvd1.iso</span></code> to the Samba server using the following batch file (taken from <a title="stack overflow" href="http://stackoverflow.com/questions/673523/how-to-measure-execution-time-of-command-in-windows-command-line">here</a>):</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #33cc33;">@</span><a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">echo</span></a> off<br />
<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> starttime=<span style="color: #33cc33;">%</span><span style="color: #448888;">TIME</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> startcsec=<span style="color: #33cc33;">%</span><span style="color: #448888;">STARTTIME:~9,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> startsecs=<span style="color: #33cc33;">%</span><span style="color: #448888;">STARTTIME:~6,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> startmins=<span style="color: #33cc33;">%</span><span style="color: #448888;">STARTTIME:~3,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> starthour=<span style="color: #33cc33;">%</span><span style="color: #448888;">STARTTIME:~0,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> /a starttime=<span style="color: #33cc33;">(%</span><span style="color: #448888;">starthour</span><span style="color: #33cc33;">%</span>*60*60*100<span style="color: #33cc33;">)</span>+<span style="color: #33cc33;">(%</span><span style="color: #448888;">startmins</span><span style="color: #33cc33;">%</span>*60*100<span style="color: #33cc33;">)</span>+<span style="color: #33cc33;">(%</span><span style="color: #448888;">startsecs</span><span style="color: #33cc33;">%</span>*100<span style="color: #33cc33;">)</span>+<br />
<span style="color: #33cc33;">(%</span><span style="color: #448888;">startcsec</span><span style="color: #33cc33;">%)</span><br />
<br />
:<span style="color: #b100b1; font-weight: bold;">TimeThis</span><br />
<a href="http://www.ss64.com/nt/copy.html"><span style="color: #b1b100; font-weight: bold;">copy</span></a> C:\Users\Poojan\Desktop\FreeBSD-8.2-RELEASE-i386-dvd1.iso.xz \\SERVER\Poojan\Downloads<br />
<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> endtime=<span style="color: #33cc33;">%</span><span style="color: #448888;">time</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> endcsec=<span style="color: #33cc33;">%</span><span style="color: #448888;">endTIME:~9,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> endsecs=<span style="color: #33cc33;">%</span><span style="color: #448888;">endTIME:~6,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> endmins=<span style="color: #33cc33;">%</span><span style="color: #448888;">endTIME:~3,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> endhour=<span style="color: #33cc33;">%</span><span style="color: #448888;">endTIME:~0,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <span style="color: #33cc33;">%</span><span style="color: #448888;">endhour</span><span style="color: #33cc33;">%</span> <a href="http://www.ss64.com/nt/lss.html"><span style="color: #000000; font-weight: bold;">LSS</span></a> <span style="color: #33cc33;">%</span><span style="color: #448888;">starthour</span><span style="color: #33cc33;">%</span> <a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> /a endhour+=24<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> /a endtime=<span style="color: #33cc33;">(%</span><span style="color: #448888;">endhour</span><span style="color: #33cc33;">%</span>*60*60*100<span style="color: #33cc33;">)</span>+<span style="color: #33cc33;">(%</span><span style="color: #448888;">endmins</span><span style="color: #33cc33;">%</span>*60*100<span style="color: #33cc33;">)</span>+<span style="color: #33cc33;">(%</span><span style="color: #448888;">endsecs</span><span style="color: #33cc33;">%</span>*100<span style="color: #33cc33;">)</span>+<span style="color: #33cc33;">(%</span><span style="color: #448888;">endcsec</span><span style="color: #33cc33;">%)</span><br />
<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> /a timetaken= <span style="color: #33cc33;">(</span> <span style="color: #33cc33;">%</span><span style="color: #448888;">endtime</span><span style="color: #33cc33;">%</span> - <span style="color: #33cc33;">%</span><span style="color: #448888;">starttime</span><span style="color: #33cc33;">%</span> <span style="color: #33cc33;">)</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> /a timetakens= <span style="color: #33cc33;">%</span><span style="color: #448888;">timetaken</span><span style="color: #33cc33;">%</span> / 100<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> timetaken=<span style="color: #33cc33;">%</span><span style="color: #448888;">timetakens</span><span style="color: #33cc33;">%</span>.<span style="color: #33cc33;">%</span><span style="color: #448888;">timetaken:~-2</span><span style="color: #33cc33;">%</span><br />
<br />
<a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">echo</span></a>.<br />
<a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">echo</span></a> Took: <span style="color: #33cc33;">%</span><span style="color: #448888;">timetaken</span><span style="color: #33cc33;">%</span> sec.</div></div>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_copy.bat<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 77.34 sec.</div></div>
<p>That&#8217;s a 1751164811 byte file, so that&#8217;s 21.59 MiB/s. To receive:</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #33cc33;">@</span><a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">echo</span></a> off<br />
<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> starttime=<span style="color: #33cc33;">%</span><span style="color: #448888;">TIME</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> startcsec=<span style="color: #33cc33;">%</span><span style="color: #448888;">STARTTIME:~9,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> startsecs=<span style="color: #33cc33;">%</span><span style="color: #448888;">STARTTIME:~6,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> startmins=<span style="color: #33cc33;">%</span><span style="color: #448888;">STARTTIME:~3,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> starthour=<span style="color: #33cc33;">%</span><span style="color: #448888;">STARTTIME:~0,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> /a starttime=<span style="color: #33cc33;">(%</span><span style="color: #448888;">starthour</span><span style="color: #33cc33;">%</span>*60*60*100<span style="color: #33cc33;">)</span>+<span style="color: #33cc33;">(%</span><span style="color: #448888;">startmins</span><span style="color: #33cc33;">%</span>*60*100<span style="color: #33cc33;">)</span>+<span style="color: #33cc33;">(%</span><span style="color: #448888;">startsecs</span><span style="color: #33cc33;">%</span>*100<span style="color: #33cc33;">)</span>+<br />
<span style="color: #33cc33;">(%</span><span style="color: #448888;">startcsec</span><span style="color: #33cc33;">%)</span><br />
<br />
:<span style="color: #b100b1; font-weight: bold;">TimeThis</span><br />
<a href="http://www.ss64.com/nt/copy.html"><span style="color: #b1b100; font-weight: bold;">copy</span></a> \\SERVER\Downloads\FreeBSD-9.0-RELEASE-amd64-dvd1\FreeBSD-9.0-RELEASE-amd64-dvd1.iso  C:\Users\Poojan\Desktop<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> endtime=<span style="color: #33cc33;">%</span><span style="color: #448888;">time</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> endcsec=<span style="color: #33cc33;">%</span><span style="color: #448888;">endTIME:~9,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> endsecs=<span style="color: #33cc33;">%</span><span style="color: #448888;">endTIME:~6,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> endmins=<span style="color: #33cc33;">%</span><span style="color: #448888;">endTIME:~3,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> endhour=<span style="color: #33cc33;">%</span><span style="color: #448888;">endTIME:~0,2</span><span style="color: #33cc33;">%</span><br />
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <span style="color: #33cc33;">%</span><span style="color: #448888;">endhour</span><span style="color: #33cc33;">%</span> <a href="http://www.ss64.com/nt/lss.html"><span style="color: #000000; font-weight: bold;">LSS</span></a> <span style="color: #33cc33;">%</span><span style="color: #448888;">starthour</span><span style="color: #33cc33;">%</span> <a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> /a endhour+=24<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> /a endtime=<span style="color: #33cc33;">(%</span><span style="color: #448888;">endhour</span><span style="color: #33cc33;">%</span>*60*60*100<span style="color: #33cc33;">)</span>+<span style="color: #33cc33;">(%</span><span style="color: #448888;">endmins</span><span style="color: #33cc33;">%</span>*60*100<span style="color: #33cc33;">)</span>+<span style="color: #33cc33;">(%</span><span style="color: #448888;">endsecs</span><span style="color: #33cc33;">%</span>*100<span style="color: #33cc33;">)</span>+<span style="color: #33cc33;">(%</span><span style="color: #448888;">endcsec</span><span style="color: #33cc33;">%)</span><br />
<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> /a timetaken= <span style="color: #33cc33;">(</span> <span style="color: #33cc33;">%</span><span style="color: #448888;">endtime</span><span style="color: #33cc33;">%</span> - <span style="color: #33cc33;">%</span><span style="color: #448888;">starttime</span><span style="color: #33cc33;">%</span> <span style="color: #33cc33;">)</span><br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> /a timetakens= <span style="color: #33cc33;">%</span><span style="color: #448888;">timetaken</span><span style="color: #33cc33;">%</span> / 100<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> timetaken=<span style="color: #33cc33;">%</span><span style="color: #448888;">timetakens</span><span style="color: #33cc33;">%</span>.<span style="color: #33cc33;">%</span><span style="color: #448888;">timetaken:~-2</span><span style="color: #33cc33;">%</span><br />
<br />
<a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">echo</span></a>.<br />
<a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">echo</span></a> Took: <span style="color: #33cc33;">%</span><span style="color: #448888;">timetaken</span><span style="color: #33cc33;">%</span> sec.</div></div>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_recv.bat<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 109.23 sec.</div></div>
<p>This is a 2,388,531,200 byte file, so that&#8217;s 20.85 MiB/s.</p>
<p>I&#8217;ll repeat these later, when the csup is done&#8211;just in case the download on the server is hurting things.</p>
<p>OK: it&#8217;s done. Re-running:</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_recv.bat<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 52.72 sec.<br />
<br />
C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_recv.bat<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 43.23 sec.</div></div>
<p>So, that&#8217;s 43.2 MiB/s and 52.69 MiB/s. Trying it again, I get 42.09 MiB/s.</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_send.bat<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 73.38 sec.<br />
<br />
C:\Users\Poojan\Desktop<span style="color: #33cc33;">&gt;</span>time_send.bat<br />
1 file<span style="color: #33cc33;">(</span>s<span style="color: #33cc33;">)</span> copied.<br />
<br />
Took: 71.85 sec.</div></div>
<p>So, these are a bit more consistent: 22.76 MiB/s and 23.24 MiB/s.  Running it a third time gives 16.4 MiB, but I was running gstat, top, etc. while that was going.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.poojanblog.com/blog/unix-linux/samba-freebsd-8-2-benchmarks-pre-upgrade-to-freebsd-9-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set up vimage/vnet jail on FreeBSD 8.2</title>
		<link>http://tech.poojanblog.com/blog/unix-linux/set-up-vimagevnet-jail-on-freebsd-8-2/</link>
		<comments>http://tech.poojanblog.com/blog/unix-linux/set-up-vimagevnet-jail-on-freebsd-8-2/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 06:17:31 +0000</pubDate>
		<dc:creator>PoojanWagh</dc:creator>
				<category><![CDATA[Unix and Linux]]></category>
		<category><![CDATA[epair]]></category>
		<category><![CDATA[jail]]></category>
		<category><![CDATA[vimage]]></category>
		<category><![CDATA[vnet]]></category>

		<guid isPermaLink="false">http://tech.poojanblog.com/blog/?p=595</guid>
		<description><![CDATA[With epair, there are two interfaces created epair0a and eapir0b that are direct connections between each other (like an Ethernet cable). When used with jails using an ifconfig vnet command, one side (epair0b for example) sgoes inside the jail. Since the other side of this virtual direct-connection stays on the outside of the jail, the [...]]]></description>
			<content:encoded><![CDATA[<p>With epair, there are two interfaces created <code class="codecolorer text default"><span class="text">epair0a</span></code> and <code class="codecolorer text default"><span class="text">eapir0b</span></code> that are direct connections between each other (like an Ethernet cable). When used with jails using an <code class="codecolorer text default"><span class="text">ifconfig</span></code> <code class="codecolorer text default"><span class="text">vnet</span></code> command, one side (<code class="codecolorer text default"><span class="text">epair0b</span></code> for example) sgoes inside the jail. Since the other side of this virtual direct-connection stays on the outside of the jail, the <code class="codecolorer text default"><span class="text">epair</span></code> pairs act as an Ethernet tunnel inside/outside the jail. You can use firewall rules either outside the jail or inside the jail to control traffic.</p>
<p><span id="more-595"></span></p>
<p>I&#8217;m using ezjail-admin with the following patch to /etc/rc.d/jail (taken from the <a title="Information About Vimage in jail" href="http://forums.freebsd.org/showthread.php?t=9006" target="_blank">FreeBSD Forums</a>):</p>
<div class="codecolorer-container diff default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #991111;">&lt;pre&gt;<span style="color: #440088;">638,639c638,644</span></span><br />
<span style="color: #991111;">&lt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eval $<span style="">&#123;</span>_setfib<span style="">&#125;</span> jail $<span style="">&#123;</span>_flags<span style="">&#125;</span> -i $<span style="">&#123;</span>_rootdir<span style="">&#125;</span> $<span style="">&#123;</span>_hostname<span style="">&#125;</span> \</span><br />
<span style="color: #991111;">&lt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \&quot;$<span style="">&#123;</span>_addrl<span style="">&#125;</span>\&quot; $<span style="">&#123;</span>_exec_start<span style="">&#125;</span> &gt; $<span style="">&#123;</span>_tmp_jail<span style="">&#125;</span> 2&gt;&amp;1</span><br />
<span style="color: #888822;">---<br />
<span style="color: #00b000;">&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if <span style="">&#91;</span> -z &quot;$<span style="">&#123;</span>_addrl<span style="">&#125;</span>&quot; <span style="">&#93;</span> ; then</span></span><br />
<span style="color: #00b000;">&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eval $<span style="">&#123;</span>_setfib<span style="">&#125;</span> jail -i $<span style="">&#123;</span>_flags<span style="">&#125;</span> path=$<span style="">&#123;</span>_rootdir<span style="">&#125;</span> host.hostname=$<span style="">&#123;</span>_hostname<span style="">&#125;</span> \</span><br />
<span style="color: #00b000;">&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; command=$<span style="">&#123;</span>_exec_start<span style="">&#125;</span> &gt; $<span style="">&#123;</span>_tmp_jail<span style="">&#125;</span> 2&gt;&amp;1</span><br />
<span style="color: #00b000;">&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</span><br />
<span style="color: #00b000;">&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eval $<span style="">&#123;</span>_setfib<span style="">&#125;</span> jail -i $<span style="">&#123;</span>_flags<span style="">&#125;</span> $<span style="">&#123;</span>_rootdir<span style="">&#125;</span> $<span style="">&#123;</span>_hostname<span style="">&#125;</span> \</span><br />
<span style="color: #00b000;">&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \&quot;$<span style="">&#123;</span>_addrl<span style="">&#125;</span>\&quot; $<span style="">&#123;</span>_exec_start<span style="">&#125;</span> &gt; $<span style="">&#123;</span>_tmp_jail<span style="">&#125;</span> 2&gt;&amp;1</span><br />
<span style="color: #00b000;">&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fi</span></div></div>
</pre>
<p>For example, I have two jails. I create the interfaces like so in <code class="codecolorer text default"><span class="text">/etc/rc.conf</span></code>:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># ezjail with vimage/epair config<br />
# http://forums.freebsd.org/showthread.php?t=9006<br />
# http://lifanov.com/doc/vimage.html<br />
cloned_interfaces=&quot;epair0 epair1 bridge0&quot;<br />
ifconfig_epair0a=&quot;up&quot;<br />
ifconfig_epair1a=&quot;up&quot;<br />
ifconfig_bridge0=&quot;name jailbridge addm re0 up&quot;</div></div>
<p>On the inside of the jail, I just need to set the IP address of the <code class="codecolorer text default"><span class="text">epair0b</span></code> and <code class="codecolorer text default"><span class="text">epair1b</span></code> interfaces. I'm using ezjail Here's a sample <code class="codecolorer text default"><span class="text">/usr/local/etc/ezjail/&lt;jail_name&gt;</span></code>, in this case for a subsonic server:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># To specify the start up order of your ezjails, use these lines to<br />
# create a Jail dependency tree. See rcorder(8) for more details.<br />
#<br />
# PROVIDE: standard_ezjail<br />
# REQUIRE:<br />
# BEFORE:<br />
#<br />
<br />
# vnet stuff: http://forums.freebsd.org/showthread.php?t=9006<br />
# http://lifanov.com/doc/vimage.html<br />
# http://zewaren.net/site/?q=node/71<br />
export jail_subsonic_flags=&quot;-c vnet name=subsonic&quot;<br />
#export jail_subsonic_exec_prestart0=&quot;ifconfig epair0 create&quot;<br />
#export jail_subsonic_exec_prestart1=&quot;ifconfig epair0a up&quot;<br />
<br />
# sometiems rc.conf doesn't do this:<br />
export jail_subsonic_exec_prestart0=&quot;ifconfig jailbridge addm re0&quot;<br />
export jail_subsonic_exec_prestart1=&quot;ifconfig jailbridge addm epair0a up&quot;<br />
export jail_subsonic_exec_prestart2=&quot;mount_nullfs -o ro /tank/music /usr/jails/subsonic/var/music&quot;<br />
export jail_subsonic_exec_prestart3=&quot;mount_nullfs -o rw /tank/music/Playlists /usr/jails/subsonic/var/playlists&quot;<br />
<br />
export jail_subsonic_exec_poststart0=&quot;ifconfig epair0b vnet subsonic&quot;<br />
#export jail_subsonic_exec_poststart1=&quot;jexec subsonic /etc/rc.d/ipfw start&quot;<br />
export jail_subsonic_exec_poststart1=&quot;jexec subsonic ifconfig lo0 127.0.0.1&quot;<br />
export jail_subsonic_exec_poststart2=&quot;jexec subsonic ifconfig epair0b 192.168.1.9 netmask 255.255.255.0&quot;<br />
export jail_subsonic_exec_poststart3=&quot;jexec subsonic route add default 192.168.1.1&quot;<br />
export jail_subsonic_exec_poststop0=&quot;umount /usr/jails/subsonic/var/music&quot;<br />
export jail_subsonic_exec_poststop1=&quot;umount /usr/jails/subsonic/var/playlists&quot;<br />
<br />
export jail_subsonic_hostname=&quot;subsonic&quot;<br />
export jail_subsonic_ip=&quot;&quot;<br />
export jail_subsonic_rootdir=&quot;/usr/jails/subsonic&quot;<br />
export jail_subsonic_exec_start=&quot;/bin/sh /etc/rc&quot;       # /bin/sh /etc/rc by default<br />
export jail_subsonic_exec_stop=&quot;&quot;<br />
export jail_subsonic_mount_enable=&quot;YES&quot;<br />
export jail_subsonic_devfs_enable=&quot;YES&quot;<br />
export jail_subsonic_devfs_ruleset=&quot;devfsrules_jail2&quot;<br />
export jail_subsonic_procfs_enable=&quot;NO&quot;<br />
export jail_subsonic_fdescfs_enable=&quot;NO&quot;<br />
export jail_subsonic_image=&quot;&quot;<br />
export jail_subsonic_imagetype=&quot;&quot;<br />
export jail_subsonic_attachparams=&quot;&quot;<br />
export jail_subsonic_attachblocking=&quot;&quot;<br />
export jail_subsonic_forceblocking=&quot;&quot;<br />
export jail_subsonic_zfs_datasets=&quot;&quot;<br />
export jail_subsonic_cpuset=&quot;&quot;<br />
export jail_subsonic_fib=&quot;&quot;</div></div>
<p>Also, don't forget that you need something like the following within your jail's <code class="codecolorer text default"><span class="text">/etc/resolv.conf</span></code>:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">nameserver 192.168.1.1</div></div>
<p>I'm using FreeBSD's IPFW. I have it set up so that it by default passes all packets. I can then control all firewall rules from the host (rather than in the jail). The last line of my host rules is a deny all to implementing the blocking on the host. I leave default rules within the jails (with epair/vnet each jail gets its own firewall rules). I have things set up like:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">oif=&quot;re0&quot;       # out interface<br />
jail_brif=&quot;jailbridge&quot;  # jail interface<br />
subsonic_ip=&quot;192.168.1.9&quot; # jail IP<br />
ipdns=&quot;192.168.1.1&quot;<br />
ks=&quot;keep-state&quot;<br />
cmd=&quot;/sbin/ipfw -q add &quot;<br />
<br />
...<br />
<br />
$cmd 02000 allow ip from any to any via $oif<br />
$cmd 03300 allow log icmp from $ipdns to $subsonic_ip $ks<br />
$cmd 03310 allow log icmp from $ipdns to $jabber_ip $ks<br />
$cmd 03350 allow log icmp from $subsonic_ip to $ipdns $ks<br />
$cmd 03355 allow log icmp from $jabber_ip to $ipdns $ks<br />
# DNS:<br />
$cmd 03400 allow udp from $subsonic_ip to $ipdns 53 $ks<br />
# subsonic:<br />
$cmd 04500 allow ip from any to $subsonic_ip dst-port 8180 setup $ks<br />
# allow last.fm scrobbling (etc):<br />
$cmd 06600 allow log ip from $subsonic_ip to any dst-port 80 setup $ks<br />
$cmd 06700 allow log ip from $subsonic_ip to any dst-port 443 setup $ks<br />
$cmd 65500 deny log ip from any to any</div></div>
<p>It's been a while since I set this up, and I'm not sure if the allow all on <code class="codecolorer text default"><span class="text">$oif</span></code> (command 02000) is really necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.poojanblog.com/blog/unix-linux/set-up-vimagevnet-jail-on-freebsd-8-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZFS performance metrics with iozone</title>
		<link>http://tech.poojanblog.com/blog/unix-linux/zfs-performance-metrics-with-iozone/</link>
		<comments>http://tech.poojanblog.com/blog/unix-linux/zfs-performance-metrics-with-iozone/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 22:11:28 +0000</pubDate>
		<dc:creator>PoojanWagh</dc:creator>
				<category><![CDATA[Unix and Linux]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[gnop]]></category>
		<category><![CDATA[gpart]]></category>
		<category><![CDATA[iozone]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://tech.poojanblog.com/blog/?p=582</guid>
		<description><![CDATA[I ran iozone on many different ZFS pool configurations, to get an idea of which drives are best for L2ARC (cache) and the ZIL. I also wanted to get an idea of whether using gpart affects performance. The configurations shown in the tables below have the formation [cache]_[gpart/gnop]_[zil]. Where [cache] is the L2ARC type. [gpart/gnop] [...]]]></description>
			<content:encoded><![CDATA[<p>I ran iozone on many different ZFS pool configurations, to get an idea of which drives are best for L2ARC (cache) and the ZIL. I also wanted to get an idea of whether using gpart affects performance.</p>
<p>The configurations shown in the tables below have the formation [cache]_[gpart/gnop]_[zil]. Where [cache] is the L2ARC type. [gpart/gnop] says whether it&#8217;s set up under gpart, or direct. I call the direct method gnop since I have to initially use gnop to force a 4K sector size (I&#8217;m using the Western Digital Advanced Format drives for my pool). When I use gpart, I layer gnop on top of the initial creation to force 4K sector size. [zil] specifies the ZFS intent log device.</p>
<p>The disk types are:</p>
<p>Sandisk-2x8GB: these are two 8GB SATA SSD&#8217;s connected to the same controller (a PCI SATAII controller).<br />
STT-2x8GB-usb: these are two USB 3.0 8GB drives connected to USB 2.0 ports.</p>
<p>I ran iozone using the command <code class="codecolorer text default"><span class="text">iozone -a -g 8G</span></code>, and then looking only at the file sizes 1G or above. I have the whole results to make sure nothing funny happens for smaller file sizes. The results below are the average over all file sizes 1G or above and all record sizes performed at those file sizes.</p>
<table>
<tr>
<th>Config</th>
<th>Writer</th>
<th>Re-Writer</th>
<th>Reader</th>
<th>Re-Reader</th>
<th>Random Read</th>
<th>Random Write</th>
<th>Backward Read</th>
<th>Record Rewrite</th>
<th>Stride Read</th>
<th>Fwrite</th>
<th>Re-fwrite</th>
<th>Fread</th>
<th>Re-fread</th>
</tr>
<tr>
<td>STT-2x8GB-USB-cache_gnop_no-zil</td>
<td>75582</td>
<td>68640</td>
<td>57186</td>
<td>48690</td>
<td>35297</td>
<td>67435</td>
<td>43228</td>
<td>1018166</td>
<td>38217</td>
<td>68893</td>
<td>67935</td>
<td>53560</td>
<td>44769</td>
</tr>
<tr>
<td>SanDisk-2x8GB-cache_gnop_no-zil</td>
<td>76220</td>
<td>71511</td>
<td>73913</td>
<td>76134</td>
<td>72732</td>
<td>70053</td>
<td>60786</td>
<td>1001725</td>
<td>75326</td>
<td>69631</td>
<td>70712</td>
<td>67502</td>
<td>70613</td>
</tr>
<tr>
<td>corsair-16GB-usb-cache_gnop_no-zil</td>
<td>76683</td>
<td>72090</td>
<td>57963</td>
<td>49971</td>
<td>36033</td>
<td>68870</td>
<td>44593</td>
<td>1028012</td>
<td>37445</td>
<td>69079</td>
<td>71713</td>
<td>55417</td>
<td>46366</td>
</tr>
<tr>
<td>no-cache_gnop_no-zil</td>
<td>78223</td>
<td>72358</td>
<td>77134</td>
<td>78507</td>
<td>45160</td>
<td>67282</td>
<td>54004</td>
<td>1002780</td>
<td>44819</td>
<td>69790</td>
<td>70766</td>
<td>73954</td>
<td>72714</td>
</tr>
<tr>
<td>Kingston-64GB-sata-cache_gnop_SanDisk-2x8GB-zil</td>
<td>60654</td>
<td>53490</td>
<td>84669</td>
<td>93001</td>
<td>94166</td>
<td>60960</td>
<td>68226</td>
<td>1048091</td>
<td>88588</td>
<td>54835</td>
<td>54295</td>
<td>83393</td>
<td>90911</td>
</tr>
<tr>
<td>Kingston-64GB-sata-cache_gnop_no-zil</td>
<td>77465</td>
<td>72126</td>
<td>85473</td>
<td>93171</td>
<td>94973</td>
<td>69970</td>
<td>62113</td>
<td>995109</td>
<td>95945</td>
<td>71804</td>
<td>72567</td>
<td>75761</td>
<td>82436</td>
</tr>
<tr>
<td>Kingston-64GB-sata-cache_gpart_SanDisk-2x8GB-zil</td>
<td>60144</td>
<td>55071</td>
<td>87213</td>
<td>94107</td>
<td>95649</td>
<td>59756</td>
<td>65990</td>
<td>1012787</td>
<td>86949</td>
<td>55410</td>
<td>55610</td>
<td>83307</td>
<td>91718</td>
</tr>
<tr>
<td>Kingston-64GB-sata-cache_gpart_no-zil</td>
<td>76406</td>
<td>72145</td>
<td>82577</td>
<td>90769</td>
<td>92336</td>
<td>70305</td>
<td>64775</td>
<td>1019952</td>
<td>97475</td>
<td>72893</td>
<td>72343</td>
<td>75447</td>
<td>85428</td>
</tr>
</table>
<p>I also computed the delta in bandwidth for a re-action versus action. For example, Delta Re-Write is throughput of re-write &#8211; throughput of write.</p>
<table>
<tr>
<th>Config</th>
<th>Delta Re-read</th>
<th>Delta Re-Write</th>
<th>Delta Re-fwrite</th>
<th>Delta Re-fread</th>
</tr>
<tr>
<td>iozone_STT-2x8GB-USB-cache_gnop_no-zil</td>
<td>-8495</td>
<td>-6941</td>
<td>-958</td>
<td>-8791</td>
</tr>
<tr>
<td>iozone_SanDisk-2x8GB-cache_gnop_no-zil</td>
<td>2220</td>
<td>-4709</td>
<td>1081</td>
<td>3111</td>
</tr>
<tr>
<td>iozone_corsair-16GB-usb-cache_gnop_no-zil</td>
<td>-7991</td>
<td>-4593</td>
<td>2634</td>
<td>-9051</td>
</tr>
<tr>
<td>iozone_no-cache_gnop_no-zil</td>
<td>1372</td>
<td>-5865</td>
<td>975</td>
<td>-1239</td>
</tr>
<tr>
<td>iozone_Kingston-64GB-sata-cache_gnop_SanDisk-2x8GB-zil</td>
<td>8331</td>
<td>-7164</td>
<td>-539</td>
<td>7517</td>
</tr>
<tr>
<td>iozone_Kingston-64GB-sata-cache_gnop_no-zil</td>
<td>7697</td>
<td>-5338</td>
<td>762</td>
<td>6674</td>
</tr>
<tr>
<td>iozone_Kingston-64GB-sata-cache_gpart_SanDisk-2x8GB-zil</td>
<td>6893</td>
<td>-5072</td>
<td>200</td>
<td>8410</td>
</tr>
<tr>
<td>iozone_Kingston-64GB-sata-cache_gpart_no-zil</td>
<td>8192</td>
<td>-4260</td>
<td>-550</td>
<td>9980</td>
</tr>
</table>
<p>Despite some things I&#8217;ve read, USB 2.0 devices can adversely affect the performance. One can see that many cases with the USB devices used as caches, the re-read delta is 8MBps slower.</p>
<p>Another curiousity is that the ZIL devices actually slow things down for writes (and re-writes). I&#8217;m not sure if iozone uses synchronous writes, but I did see that the ZIL devices had activity during the tests, so I must conclude that something is going on there. Since I&#8217;m using this mostly as a Samba server, I&#8217;m probably going to skip the ZIL in my setup.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.poojanblog.com/blog/unix-linux/zfs-performance-metrics-with-iozone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating static adaX mappings for FreeBSD drives</title>
		<link>http://tech.poojanblog.com/blog/unix-linux/creating-static-adax-mappings-for/</link>
		<comments>http://tech.poojanblog.com/blog/unix-linux/creating-static-adax-mappings-for/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 16:48:05 +0000</pubDate>
		<dc:creator>PoojanWagh</dc:creator>
				<category><![CDATA[Unix and Linux]]></category>
		<category><![CDATA[ada]]></category>
		<category><![CDATA[ahci]]></category>
		<category><![CDATA[cam]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[scbus]]></category>
		<category><![CDATA[siis]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://tech.poojanblog.com/blog/?p=568</guid>
		<description><![CDATA[I recently had a problem with ZFS. I went back to not using glabel, mainly because I wanted to force 4KB sector alignment on my drives and therefore used a gnop trick. About a month after doing so, I shuffled my drives around. I had ada4 and ada5 set up in a mirror configuration. At [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had a problem with ZFS. I went back to not using glabel, mainly because I wanted to force 4KB sector alignment on my drives and therefore used a gnop trick. About a month after doing so, I shuffled my drives around. I had ada4 and ada5 set up in a mirror configuration. At some point, I moved a drive around and ada4 became ada3 and ada3 became ada2. I could have (and should have) used the methods below to re-assign ada3/ada4 to their right positions. Anyway, I&#8217;m doing it now.</p>
<p><span id="more-568"></span></p>
<p>Here&#8217;s the controller/bus enumeration before any changes:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Dec &nbsp;3 17:05:35 server kernel: ahci0: &nbsp;mem 0xfdefe000-0xfdefffff irq 17 at device 0.0 on pci2<br />
Dec &nbsp;3 17:05:35 server kernel: ahci0: [ITHREAD]<br />
Dec &nbsp;3 17:05:35 server kernel: ahci0: AHCI v1.00 with 2 3Gbps ports, Port Multiplier supported<br />
Dec &nbsp;3 17:05:35 server kernel: ahcich0: &nbsp;at channel 0 on ahci0<br />
Dec &nbsp;3 17:05:35 server kernel: ahcich0: [ITHREAD]<br />
Dec &nbsp;3 17:05:35 server kernel: ahcich1: &nbsp;at channel 1 on ahci0<br />
Dec &nbsp;3 17:05:35 server kernel: ahcich1: [ITHREAD]<br />
Dec &nbsp;3 17:05:35 server kernel: atapci0: &nbsp;port 0xdf00-0xdf07,0xde00-0xde03,0xdd00-0xdd07,0xdc00-0xdc03,0xdb00-0xdb0f irq 18 at device<br />
Dec &nbsp;3 17:05:35 server kernel: atapci0: [ITHREAD]<br />
Dec &nbsp;3 17:05:35 server kernel: ata2: &nbsp;on atapci0<br />
Dec &nbsp;3 17:05:35 server kernel: ata2: [ITHREAD]<br />
...<br />
Dec &nbsp;3 17:05:35 server kernel: siis0: &nbsp;port 0xcf00-0xcf0f mem 0xfdcff000-0xfdcff07f,0xfdcf0000-0xfdcf7fff irq 20 at device 0.0 on pci3<br />
Dec &nbsp;3 17:05:35 server kernel: siis0: [ITHREAD]<br />
Dec &nbsp;3 17:05:35 server kernel: siisch0: &nbsp;at channel 0 on siis0<br />
Dec &nbsp;3 17:05:35 server kernel: siisch0: [ITHREAD]<br />
Dec &nbsp;3 17:05:35 server kernel: siisch1: &nbsp;at channel 1 on siis0<br />
Dec &nbsp;3 17:05:35 server kernel: siisch1: [ITHREAD]<br />
Dec &nbsp;3 17:05:35 server kernel: siisch2: &nbsp;at channel 2 on siis0<br />
Dec &nbsp;3 17:05:35 server kernel: siisch2: [ITHREAD]<br />
Dec &nbsp;3 17:05:35 server kernel: siisch3: &nbsp;at channel 3 on siis0<br />
Dec &nbsp;3 17:05:35 server kernel: siisch3: [ITHREAD]<br />
...Dec &nbsp;3 17:11:28 server kernel: ahci1: &nbsp;port 0xfa00-0xfa07,0xf900-0xf903,0xf800-0xf807,0xf700-0xf703,0xf600-0xf60f mem 0xfdffe000-0xfdff<br />
Dec &nbsp;3 17:11:28 server kernel: ahci1: [ITHREAD]<br />
Dec &nbsp;3 17:11:28 server kernel: ahci1: AHCI v1.10 with 4 3Gbps ports, Port Multiplier not supported<br />
Dec &nbsp;3 17:11:28 server kernel: ahcich2: &nbsp;at channel 0 on ahci1<br />
Dec &nbsp;3 17:11:28 server kernel: ahcich2: [ITHREAD]<br />
Dec &nbsp;3 17:11:28 server kernel: ahcich3: &nbsp;at channel 1 on ahci1<br />
Dec &nbsp;3 17:11:28 server kernel: ahcich3: [ITHREAD]<br />
Dec &nbsp;3 17:11:28 server kernel: ahcich4: &nbsp;at channel 2 on ahci1<br />
Dec &nbsp;3 17:11:28 server kernel: ahcich4: [ITHREAD]<br />
Dec &nbsp;3 17:11:28 server kernel: ahcich5: &nbsp;at channel 3 on ahci1<br />
Dec &nbsp;3 17:11:28 server kernel: ahcich5: [ITHREAD]</div></div>
<p>Curiously, I don&#8217;t think ahci1 (the Intel South Bridge) physically exposes all 4 channels on the motherboard. Only 2 SATA ports are available. Which doesn&#8217;t make sense, since Gigabyte explicitly put another 2-port SATA controller on the board</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># Intel SATA controller (South Bridge)<br />
hint.scbus.0.at=&quot;ahcich2&quot;<br />
hint.scbus.0.bus=&quot;0&quot;<br />
hint.scbus.1.at=&quot;ahcich3&quot;<br />
hint.scbus.1.bus=&quot;0&quot;<br />
# JMicron SATA controller (Gigabyte Motherboard)<br />
hint.scbus.2.at=&quot;ahcich0&quot;<br />
hint.scbus.2.bus=&quot;0&quot;<br />
hint.scbus.3.at=&quot;ahcich1&quot;<br />
hint.scbus.3.bus=&quot;0&quot;<br />
# SiiS controller (PCI slot)<br />
hint.scbus.4.at=&quot;siisch0&quot;<br />
hint.scbus.4.bus=&quot;0&quot;<br />
hint.scbus.5.at=&quot;siisch1&quot;<br />
hint.scbus.5.bus=&quot;0&quot;<br />
hint.scbus.6.at=&quot;siisch2&quot;<br />
hint.scbus.6.bus=&quot;0&quot;<br />
hint.scbus.7.at=&quot;siisch3&quot;<br />
hint.scbus.7.bus=&quot;0&quot;</div></div>
<p>Originally, I had something like:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hint.scbus.0.at=&quot;ahci0&quot;<br />
hint.scbus.0.bus=&quot;0&quot;</div></div>
<p>However, it seems like a &#8220;bus&#8221; as defined by hit.scbus isn&#8217;t the same as a SATA port. The system seems to enumerate all the SATA ports (from many controllers) on the same driver as ahcich0, ahcich1, etc.</p>
<p>Anyway, I rebooted and found that the above works</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ada0 at ahcich2 bus 0 scbus0 target 0 lun 0<br />
ada0: &nbsp;ATA-8 SATA 2.x device<br />
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)<br />
ada0: Command Queueing enabled<br />
ada0: 1430799MB (2930277168 512 byte sectors: 16H 63S/T 16383C)<br />
ada1 at ahcich3 bus 0 scbus1 target 0 lun 0<br />
ada1: &nbsp;ATA-8 SATA 2.x device<br />
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)<br />
ada1: Command Queueing enabled<br />
ada1: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)<br />
ada2 at ahcich1 bus 0 scbus3 target 0 lun 0<br />
ada2: &nbsp;ATA-8 SATA 2.x device<br />
ada2: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)<br />
ada2: Command Queueing enabled<br />
ada2: 61057MB (125045424 512 byte sectors: 16H 63S/T 16383C)<br />
ada3 at siisch0 bus 0 scbus4 target 0 lun 0<br />
ada3: &nbsp;ATA-7 SATA 1.x device<br />
ada3: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 512bytes)<br />
ada3: 7641MB (15649200 512 byte sectors: 16H 63S/T 15525C)<br />
ada4 at siisch1 bus 0 scbus5 target 0 lun 0<br />
ada4: &nbsp;ATA-7 SATA 1.x device<br />
ada4: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 512bytes)<br />
ada4: 7641MB (15649200 512 byte sectors: 16H 63S/T 15525C)</div></div>
<p>You&#8217;ll notice that scbus2 is unconnected. ada1 is on scbus1 and ada2 is on scbus3. That&#8217;s where the problem arises. If I were to connect another hard drive to scbus2, it would become the new ada2 and the previous ada2 would be shifted to ada3. Here&#8217;s how to assign them non-contiguous numbers:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hint.ada.0.at=&quot;scbus0&quot;<br />
hint.ada.0.target=&quot;0&quot;<br />
hint.ada.0.unit=&quot;0&quot;<br />
hint.ada.1.at=&quot;scbus1&quot;<br />
hint.ada.1.target=&quot;0&quot;<br />
hint.ada.1.unit=&quot;0&quot;<br />
hint.ada.2.at=&quot;scbus2&quot;<br />
hint.ada.2.target=&quot;0&quot;<br />
hint.ada.2.unit=&quot;0&quot;<br />
hint.ada.3.at=&quot;scbus3&quot;<br />
hint.ada.3.target=&quot;0&quot;<br />
hint.ada.3.unit=&quot;0&quot;<br />
hint.ada.4.at=&quot;scbus4&quot;<br />
hint.ada.4.target=&quot;0&quot;<br />
hint.ada.4.unit=&quot;0&quot;<br />
hint.ada.5.at=&quot;scbus5&quot;<br />
hint.ada.5.target=&quot;0&quot;<br />
hint.ada.5.unit=&quot;0&quot;<br />
hint.ada.6.at=&quot;scbus6&quot;<br />
hint.ada.6.target=&quot;0&quot;<br />
hint.ada.6.unit=&quot;0&quot;<br />
hint.ada.7.at=&quot;scbus7&quot;<br />
hint.ada.7.target=&quot;0&quot;<br />
hint.ada.7.unit=&quot;0&quot;</div></div>
<p>Looks good. I get ada0, ada1, and skip ada2</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Dec 17 10:24:10 server kernel: ada0 at ahcich2 bus 0 scbus0 target 0 lun 0<br />
Dec 17 10:24:10 server kernel: ada0: &nbsp;ATA-8 SATA 2.x device<br />
Dec 17 10:24:10 server kernel: ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)<br />
Dec 17 10:24:10 server kernel: ada0: Command Queueing enabled<br />
Dec 17 10:24:10 server kernel: ada0: 1430799MB (2930277168 512 byte sectors: 16H 63S/T 16383C)<br />
Dec 17 10:24:10 server kernel: ada1 at ahcich3 bus 0 scbus1 target 0 lun 0<br />
Dec 17 10:24:10 server kernel: ada1: &nbsp;ATA-8 SATA 2.x device<br />
Dec 17 10:24:10 server kernel: ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)<br />
Dec 17 10:24:10 server kernel: ada1: Command Queueing enabled<br />
Dec 17 10:24:10 server kernel: ada1: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)<br />
Dec 17 10:24:10 server kernel: ada3 at ahcich1 bus 0 scbus3 target 0 lun 0<br />
Dec 17 10:24:10 server kernel: ada3: &nbsp;ATA-8 SATA 2.x device<br />
Dec 17 10:24:10 server kernel: ada3: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)<br />
Dec 17 10:24:10 server kernel: ada3: Command Queueing enabled<br />
Dec 17 10:24:10 server kernel: ada3: 61057MB (125045424 512 byte sectors: 16H 63S/T 16383C)<br />
Dec 17 10:24:10 server kernel: ada4 at siisch0 bus 0 scbus4 target 0 lun 0<br />
Dec 17 10:24:10 server kernel: ada4: &nbsp;ATA-7 SATA 1.x device<br />
Dec 17 10:24:10 server kernel: ada4: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 512bytes)<br />
Dec 17 10:24:10 server kernel: ada4: 7641MB (15649200 512 byte sectors: 16H 63S/T 15525C)<br />
Dec 17 10:24:10 server kernel: ada5 at siisch1 bus 0 scbus5 target 0 lun 0<br />
Dec 17 10:24:10 server kernel: ada5: &nbsp;ATA-7 SATA 1.x device<br />
Dec 17 10:24:10 server kernel: ada5: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 512bytes)<br />
Dec 17 10:24:10 server kernel: ada5: 7641MB (15649200 512 byte sectors: 16H 63S/T 15525C)</div></div>
<p>Another thing I ran up against was that my 2 drives are not the same size. One is a 1.5TB and one is a 2TB. When this mess happened, the system put the 2TB in the place of the 1.5 TB (I think). This would have been fine, except, I couldn&#8217;t then re-add the 1.5TB drive as a replacement for the 2TB drive as it will only accept something the same size or bigger. This has been documented before <a href="http://www.freebsddiary.org/zfs-with-gpart.php" title="ZFS: don't give it all your disk space" target="_blank">here</a>. For now, I&#8217;m throwing caution to the wind and not doing a gpart/glabel. Maybe I&#8217;ll regret it later, but I want to try this out (ZFS native only) for now. I&#8217;ve seen quite a bit on the forums that ZFS should handle everything natively.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.poojanblog.com/blog/unix-linux/creating-static-adax-mappings-for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>USB 3.0 (SuperSpeed) flash/SSD drive tests</title>
		<link>http://tech.poojanblog.com/blog/desk/usb-3-0-superspeed-flashssd-drive-tests/</link>
		<comments>http://tech.poojanblog.com/blog/desk/usb-3-0-superspeed-flashssd-drive-tests/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 03:03:29 +0000</pubDate>
		<dc:creator>PoojanWagh</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[drives]]></category>
		<category><![CDATA[USB 3.0]]></category>
		<category><![CDATA[USB drive]]></category>

		<guid isPermaLink="false">http://tech.poojanblog.com/blog/?p=562</guid>
		<description><![CDATA[I ran these on my (8GB RAM) Sandy Bridge Core i7-2600K (not overclocked) H67 machine. I compared a newly bought USB 3.0 16 GB drive to an internal Kingston SATA and a previously purchased 8GB USB 3.0. I also compare the USB 3.0 drives to their performance with USB 2.0 port speeds. USB 3.0 Corsair [...]]]></description>
			<content:encoded><![CDATA[<p>I ran these on my (8GB RAM) Sandy Bridge Core i7-2600K (not overclocked) H67 machine. I compared a newly bought USB 3.0 16 GB drive to an internal Kingston SATA and a previously purchased 8GB USB 3.0. I also compare the USB 3.0 drives to their performance with USB 2.0 port speeds.</p>
<p><span id="more-562"></span></p>
<h3>USB 3.0 Corsair running in USB 3.0 (SuperSpeed)</h3>
<p>Connected using a USB 3.0 port on the motherboard</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">-----------------------------------------------------------------------<br />
CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo<br />
Crystal Dew World : http://crystalmark.info/<br />
-----------------------------------------------------------------------<br />
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]<br />
<br />
Sequential Read : 80.449 MB/s<br />
Sequential Write : 22.111 MB/s<br />
Random Read 512KB : 75.093 MB/s<br />
Random Write 512KB : 1.461 MB/s<br />
Random Read 4KB (QD=1) : 8.626 MB/s [ 2106.0 IOPS]<br />
Random Write 4KB (QD=1) : 0.032 MB/s [ 7.8 IOPS]<br />
Random Read 4KB (QD=32) : 9.520 MB/s [ 2324.3 IOPS]<br />
Random Write 4KB (QD=32) : 0.033 MB/s [ 8.1 IOPS]<br />
<br />
Test : 1000 MB [I: 0.0% (0.0/15.0 GB)] (x9)<br />
Date : 2011/12/14 1:35:02<br />
OS : Windows 7 Home Premium Edition SP1 [6.1 Build 7601] (x64)</div></div>
<p>Huh. Not bad for $25 (hopefully $15 after MIR)</p>
<h3>Baseline SSD</h3>
<p>Kingston Virtex SV100S264G SATA II 64GB SSD (Windows system drive)</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">-----------------------------------------------------------------------<br />
CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo<br />
Crystal Dew World : http://crystalmark.info/<br />
-----------------------------------------------------------------------<br />
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]<br />
<br />
Sequential Read : 231.550 MB/s<br />
Sequential Write : 53.748 MB/s<br />
Random Read 512KB : 165.969 MB/s<br />
Random Write 512KB : 40.462 MB/s<br />
Random Read 4KB (QD=1) : 11.864 MB/s [ 2896.5 IOPS]<br />
Random Write 4KB (QD=1) : 8.366 MB/s [ 2042.5 IOPS]<br />
Random Read 4KB (QD=32) : 13.051 MB/s [ 3186.2 IOPS]<br />
Random Write 4KB (QD=32) : 8.230 MB/s [ 2009.4 IOPS]<br />
<br />
Test : 1000 MB [C: 90.9% (54.1/59.5 GB)] (x9)<br />
Date : 2011/12/14 1:57:32<br />
OS : Windows 7 Home Premium Edition SP1 [6.1 Build 7601] (x64)</div></div>
<h3>USB 3.0 Corsair running in USB 2.0 (high speed)</h3>
<p>Plugged into a USB 2.0 port on the same machine</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">-----------------------------------------------------------------------<br />
CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo<br />
Crystal Dew World : http://crystalmark.info/<br />
-----------------------------------------------------------------------<br />
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]<br />
<br />
Sequential Read : 35.516 MB/s<br />
Sequential Write : 21.985 MB/s<br />
Random Read 512KB : 34.413 MB/s<br />
Random Write 512KB : 1.528 MB/s<br />
Random Read 4KB (QD=1) : 5.678 MB/s [ 1386.3 IOPS]<br />
Random Write 4KB (QD=1) : 0.031 MB/s [ 7.7 IOPS]<br />
Random Read 4KB (QD=32) : 6.155 MB/s [ 1502.7 IOPS]<br />
Random Write 4KB (QD=32) : 0.038 MB/s [ 9.2 IOPS]<br />
<br />
Test : 1000 MB [I: 0.0% (0.0/15.0 GB)] (x9)<br />
Date : 2011/12/14 12:36:54<br />
OS : Windows 7 Home Premium Edition SP1 [6.1 Build 7601] (x64)</div></div>
<p>&nbsp;</p>
<h3>For comparison SuperTech USB 3.0 8 GB in USB 3.0 (SuperSpeed)</h3>
<p>I ran a USB 2.0 comparison on this drive <a title="More flash USB disk tests" href="http://tech.poojanblog.com/blog/desk/more-flash-usb-disk-tests/">before</a>, except this time I&#8217;m running USB 3.0.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">-----------------------------------------------------------------------<br />
CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo<br />
Crystal Dew World : http://crystalmark.info/<br />
-----------------------------------------------------------------------<br />
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]<br />
<br />
Sequential Read : 54.342 MB/s<br />
Sequential Write : 15.022 MB/s<br />
Random Read 512KB : 52.370 MB/s<br />
Random Write 512KB : 1.022 MB/s<br />
Random Read 4KB (QD=1) : 12.895 MB/s [ 3148.1 IOPS]<br />
Random Write 4KB (QD=1) : 0.006 MB/s [ 1.4 IOPS]<br />
Random Read 4KB (QD=32) : 14.166 MB/s [ 3458.5 IOPS]<br />
Random Write 4KB (QD=32) : 0.007 MB/s [ 1.6 IOPS]<br />
<br />
Test : 1000 MB [I: 0.0% (0.0/7484.0 MB)] (x9)<br />
Date : 2011/12/14 13:30:25<br />
OS : Windows 7 Home Premium Edition SP1 [6.1 Build 7601] (x64)</div></div>
<h3>For comparison, SuperTech USB 3.0 8 GB in USB 2.0 (high speed)</h3>
<p>Plugged into a USB 2.0 port on the same machine (replicates <a title="More flash USB disk tests" href="http://tech.poojanblog.com/blog/desk/more-flash-usb-disk-tests/">previous test</a>).</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">-----------------------------------------------------------------------<br />
CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo<br />
Crystal Dew World : http://crystalmark.info/<br />
-----------------------------------------------------------------------<br />
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]<br />
<br />
Sequential Read : 35.173 MB/s<br />
Sequential Write : 15.042 MB/s<br />
Random Read 512KB : 34.991 MB/s<br />
Random Write 512KB : 0.910 MB/s<br />
Random Read 4KB (QD=1) : 6.544 MB/s [ 1597.6 IOPS]<br />
Random Write 4KB (QD=1) : 0.006 MB/s [ 1.5 IOPS]<br />
Random Read 4KB (QD=32) : 6.758 MB/s [ 1649.8 IOPS]<br />
Random Write 4KB (QD=32) : 0.006 MB/s [ 1.5 IOPS]<br />
<br />
Test : 1000 MB [I: 0.0% (0.0/7484.0 MB)] (x9)<br />
Date : 2011/12/14 14:49:29<br />
OS : Windows 7 Home Premium Edition SP1 [6.1 Build 7601] (x64)</div></div>
<p>The idea here is that I&#8217;m going to replace the ZFS cache on my server (which is presently a 64 GB SSD identical to the Kingston SSD benchmarked above) with the Corsair 16 GB USB 3.0. It will be running in USB 2.0, since my Atom D525 doesn&#8217;t have USB 3.0. However, I&#8217;d rather take the 64 GB SSD and stick it in a laptop, where the performance (and power) improvement will be more noticed. Right now, the L2ARC stats on the ZFS cache show around a 5% hit rate, so moving to a lower capacity cache probably won&#8217;t hurt too much. However, the slower read/write speeds probably will hurt a bit. We&#8217;ll see.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.poojanblog.com/blog/desk/usb-3-0-superspeed-flashssd-drive-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Putting current directory in xterm/rxvt title</title>
		<link>http://tech.poojanblog.com/blog/unix-linux/putting-current-directory-in-xtermrxvt-title/</link>
		<comments>http://tech.poojanblog.com/blog/unix-linux/putting-current-directory-in-xtermrxvt-title/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 16:36:58 +0000</pubDate>
		<dc:creator>PoojanWagh</dc:creator>
				<category><![CDATA[Unix and Linux]]></category>
		<category><![CDATA[rxvt]]></category>
		<category><![CDATA[tcsh]]></category>
		<category><![CDATA[title]]></category>
		<category><![CDATA[xterm]]></category>

		<guid isPermaLink="false">http://tech.poojanblog.com/blog/?p=545</guid>
		<description><![CDATA[From http://www.ibiblio.org/pub/Linux/docs/HOWTO/Xterm-Title Here&#8217;s mine (tcsh): switch &#40;$TERM&#41; &#160; case &#34;xterm*&#34;: &#160; case &#34;rxvt*&#34;: &#160; case &#34;screen*&#34;: &#160; &#160; set prompt=&#34;%{\033]0;%n@%m:%~\007%}tcsh%# &#34; &#160; &#160; breaksw &#160; default: &#160; &#160; set prompt=&#34;tcsh%# &#34; &#160; &#160; breaksw endsw Instead of casing screen, I should probably check for $DISPLAY. Someday.]]></description>
			<content:encoded><![CDATA[<p>From http://www.ibiblio.org/pub/Linux/docs/HOWTO/Xterm-Title</p>
<p>Here&#8217;s mine (tcsh):</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">switch <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$TERM</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;xterm*&quot;</span>:<br />
&nbsp; <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;rxvt*&quot;</span>:<br />
&nbsp; <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;screen*&quot;</span>:<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">prompt</span>=<span style="color: #ff0000;">&quot;%{\033]0;%n@%m:%~\007%}tcsh%# &quot;</span><br />
&nbsp; &nbsp; breaksw<br />
&nbsp; default:<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">prompt</span>=<span style="color: #ff0000;">&quot;tcsh%# &quot;</span><br />
&nbsp; &nbsp; breaksw<br />
endsw</div></div>
<p>Instead of casing screen, I should probably check for $DISPLAY. Someday.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.poojanblog.com/blog/unix-linux/putting-current-directory-in-xtermrxvt-title/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

