<?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>Rahul Bhargava on  Evolphin &#38; Technology</title>
	<atom:link href="http://rahulbhargava.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://rahulbhargava.org</link>
	<description>Evolphin, Version Control, Visual Workflow, Collaboration software, Version Cue, Subversion</description>
	<lastBuildDate>Mon, 07 Mar 2011 01:02:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Evolphin Software releases a major upgrade to Zoom</title>
		<link>http://rahulbhargava.org/2011/03/06/evolphin-software-releases-a-major-upgrade-to-zoom-its-flagship-digital-asset-management-and-versioning-product-for-creative-professionals/</link>
		<comments>http://rahulbhargava.org/2011/03/06/evolphin-software-releases-a-major-upgrade-to-zoom-its-flagship-digital-asset-management-and-versioning-product-for-creative-professionals/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 00:58:40 +0000</pubDate>
		<dc:creator>rahul</dc:creator>
				<category><![CDATA[DAM]]></category>
		<category><![CDATA[Evolphin]]></category>

		<guid isPermaLink="false">http://rahulbhargava.org/?p=12</guid>
		<description><![CDATA[Evolphin Software releases a major upgrade to Zoom, its flagship Digital Asset Management and Versioning product for Creative Professionals]]></description>
			<content:encoded><![CDATA[<p>We  released a major upgrade to Zoom, our flagship Digital Asset Management and Versioning product for Creative Professionals.</p>
<p>Over 500+ new features &amp; enhancements have been incorporated to our <a href="http://evolphin.com/html/product-editions.html" target="_blank">Zoom </a>version control product         editions. Major focus of this release has been simplifying version control for the creatives, enhanced usability,         tighter integration with popular tools, large previews and a new MacOS X Snow Leopard Finder plug-in. Visit our <a href="http://evolphin.com/html/product/zoom-version-2.8.html">web site link here</a> to  take a  look at the <strong>top ten</strong> new features in Zoom.</p>
<div class="wp-caption alignleft" style="width: 373px"><a href="http://www.youtube.com/watch?v=NFgwExIvwFY"><img title="Mac Folder Coloring via Zoom" src="http://evolphin.com/images/screenshots/cs5panel/foloder-color-refl.png" alt="" width="363" height="138" /></a><p class="wp-caption-text">Mac Folder Coloring via Zoom</p></div>
]]></content:encoded>
			<wfw:commentRss>http://rahulbhargava.org/2011/03/06/evolphin-software-releases-a-major-upgrade-to-zoom-its-flagship-digital-asset-management-and-versioning-product-for-creative-professionals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stopping beagled service on Fedora, SuSE Linux</title>
		<link>http://rahulbhargava.org/2007/03/08/stopping-beagled-service-on-fedora-suse-linux/</link>
		<comments>http://rahulbhargava.org/2007/03/08/stopping-beagled-service-on-fedora-suse-linux/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 00:07:10 +0000</pubDate>
		<dc:creator>rahul</dc:creator>
				<category><![CDATA[Server Side]]></category>

		<guid isPermaLink="false">http://rahulbhargava.org/2007/03/08/stopping-beagled-service-on-fedora-suse-linux/</guid>
		<description><![CDATA[When you install Fedora Core, it appears the beagle indexing service is started in the background automatically. On my machine, beagle was consuming too many resources. In order to stop the damn thing, I had to tear my hairs! The beagle daemon for one is not installed as a normal /etc/init.d or xinetd service. The [...]]]></description>
			<content:encoded><![CDATA[<p>When you install Fedora Core, it appears the beagle indexing service is  started in the background automatically. On my machine, beagle was consuming too many resources. In order to stop the damn thing, I had to tear my hairs!</p>
<p>The beagle daemon for one is not installed as a normal /etc/init.d or xinetd service.  The following recipe worked for me, might need to scipt it and launch it from the bashrc when loggin in:</p>
<ol>
<li>$ beagled &#8211;disable-schedule  ( this would disable the scheduler)</li>
<li>$ beagle-settings (This brings up a GUI to stop it from indexing, just deselect the options, see the screen shot below)<br />
<img src="/img/screenshots/beagle-settings.jpg" title="beagle Screen Shot" alt="beagle Screen Shot" height="238" width="253" /></li>
<li>$ beagle-shutdown (now the damn service should be gone)</li>
<li>$ beagle-info &#8211;status<br />
Could not connect to the daemon.</li>
</ol>
<p>If you see the last line, you are set!</p>
]]></content:encoded>
			<wfw:commentRss>http://rahulbhargava.org/2007/03/08/stopping-beagled-service-on-fedora-suse-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing yum hangs on Fedora Core 6 (FC6)</title>
		<link>http://rahulbhargava.org/2007/03/08/fixing-yum-hangs-on-fedora-core-6-fc6/</link>
		<comments>http://rahulbhargava.org/2007/03/08/fixing-yum-hangs-on-fedora-core-6-fc6/#comments</comments>
		<pubDate>Thu, 08 Mar 2007 20:44:02 +0000</pubDate>
		<dc:creator>rahul</dc:creator>
				<category><![CDATA[Server Side]]></category>

		<guid isPermaLink="false">http://rahulbhargava.org/2007/03/08/fixing-yum-hangs-on-fedora-core-6-fc6/</guid>
		<description><![CDATA[The fabolous thing about upgrading to Fedora Core 6 has been that the yum package manager now routinely hangs on my machine. This does not make for a fun experiecne. For me it typically hangs hard after a pop-up message: Retreiving software information A little bit of detective work in another terminal indicates why: # [...]]]></description>
			<content:encoded><![CDATA[<p>The fabolous thing about upgrading to Fedora Core 6 has been  that the yum package manager now routinely hangs on my machine. This does not make for a fun experiecne.  For me it typically hangs hard after a pop-up message:</p>
<blockquote><p>Retreiving software information</p></blockquote>
<p>A little bit of detective work in another terminal indicates why:</p>
<blockquote><p># ps -leaf | grep `cat /var/run/yum.pid`</p></blockquote>
<p>This number is Pirut&#8217;s yum process ID. Letâ€™s see what itâ€™s stuck doing:</p>
<blockquote><p># strace -p `cat /var/run/yum.pid<br />
[root@rahul ~]# strace -p 2524<br />
Process 2524 attached &#8211; interrupt to quit<br />
ioctl(4, FIONREAD, [0])Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  = 0<br />
poll( &lt;unfinished &#8230;&gt;</p></blockquote>
<p>Check, this out; it is waiting in a poll system call. This usually implies that the process is waiting for a network IO event to happen. If the previous pirut process is gone, well, things can get to this mess. By the way, it <em>is</em> possible to nuke pirut yum at this point; you just have to be brutal.</p>
<blockquote><p># pkill -9 pirut</p></blockquote>
<p>Once this is done, a little digging around often shows a couple of  __db.* files in /var/lib/rpm. Letâ€™s nule all  of these:</p>
<blockquote><p># rm -rf /var/lib/rpm/__db.*</p></blockquote>
<p>At this juncture, retrying the hung yum/pirut command should work. At least, it does so for me. Sometimes, I need to run â€œyum clean allâ€ after cleaning up the above mess before yum can make progress.</p>
]]></content:encoded>
			<wfw:commentRss>http://rahulbhargava.org/2007/03/08/fixing-yum-hangs-on-fedora-core-6-fc6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto get CVS user name inside a CVS Loginfo trigger</title>
		<link>http://rahulbhargava.org/2007/03/05/howto-get-cvs-user-name-inside-a-cvs-loginfo-trigger/</link>
		<comments>http://rahulbhargava.org/2007/03/05/howto-get-cvs-user-name-inside-a-cvs-loginfo-trigger/#comments</comments>
		<pubDate>Mon, 05 Mar 2007 21:22:26 +0000</pubDate>
		<dc:creator>rahul</dc:creator>
				<category><![CDATA[CVS]]></category>
		<category><![CDATA[Software Configuration Management]]></category>

		<guid isPermaLink="false">http://rahulbhargava.org/2007/03/05/howto-get-cvs-user-name-inside-a-cvs-loginfo-trigger/</guid>
		<description><![CDATA[THE PROBLEM CVS allows you tp specify a run-as user-name in the CVSROOT/passwd file. So for example if we use the following syntax in CVSROOT/passwd file: john:12$2#&#38;65:cvsadmin greshim:ac2$2#&#38;65:cvsadmin The above tells the CVS server to launch/fork the CVS process with the effective user-id as &#8216;cvsadmin&#8216; instead of say CVS user &#8216;john&#8216; who may have executed [...]]]></description>
			<content:encoded><![CDATA[<p><strong>THE PROBLEM</strong></p>
<p>CVS allows you tp specify a <strong>run-as</strong> user-name in the <em>CVSROOT/passwd </em>file.  So for example if we use the following syntax in CVSROOT/passwd file:</p>
<blockquote><p>john:12$2#&amp;65:cvsadmin<br />
greshim:ac2$2#&amp;65:cvsadmin</p></blockquote>
<p>The above tells the CVS server to launch/fork the CVS process with the effective user-id as &#8216;<strong>cvsadmin</strong>&#8216; instead of say CVS user &#8216;<strong>john</strong>&#8216; who may have executed the commit command.  This allows the CVS administrator to maintaina separation between system user and the CVS user. It allows the admin to avoid polluting UNIX file level permissions inside the CVSROOT.</p>
<p>However the problem is how does a CVS trigger like Loginfo get hold of the actual CVS user on whose behalf the run-as user is executing the CVS command ? If the trigger script uses <em>&#8216;whoami&#8217; </em>to query the user it would get the effective user-id like &#8216;cvsadmin&#8217; instead of &#8216;john&#8217;.<em><br />
</em></p>
<p><strong>THE SOLUTION</strong></p>
<p><span id="more-6"></span></p>
<p>Instead of querying for effective user-id from within the trigger script, just pass a $USER variable as an argument to the trigger script in the trigger definition file. For example:</p>
<blockquote><p><font color="black" face="Times New Roman" size="3"><span style="font-size: 12pt">The following </span></font><tt><font face="Courier New" size="2"><span style="font-size: 10pt">`loginfo'</span></font></tt> file, together with the tiny shell-script below, appends all log messages to the file <tt><font face="Courier New" size="2"><span style="font-size: 10pt">`$CVSROOT/CVSROOT/commitlog'</span></font></tt>, and any commits to the administrative files (inside the <tt><font face="Courier New" size="2"><span style="font-size: 10pt">`CVSROOT'</span></font></tt> directory) are also logged in <tt><font face="Courier New" size="2"><span style="font-size: 10pt">`/usr/adm/cvsroot-log'</span></font></tt>. Commits to the <tt><font face="Courier New" size="2"><span style="font-size: 10pt">`prog1'</span></font></tt> directory are mailed to <tt><font face="Courier New" size="2"><span style="font-size: 10pt">ceder</span></font></tt>. <o:p></o:p></p></blockquote>
<blockquote>
<table class="MsoNormalTable" border="0" cellpadding="0" cellspacing="3">
<tr>
<td style="padding: 0.75pt">
<p class="MsoNormal"><font color="black" face="Times New Roman" size="3"><span style="font-size: 12pt"> <o:p></o:p></span></font></p>
</td>
<td style="padding: 0.75pt">
<pre><font color="black" face="Courier New" size="2"><span style="font-size: 10pt">ALL             cvs-log $CVSROOT/CVSROOT/commitlog <strong>$USER</strong><o:p></o:p>
^CVSROOT(/|$)   cvs-log /usr/adm/cvsroot-log <strong>$USER</strong><o:p></o:p>
^prog1(/|$)     Mail -s "%p %s" ceder</span></font></pre>
</td>
</tr>
</table>
</blockquote>
<p>Inside the trigger script you can query the passed command line argument for the actual CVS user name.</p>
]]></content:encoded>
			<wfw:commentRss>http://rahulbhargava.org/2007/03/05/howto-get-cvs-user-name-inside-a-cvs-loginfo-trigger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion Network Protocol De-constructed</title>
		<link>http://rahulbhargava.org/2006/03/25/subversion-network-protocol-de-constructed/</link>
		<comments>http://rahulbhargava.org/2006/03/25/subversion-network-protocol-de-constructed/#comments</comments>
		<pubDate>Sat, 25 Mar 2006 21:22:26 +0000</pubDate>
		<dc:creator>rahul</dc:creator>
				<category><![CDATA[Software Configuration Management]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://rahulbhargava.org/2006/03/25/subversion-network-protocol-de-constructed/</guid>
		<description><![CDATA[So I have been chewing the FUD on Subversion site lately. Now don&#8217;t get me wrong I think Subversion has many a positives going for it (more on this latter) but what beats me is the following &#8211; for an SCM whose sole objective was to be a replacement for CVS, how can it regress [...]]]></description>
			<content:encoded><![CDATA[<p>So I have been chewing the FUD on <a href="http://subversion.tigris.org/">Subversion </a>site lately. Now don&#8217;t get me wrong I think Subversion has many a positives going for it (more on this latter) but what beats me is the following &#8211; for an SCM whose sole objective was to be a replacement for CVS, how can it regress on things that CVS does well (I am not making this up see &#8211; <a href="http://subversion.tigris.org/faq.html#why">http://subversion.tigris.org/faq.html#why</a> :</p>
<p><span id="more-7"></span></p>
<blockquote>
<h3 style="text-align: left; font-family: trebuchet ms"><span style="font-size: 85%">Why does this project exist?</span></h3>
<p style="text-align: left; font-family: trebuchet ms"><span style="font-size: 85%">To take over the CVS user base.  Specifically, we&#8217;re writing a new<br />
version control system that is very similar to CVS, but fixes many<br />
things that are broken.  See our front page.</span></p></blockquote>
<p style="text-align: left; font-family: trebuchet ms">For instance :</p>
<ol>
<li>CVS opens a single client-server connection for any operation. In contrast Subversion is TCP connection hungry. Using the <span style="font-style: italic">SVN RA </span>protocol, a checkout can trigger 4-5 new TCP connections. On a WAN if you have a Subversion repository being accessed from say China to USA, this can be a killer. Each TCP connection can take 1.5 Round trips. The <span style="font-style: italic">SVN DeltaV Http</span> protocol fares better but it too can open multiple TCP connections for operations.</li>
<li>Chatty protocol. And I thought CVS was chatty, wait till you sniff the Subversion network protocol. I noticed for the SVN RA protocol, repeated invocation on new connections and on each connection the authentciation happens again (if you are using SSH it really slows you down), commands like get-latest-rev, set-path are sent multiple times. Sometimes the same command is sent multiple times on the same connection. Harmless ? Its not an error yeah but why be so wasteful ? I mean its not like this is legacy code that was written 20 years ago. Why not have a clean network protocol model</li>
<li>What&#8217;s with this lisp like list syntax on the wire :<br />
<blockquote style="font-family: times new roman"><p><span style="font-size: 85%">( 2 ( edit-pipeline ) 14:svn://zen/mod )<br />
( CRAM-MD5 ( ) )<br />
38:rachel 6195af60930ad5367267948ddacf30ca<br />
( get-latest-rev ( ) )<br />
( update ( ( 19 ) 0: true ) )<br />
( set-path ( 0: 16 false ( ) ) ) ( set-path ( 11:dir1/f1.txt 19 false ( ) ) ) ( set-path ( 9:dir1/foo2 19 false ( ) ) ) ( finish-report ( ) )<br />
( success ( ) ) </span></p></blockquote>
<p>Why not use a more compact representation like CVS. I used to complain the CVS protocol does 4-5 Round trips to execute a command, Subversion can do litereally 14-15 Round Trips in a checkout. Agreed you don&#8217;t checkout the whole repository often but why the sloppiness in initial design.</li>
</ol>
<p>If the goal was to do better CVS, the Subversion team should have started with looking at how the network protocol is dealt with in CVS and learned from it.</p>
<p>More ramblings on Subversion to follow soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://rahulbhargava.org/2006/03/25/subversion-network-protocol-de-constructed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix for CVS Keyword Expansion Bug</title>
		<link>http://rahulbhargava.org/2005/10/28/fix-for-cvs-keyword-expansion-bug/</link>
		<comments>http://rahulbhargava.org/2005/10/28/fix-for-cvs-keyword-expansion-bug/#comments</comments>
		<pubDate>Sat, 29 Oct 2005 00:50:29 +0000</pubDate>
		<dc:creator>rahul</dc:creator>
				<category><![CDATA[CVS]]></category>
		<category><![CDATA[Software Configuration Management]]></category>

		<guid isPermaLink="false">http://rahulbhargava.org/2005/10/28/fix-for-cvs-keyword-expansion-bug/</guid>
		<description><![CDATA[This bug and a proposed patch was submitted to the CVS community by me. It ran into religious hurdle w.r.t keyword storage in SCM repository, it has not yet been accepted by the CVS community but nevertheless has been available for download. Here is the original submission by me: THE PROBLEM The cvs server will [...]]]></description>
			<content:encoded><![CDATA[<p>This b<a href="https://savannah.nongnu.org/patch/?4573" target="_blank">ug and a proposed patch</a> was submitted to the CVS community by me. It ran into religious hurdle w.r.t keyword storage in SCM repository, it has not yet been accepted by the CVS community but nevertheless has been available for download.  Here is the original submission by me:</p>
<p><strong>THE PROBLEM</strong><br />
The cvs server will automatically (or, more accurately, as part of the update run that automatically happens after a commit) expand valid keyword strings in a text file as part of the commit operation. In other words it is the responsibility of the &#8216;server-side&#8217; of cvs to fill in the appropriate values for the RCS keywords.</p>
<p>Currently where this breaks down is when the end-user modifies the content of the RCS keywords. For example, let&#8217;s say a file contains:</p>
<p><span id="more-4"></span></p>
<blockquote><p>File : foo<br />
=======<br />
Line 1: $Id$</p></blockquote>
<p>On the initial commit, the server returns the file (if keyword expansion is not turned off) and expands Id a  -</p>
<blockquote><p>File: foo<br />
=======<br />
$Id: id,v 1.1 2005/10/28 18:39:46 userX Exp $</p></blockquote>
<p>If the user accidentally or intentionally changes just the expanded value (no other change) on the client-side to:</p>
<blockquote><p>File: foo (revision 1.1 in user sandbox)<br />
=========================<br />
$Id: id,v 1.9 3005/10/28 18:39:46 userYYY Exp $</p></blockquote>
<p>and then does a commit, the CVS server as it stands today will be happy to commit a new version but as part of the update run that automatically happens after a commit, will re-expand the keyword and the CVS client will have the following file in the sandbox :</p>
<blockquote><p>File: foo<br />
===========<br />
$Id: id,v 1.2 2005/10/28 18:46:18 userX Exp $</p></blockquote>
<p>In other words the user&#8217;s intent of modifying the keyword content is not honored. This make sense as keyword expansion is owned by the server and a client can not wily-nilly change the keyword content (between the two $, with the exception of $Log$ keyword of-course)</p>
<p>However, this also causes spurious revisions to be created in the CVS repository and this revision is not what the end user expects. The revision metadata within the $..$ keyword expansion is controlled by the server and as seen in the above example, the user can&#8217;t change it even though his attempt to do so results in a new revision being committed.</p>
<p>We have come across large CVS repositories where lots of such spurious revisions (no content change except keyword) exist on several files. This causes problems downstream when for example doing branch merges, as differences on just keyword expansion can cause the file to be treated as changed. Creating new revisions is an important step. It has consequence on downstream tools. Per-user stats (how may commits by a given user, for example) are impacted when revisions are created. One way to deal with this problem is to turn off keyword expansion (as available in 1-12-XX feature tree or use -ko for every file that has keywords), but that is a sledgehammer approach that denies the benefits of RCS keywords to the end users.</p>
<p><strong>THE FIX </strong><br />
The patch (off the 1-11-21 tree) that we have attached addresses this bug/mis-feature. It ensures keyword expansion will not cause spurious revisions that differ just in keyword content that the CVS server inserts between $..$ markers. With the patch, a CVS user can still use keyword expansion as expected, but during the file classification phase of a CVS commit, the patch kicks in and triggers a keyword-sensitive  diff algorithm, that we have developed, which will ignore RCS/CVS keyword differences during this phase.  This reduces spurious revision creation. The patch deals with all keywords except the logmsgs after a $Log$ keyword.</p>
<p>The patch uses a space-time efficient diff&#8217;ing algorithm that does not require the entire file  to be read into memory to do the keyword canonicalization. It operates on a block at  a time. The algorithm does not need to make multiple passes. As described in the  src comments, the algorithm is implemented as a finite state machine that tracks the  state across block comparisons and can deal with keywords straddled across block boundaries etc.</p>
<p>Right now, the patch is turned on by default. This behavior can be  controlled via a new option that we have added to CVSROOT/config: &#8220;IgnoreKeywordDiffsAtCommit&#8221;.  If set to &#8220;no&#8221; it will switch back to the old semantics, just in case someone needs that.  The patch also builds a new executable &#8220;kwdiff&#8221; that can be used for comparing checked-out files   such that keyword differences can be ignored. This is useful when comparing files  between two users each with their own sand-box. It is also used for unit testing the implementation(see below).</p>
<p>As part of the patch, we have added new tests to sanity.sh. We have also fixed testcases  that were expecting the old behavior (spurious revisions). To test the algorithm for every  possible corner case, we have also devised a unit test that generates millions of test file  permutations. These are perl based and we didn&#8217;t integrate them into sanity.sh as it would  change the standalone nature of the script. Memory tools like valgrind have been run on the patch to ensure there are no memory errors.</p>
<p>In the future, it may make more sense to create a unit test  subdir for testing components of cvs (as opposed to the full cvs executable), in which case the kwdiff unit tests  could be checked in there.</p>
<p>This patch enables the keyword sensitive diff algorithm only during commits, but  the CVS community may want to consider it for updates, especially to reduce unnecessary   keyword related conflicts during branch merges. Given how the code is structured it is  relatively easy to turn on and off the keyword canonicalization algorithm for  other cases beyond commits. Today CVS reads the entire RCS file into memory for many  operation. This increases the footprint of the CVS process and can be a scalability bottleneck.  The file chunk management code in kwfilecmp.c shows that it is possible to operate on a block basis, thus bounding the footprint of the cvs server process, regardless of the size of the file being processed.  <strong>Perhaps, in the future, this module could be re-used for eliminating the need to read in the entire file into memory for many CVS operations</strong>.</p>
<p>The patch has been developed off the 1.11.21 branch.  It can easily be enhanced  for the feature branch to take into account local keyword aliases. This will require changes to a single function ( is_valid_keyword).</p>
<p>Attached <a href="/downloads/kwdiff.tbz2">bzip2 file</a> contains the kwdiff.patch (actual patch) and the kwdiff-unit-test/ subdir.</p>
<p>We hope the CVS community will find the patch useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://rahulbhargava.org/2005/10/28/fix-for-cvs-keyword-expansion-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CVS zlib.c implementation in 1.12.13 broken</title>
		<link>http://rahulbhargava.org/2005/10/21/cvs-zlibc-implementation-in-11213-broken/</link>
		<comments>http://rahulbhargava.org/2005/10/21/cvs-zlibc-implementation-in-11213-broken/#comments</comments>
		<pubDate>Sat, 22 Oct 2005 03:51:15 +0000</pubDate>
		<dc:creator>rahul</dc:creator>
				<category><![CDATA[CVS]]></category>
		<category><![CDATA[Software Configuration Management]]></category>

		<guid isPermaLink="false">http://rahulbhargava.org/2005/10/21/cvs-zlibc-implementation-in-11213-broken/</guid>
		<description><![CDATA[This bug was submitted to the CVS community by me and fairly quickly fixed. Here is the original submission: The cvs1.12.13 tree&#8217;s zlib.c has compatability problems with several Java based cvs clients &#8211; SmartCVS, WANdisco, JetBrains Ideaj etc. This manifests via cvs commands will hang for some files. See the bundled test file (add.c from [...]]]></description>
			<content:encoded><![CDATA[<p>This bug was submitted to the <a href="https://savannah.nongnu.org/bugs/?14840" target="_blank">CVS community</a> by me and fairly quickly fixed. Here is the original submission:</p>
<p>The cvs1.12.13 tree&#8217;s zlib.c has compatability problems with  several Java based cvs clients &#8211; SmartCVS, WANdisco, JetBrains Ideaj etc. This manifests via cvs commands will hang for some files. See the bundled test file (add.c from cvs src dir)</p>
<p>We have tested with cvs1.11 tree right upto 1.11.21 and has no problems interoperating with the cvs server&#8217;s zlib implementation.</p>
<p><span id="more-5"></span></p>
<p>To further confirm the issue we tried with all the zlib levels and the incompatability remains.</p>
<p>We recompiled with cvs 1.12.12 src with the &#8211;with-external-zlib and dynamically linked the default libz.so on Gentoo and Red Hat Linux distros (1.1.4) and that works like a charm. While running configure we noticed :</p>
<blockquote><p>checking selected ZLIB&#8230; external<br />
configure: WARNING: Package ZLIB is more recent than requested external version<br />
(1.2.2 &gt; 1.1.4).  configure with the &#8211;without-external-zlib<br />
option to select the more recent version.<br />
checking that ZLIB library works&#8230; yes</p></blockquote>
<p>Seems like CVS is using 1.2.2, so we downloaded the latest zlib versions (1.2.3) from  <a href="http://www.zlib.net/">http://www.zlib.net/</a> and tried it with the cvs 1.12.12 src. Again no problem, all works like a charm.</p>
<p>This seems to suggest the 1.2.2 version bundled is broken. It may be a good idea to move to 1.2.3 on the cvs1.12. tree.</p>
<p>Also attached is a testcase tar ball. It includes:</p>
<ul>
<li> Ethereal sniff of the client &#8211; server traffic when the zlib hang happened</li>
<li>the src file (add.c) that caused the problem</li>
<li>The cvs server tmp dir with the partially read (by the cvs pserver process) add.c file</li>
<li>The repository RCS file</li>
<li>An strace capture of the cvs pserver process when it got hung sucking in the zlib6 compressed add.c file</li>
</ul>
<p>Hope this provides enough information to debug 1.2.2 zlib, it might be just simpler to migrate to newer zlib (1.2.3)</p>
<p>&#8211;<br />
Regards,<br />
Rahul Bhargava<br />
CTO, WANdisco,Inc</p>
]]></content:encoded>
			<wfw:commentRss>http://rahulbhargava.org/2005/10/21/cvs-zlibc-implementation-in-11213-broken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thread per connection : NIO, Linux NPTL and epoll</title>
		<link>http://rahulbhargava.org/2004/06/18/thread-per-connection-nio-linux-nptl-and-epoll/</link>
		<comments>http://rahulbhargava.org/2004/06/18/thread-per-connection-nio-linux-nptl-and-epoll/#comments</comments>
		<pubDate>Fri, 18 Jun 2004 20:19:54 +0000</pubDate>
		<dc:creator>rahul</dc:creator>
				<category><![CDATA[Server Side]]></category>

		<guid isPermaLink="false">http://rahulbhargava.org/2004/06/18/thread-per-connection-nio-linux-nptl-and-epoll/</guid>
		<description><![CDATA[This article was originally posted by me on theserverside.com, it is reproduced here I have been benchmarking Java NIO with various JDKs on Linux. Server is running on a 2 CPU 1.7 GHz, 1GB RAM, Ultra160 SCSI 36GB disk With Linux kernel 2.6.5 (Gentoo) I had NPTL turned on and support for epoll compiled in. [...]]]></description>
			<content:encoded><![CDATA[<p><em>This article was originally posted by me on <a href="http://www.theserverside.com/discussions/thread.tss?thread_id=26700" target="_blank"> theserverside.com</a>, it is reproduced here</em></p>
<p>I have been benchmarking Java NIO with various JDKs on Linux. Server is running on a 2 CPU 1.7 GHz, 1GB RAM, Ultra160 SCSI 36GB disk</p>
<p>With Linux kernel 2.6.5 (Gentoo) I had NPTL turned on and support for epoll compiled in. The server application was designed to support multiple disptach models :</p>
<ol>
<li>Reactor with Iterative Disptach with multiple selector threads. Essentially the accepted connections were load-balanced between varying number of selector threads. The benchmark then applied a step function to  experimentally determine the optimal # of threads and connection per selector ratio.</li>
<li>Also a simple concurrent blocking disptach model was supported. This is essentially a reader thread per connection model.</li>
</ol>
<p><span id="more-3"></span>Client application opens concurrent persistent connections to the server and starts blasting messages. Server just reads the messages and does basic un-marshalling to ensure message is ok.</p>
<p>Results were interesting:</p>
<ol>
<li> With NPTL on, Sun and Blackwidow JVM 1.4.2 scaled easily to 5000+ threads.  Blocking model was consistently 25-35% faster than using NIO selectors. Lot of techniques  suggested by EmberIO folks were employed &#8211; using multiple selectors, doing multiple (2)  reads if the first read returned EAGAIN equivalent in Java. Yet we couldn&#8217;t beat the plain thread  per connection model with Linux NPTL.</li>
<li>To work around not so performant/scalable poll() implementation on Linux&#8217;s we  tried using epoll with Blackwidow JVM on a 2.6.5 kernel. While epoll improved the over  scalability, the performance still remained 25% below the vanilla thread per connection model.  With epoll we needed lot fewer threads to get to the best performance mark that we could  get out of NIO.</li>
</ol>
<p>Here are some becnhmark results:</p>
<p align="center">
<table id="table1" border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<th width="226">Concurrent Persistent Connections</th>
<th>Is blocking server</th>
<th>Number of server threads</th>
<th>Connections handled per thread</th>
<th>Thruput of the server (tps)</th>
</tr>
<tr>
<td align="center" width="226">1700</td>
<td align="center">N</td>
<td align="center">2</td>
<td align="center">850</td>
<td align="center">1379</td>
</tr>
<tr>
<td align="center" height="22" width="226">1700</td>
<td align="center" height="22">N</td>
<td align="center" height="22">4</td>
<td align="center" height="22">425</td>
<td align="center" height="22">1214</td>
</tr>
<tr>
<td align="center" width="226">1700</td>
<td align="center">N</td>
<td align="center">8</td>
<td align="center">212</td>
<td align="center">1240</td>
</tr>
<tr>
<td align="center" width="226">1700</td>
<td align="center">N</td>
<td align="center">16</td>
<td align="center">106</td>
<td align="center">1140</td>
</tr>
<tr>
<td align="center" width="226">1700</td>
<td align="center">N</td>
<td align="center">32</td>
<td align="center">53</td>
<td align="center">1260</td>
</tr>
<tr>
<td align="center" width="226">1700</td>
<td align="center">N</td>
<td align="center">64</td>
<td align="center">26</td>
<td align="center">1115</td>
</tr>
<tr>
<td align="center" width="226">1700</td>
<td align="center">N</td>
<td align="center">128</td>
<td align="center">13</td>
<td align="center">886</td>
</tr>
<tr>
<td align="center" width="226">1700</td>
<td align="center">N</td>
<td align="center">256</td>
<td align="center">6</td>
<td align="center">618</td>
</tr>
<tr>
<td align="center" height="25" width="226">1700</td>
<td align="center" height="25">N</td>
<td align="center" height="25">512</td>
<td align="center" height="25">3</td>
<td align="center" height="25">184</td>
</tr>
<tr>
<td align="center" width="226">1700</td>
<td align="center">Y</td>
<td align="center">1700</td>
<td align="center">1</td>
<td align="center">1737</td>
</tr>
</table>
<p>As you can see the last line indicates vanilla blocking server (thread per  connection) produced the best thruput even with 1700 threads active in the JVM.</p>
<p>With epoll, the best run was with 2 threads each handling around 850 connections  in their selector set. But the thruput is below the blocking server thruput by 25%!</p>
<p>Results shows that the cost of NIO selectors coupled with OS polling mechanism  (in this case efficient epoll VS selector/poll) has a significant overhead compared  to the cost of context switching 1700 threads on an NPTL Linux kernel.</p>
<p>Without NPTL of course it&#8217;s a different story. The blocking server just melts at  400 concurrent connections! We have run the test upto 10K connections and the blocking server  outperformed NIO driven selector based server by same margin. Moral of the story &#8211; NIO  arrives at the scene a little too late &#8211; with adequate RAM and better threading models (NPTL),  performance gains of NIO don&#8217;t show up.</p>
<p>Sun&#8217;s JVM doesn&#8217;t support epoll() so we couldn&#8217;t use epoll with it. Normal  poll() based selector from Sun didn&#8217;t perform as well. We needed to reduce the number of  connections per thread to a small number (~ 6-10) to get comprabale numbers to epoll based  selector. That meant running lot more selector threads kind of defeats the purpose of  multiplexed IO. The benchmarks also dispell the myth created by Matt Welsh et al (SEDA) that a  single threaded reactor can keep up with the network. On a 100Mbps ethernet that was  true: network got saturated prior to server CPUs but with &gt; 1Gbps network, we needed multiple  selectors to saturate the network. One single selector&#8217;s performance was abysmal (5-6x  slower than<br />
concurrent connections)</p>
<p>For application that want to have fewer number of threads for debuggability etc,  NIO may be the way to go. The 25-35% performance hit may be acceptable to many apps. Fewer  threads also means easier debugging, it&#8217;s a pain to attach a profiler or a debugger to a  server hosting 1000+ threads <img src='http://rahulbhargava.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  . Bottom line with better MT support in kernels (Linux already  with NPTL), one needs to re-consider the thread per connection model</p>
]]></content:encoded>
			<wfw:commentRss>http://rahulbhargava.org/2004/06/18/thread-per-connection-nio-linux-nptl-and-epoll/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

