<?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>Viktors Rotanovs &#187; High Performance, Security, Operations</title>
	<atom:link href="http://rotanovs.com/category/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://rotanovs.com</link>
	<description></description>
	<lastBuildDate>Thu, 13 May 2010 21:52:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HBase Easy Import/Export</title>
		<link>http://rotanovs.com/performance/hbase-easy-importexport/</link>
		<comments>http://rotanovs.com/performance/hbase-easy-importexport/#comments</comments>
		<pubDate>Thu, 13 May 2010 21:35:46 +0000</pubDate>
		<dc:creator>viktors</dc:creator>
				<category><![CDATA[High Performance, Security, Operations]]></category>

		<guid isPermaLink="false">http://rotanovs.com/?p=359</guid>
		<description><![CDATA[Export from and import to HBase easily using Hadoop Tool interface.]]></description>
			<content:encoded><![CDATA[<p><strong>Export</strong> a table from HBase into <strong>local</strong> filesystem:<br />
<code><small>bin/hbase org.apache.hadoop.hbase.mapreduce.Driver export table_name /local/path</small></code></p>
<p><strong>Export</strong> a table from HBase into <strong>HDFS</strong>:<br />
<code><small>bin/hbase org.apache.hadoop.hbase.mapreduce.Driver export table_name hdfs://namenode/path</small></code></p>
<p><strong>Import</strong> a table from a local dump into <strong>existing</strong> HBase table:<br />
<code><small>bin/hbase org.apache.hadoop.hbase.mapreduce.Driver import table_name /local/path</small></code></p>
<p>It&#8217;s a good idea to count and compare number of rows before exporting and after importing:<br />
<code><small>bin/hbase org.apache.hadoop.hbase.mapreduce.Driver rowcounter table_name</small></code><br />
Number of rows is visible in Hadoop counter called ROWS, like in output below:<br />
<code><small><br />
10/05/13 21:26:41 INFO mapred.JobClient:   org.apache.hadoop.hbase.mapreduce.RowCounter$RowCounterMapper$Counters<br />
10/05/13 21:26:41 INFO mapred.JobClient:     <strong>ROWS=103821</strong><br />
</small></code></p>
<p>Alternatively, you can use Hadoop Tool interface, but it may complain about missing classes if hadoop-env.sh is not configured properly. For example, when launched without arguments, it displays available options:<br />
<code><small>hadoop jar hbase-0.20.3.jar<br />
An example program must be given as the first argument.<br />
Valid program names are:<br />
  export: Write table data to HDFS.<br />
  hsf2sf: Bulk convert 0.19 HStoreFiles to 0.20 StoreFiles<br />
  import: Import data written by Export.<br />
  rowcounter: Count rows in HBase table<br />
</small></code></p>
<p>HBase dump is one ore more Hadoop <span>SequenceFile</span>s, you can inspect its contents with something like:<br />
<code><small><br />
hadoop fs -fs local -text table_name/part-m-00000<br />
</small></code></p>
]]></content:encoded>
			<wfw:commentRss>http://rotanovs.com/performance/hbase-easy-importexport/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lighttpd vs Tux: nice() patch</title>
		<link>http://rotanovs.com/performance/lighttpd-nice-patch/</link>
		<comments>http://rotanovs.com/performance/lighttpd-nice-patch/#comments</comments>
		<pubDate>Fri, 25 Mar 2005 21:34:35 +0000</pubDate>
		<dc:creator>viktors</dc:creator>
				<category><![CDATA[High Performance, Security, Operations]]></category>

		<guid isPermaLink="false">http://idealab/uncategorized/2005/03/25/not-so-nice-lighttpd/</guid>
		<description><![CDATA[How to make user-space lighttpd almost as fast as kernel-space TUX, without patching Linux kernel.]]></description>
			<content:encoded><![CDATA[<p>Lighttpd by default can be slower than TUX. Why? Because TUX runs inside Linux kernel and has the highest possible priority, while lighttpd is just ordinary userspace process. Solution? Make lighttpd not so nice:<br />
<code>nice -20 /opt/lighttpd/sbin/lighttpd ...</code><br />
Lighttpd&#8217;s Adaptive Spawning users will immediately notice a problem: all processes spawned by lighttpd will also run with the highest priority. That&#8217;s not good, since any PHP or other FastCGI process will be able to slow down lighttpd. Solution is quite simple: to restore back niceness level before launching a child process. Here&#8217;s a patch for that:</p>
<blockquote><p><a href="/lighttpd/lighttpd_nice.patch">lighttpd_nice.patch</a></p></blockquote>
<p>Any other ideas how this could be done?</p>
]]></content:encoded>
			<wfw:commentRss>http://rotanovs.com/performance/lighttpd-nice-patch/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Lighttpd initgroups()</title>
		<link>http://rotanovs.com/performance/lighttpd-initgroups/</link>
		<comments>http://rotanovs.com/performance/lighttpd-initgroups/#comments</comments>
		<pubDate>Mon, 21 Mar 2005 23:37:45 +0000</pubDate>
		<dc:creator>viktors</dc:creator>
				<category><![CDATA[High Performance, Security, Operations]]></category>

		<guid isPermaLink="false">http://idealab/uncategorized/2005/03/22/multiple-groups/</guid>
		<description><![CDATA[Permissions fix for Adaptive Spawning.]]></description>
			<content:encoded><![CDATA[<p>While converting my website to lighttpd, I noticed that php processes launched by adaptive spawning can&#8217;t access certain files anymore. Small investigation has shown that the problem was caused by user <em>httpd</em> not joining groups specified in <em>/etc/groups</em>. Adding initgroups() call before calling setuid() helped, here&#8217;s the patch:</p>
<blockquote><p><a href="http://rotanovs.com/lighttpd/lighttpd_initgroups.patch"></a></p></blockquote>
<p>Please let me know if you&#8217;ve experienced the same problem with spawn-fcgi program.</p>
]]></content:encoded>
			<wfw:commentRss>http://rotanovs.com/performance/lighttpd-initgroups/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lighttpd Config Includes</title>
		<link>http://rotanovs.com/performance/lighttpd-configs/</link>
		<comments>http://rotanovs.com/performance/lighttpd-configs/#comments</comments>
		<pubDate>Wed, 16 Feb 2005 15:06:51 +0000</pubDate>
		<dc:creator>viktors</dc:creator>
				<category><![CDATA[High Performance, Security, Operations]]></category>

		<guid isPermaLink="false">http://idealab/uncategorized/2005/02/16/multiple-lighttpd-installations-no-headache-anymore/</guid>
		<description><![CDATA[Configuration management tips for lighttpd, useful when having 50+ servers.]]></description>
			<content:encoded><![CDATA[<p>Some of us techies have to maintain 50 or more webservers, which usually leads to in-house Linux distros. With Apache, you could throw in .htaccess for each website without having to change base system. It&#8217;s not that simple with Lighttpd, that&#8217;s why I needed some script to join global configuration file with a local one. Some perl coding and it&#8217;s ready:</p>
<blockquote><p><a href="http://rotanovs.com/lighttpd/joincfg">http://rotanovs.com/lighttpd/joincfg</a></p></blockquote>
<p>Instructions:</p>
<ol>
<li>Install Tie-IxHash perl module:
<ul>
<li>Gentoo users: <code>emerge Tie-IxHash</code></li>
<li>Other distros:<br />
<code>perl -MCPAN -eshell<br />
cpan&gt; install Tie::IxHash</code></li>
</ul>
</li>
<li>Backup your configuration</li>
<li>Call joincfg like follows, then start lighttpd:<br />
<code>joincfg global.conf local.conf &gt; new.conf<br />
lighttpd -f new.conf<br />
</code></li>
</ol>
<p>As usually, NO WARRANTIES!</p>
]]></content:encoded>
			<wfw:commentRss>http://rotanovs.com/performance/lighttpd-configs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lighttpd DoS Tool</title>
		<link>http://rotanovs.com/performance/lighttpd-dos-tool/</link>
		<comments>http://rotanovs.com/performance/lighttpd-dos-tool/#comments</comments>
		<pubDate>Tue, 01 Feb 2005 13:00:04 +0000</pubDate>
		<dc:creator>viktors</dc:creator>
				<category><![CDATA[High Performance, Security, Operations]]></category>

		<guid isPermaLink="false">http://idealab/uncategorized/2005/02/01/lighttpd-dos-tool/</guid>
		<description><![CDATA[Tiny Perl script creating denial-of-service on lighttpd.]]></description>
			<content:encoded><![CDATA[<p>After seeing lighttpd grow to hundreds of megabytes I couldn&#8217;t sleep. It was like tiny chicken has grown into huge monster. After some experimenting I managed to grow monsters myself:</p>
<blockquote><p><a href="http://rotanovs.com/lighttpd/lighttpd_dos_tool">http://rotanovs.com/lighttpd/lighttpd_dos_tool</a></p>
</blockquote>
<p>Basically the source of the problem is that lighttpd ignores max request size setting and reads data until it becomes huge and eats all available memory.</p>
<p>Return to Apache? No way. Lighttpd problems are usually solved lightning fast &#8211; so a little bit of patience and the cure will be ready.</p>
]]></content:encoded>
			<wfw:commentRss>http://rotanovs.com/performance/lighttpd-dos-tool/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
