<?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>Xaprb &#187; parallelization</title>
	<atom:link href="http://www.xaprb.com/blog/tag/parallelization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog</link>
	<description>Stay curious!</description>
	<lastBuildDate>Thu, 09 Feb 2012 10:55:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>An easy way to run many tasks in parallel</title>
		<link>http://www.xaprb.com/blog/2009/05/01/an-easy-way-to-run-many-tasks-in-parallel/</link>
		<comments>http://www.xaprb.com/blog/2009/05/01/an-easy-way-to-run-many-tasks-in-parallel/#comments</comments>
		<pubDate>Fri, 01 May 2009 15:17:23 +0000</pubDate>
		<dc:creator>Xaprb</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Domas Mituzas]]></category>
		<category><![CDATA[parallelization]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=1056</guid>
		<description><![CDATA[Domas Mituzas mentioned this recently. It&#8217;s so cool I just have to write about it. Here&#8217;s an easy command to fork off a bunch of jobs in parallel: xargs. seq 10 20 &#124; xargs -n 1 -P 5 sleep This will send a sequence of numbers to xargs, which will divide it into chunks of [...]


<strong>Further Reading:</strong><ul><li><a href='http://www.xaprb.com/blog/2007/09/30/introducing-mysql-parallel-dump/' rel='bookmark' title='Permanent Link: Introducing MySQL Parallel Dump'>Introducing MySQL Parallel Dump</a></li>
<li><a href='http://www.xaprb.com/blog/2007/10/03/how-to-check-and-optimize-mysql-tables-in-parallel/' rel='bookmark' title='Permanent Link: How to check and optimize MySQL tables in parallel'>How to check and optimize MySQL tables in parallel</a></li>
<li><a href='http://www.xaprb.com/blog/2007/10/15/introducing-mysql-parallel-restore/' rel='bookmark' title='Permanent Link: Introducing MySQL Parallel Restore'>Introducing MySQL Parallel Restore</a></li>
<li><a href='http://www.xaprb.com/blog/2010/06/30/how-i-keep-track-of-tasks/' rel='bookmark' title='Permanent Link: How I keep track of tasks'>How I keep track of tasks</a></li>
<li><a href='http://www.xaprb.com/blog/2010/05/14/how-to-read-linuxs-procdiskstats-easily/' rel='bookmark' title='Permanent Link: How to read Linux&#8217;s /proc/diskstats easily'>How to read Linux&#8217;s /proc/diskstats easily</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><a href="http://dammit.lt/">Domas Mituzas</a> mentioned this recently.  It&#8217;s so cool I just have to write about it.  Here&#8217;s an easy command to fork off a bunch of jobs in parallel: xargs.</p>

<pre>seq 10 20 | xargs -n 1 -P 5 sleep</pre>

<p>This will send a sequence of numbers to xargs, which will divide it into chunks of one argument at a time and fork off 5 parallel processes to execute each.  You can see it in action:</p>

<pre>$ ps -eaf | grep sleep
baron     5830  5482  0 11:12 pts/2    00:00:00 xargs -n 1 -P 5 sleep
baron     5831  5830  0 11:12 pts/2    00:00:00 sleep 10
baron     5832  5830  0 11:12 pts/2    00:00:00 sleep 11
baron     5833  5830  0 11:12 pts/2    00:00:00 sleep 12
baron     5834  5830  0 11:12 pts/2    00:00:00 sleep 13
baron     5835  5830  0 11:12 pts/2    00:00:00 sleep 14
</pre>

<p>There are basically unlimited uses for this!</p>

<p><strong>Further Reading:</strong><ul><li><a href='http://www.xaprb.com/blog/2007/09/30/introducing-mysql-parallel-dump/' rel='bookmark' title='Permanent Link: Introducing MySQL Parallel Dump'>Introducing MySQL Parallel Dump</a></li>
<li><a href='http://www.xaprb.com/blog/2007/10/03/how-to-check-and-optimize-mysql-tables-in-parallel/' rel='bookmark' title='Permanent Link: How to check and optimize MySQL tables in parallel'>How to check and optimize MySQL tables in parallel</a></li>
<li><a href='http://www.xaprb.com/blog/2007/10/15/introducing-mysql-parallel-restore/' rel='bookmark' title='Permanent Link: Introducing MySQL Parallel Restore'>Introducing MySQL Parallel Restore</a></li>
<li><a href='http://www.xaprb.com/blog/2010/06/30/how-i-keep-track-of-tasks/' rel='bookmark' title='Permanent Link: How I keep track of tasks'>How I keep track of tasks</a></li>
<li><a href='http://www.xaprb.com/blog/2010/05/14/how-to-read-linuxs-procdiskstats-easily/' rel='bookmark' title='Permanent Link: How to read Linux&#8217;s /proc/diskstats easily'>How to read Linux&#8217;s /proc/diskstats easily</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.xaprb.com/blog/2009/05/01/an-easy-way-to-run-many-tasks-in-parallel/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

