<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>MustEat.org</title>
    <link>http://musteat.org</link>
    <language>en</language>
    <item>
      <title>Subversion Performance Tuning</title>
      <description>&lt;p&gt;This guide is my notes on keeping several subversion repositories happy that are currently growing by 1k-2k commits per month.&lt;/p&gt;
&lt;p&gt;My current approach is based on Ubuntu 8.04 &lt;span class="caps"&gt;LTS&lt;/span&gt;, Apache 2.2 and Subversion 1.5.&lt;/p&gt;
&lt;p&gt;I have considered upgrading to Subversion 1.6 for further speed improvements and features, but so far that hasn&amp;#8217;t been needed.  Additionally most clients accessing at the server are 1.6 clients where the features are more important.&lt;/p&gt;
&lt;p&gt;No drastic measures have been taken about multiple subversion servers with a write master and read slaves, currently all activity is located locally on one machine with a 1TB raid.&lt;/p&gt;
&lt;p&gt;These tips are mainly targeted at tweaking Apache.&lt;/p&gt;
&lt;h2&gt;Keep Alive&lt;/h2&gt;
&lt;p&gt;Due to way we&amp;#8217;re using &lt;span class="caps"&gt;SVN&lt;/span&gt;, &lt;acronym title="s"&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt;&lt;/acronym&gt;, the client will make lots of requests back to back to pull down a update or initial checkout.  Essentially one request per file.  To make this as efficient as possible, you can instruct Apache to allow keep-alive transactions, which allow for a single &lt;span class="caps"&gt;TCP&lt;/span&gt; session the client to continue to make requests.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://httpd.apache.org/docs/2.2/mod/core.html#keepalive"&gt;Apache 2.2 KeepAlive Documentation&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.orcaware.com/svn/wiki/Server_performance_tuning_for_Linux_and_Unix#Distributing_CPU_load"&gt;Suggested Configuration&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.tty1.net/blog/2008-01-19-subversion-tuning_en.html"&gt;TTY1 Suggested Configuration&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Disable SVNPathAuthz&lt;/h2&gt;
&lt;p&gt;SVNPathAuthz is enabled by default in mod_dav_svn.  For the software to determine if a &amp;#8220;user&amp;#8221; can see a path, it makes several gets (per folder/file) back to Apache to determine if they are actually visible for that user.  If you do not perform per directory access controls (inside a single repository), you can safely turn this off.  You will see a noticeable improvement on &lt;span class="caps"&gt;SVN&lt;/span&gt; Log information.  In my tests our 15k commit repo went from 4 mins to do a svn log for the entire repo to 17 seconds (in an un-cached scenario with a 1.6 client).   I picked up this tip from &lt;a href="http://www.tty1.net/blog/2008-01-19-subversion-tuning_en.html"&gt;tty1&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://svnbook.red-bean.com/en/1.5/svn.serverconfig.httpd.html"&gt;Documentation on SVNPathAuthz&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Enable &lt;span class="caps"&gt;LDAP&lt;/span&gt; Cache&lt;/h2&gt;
&lt;p&gt;We currently back Subversion to Active Directory over &lt;span class="caps"&gt;LDAP&lt;/span&gt;.  Instead of each request round tripping to the Active Directory pool, we&amp;#8217;ve enabled &lt;span class="caps"&gt;LDAP&lt;/span&gt; caching on the Apache side.  By default mod_ldap has some caching enabled, normally 10 minutes with a certain memory size for the cache.  We&amp;#8217;ve found some small gains by drastically increasing the TTL&amp;#8217;s from 10 min to 24 hours, and increasing the cache memory size to be up to 1gig.  The idea is that, once a user accesses the site, we no longer have to round trip for the rest of that day&amp;#8217;s operation.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://httpd.apache.org/docs/2.2/mod/mod_ldap.html"&gt;Apache 2.2 mod_ldap documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As an additional note about Active Directory.  Make sure that you have some &lt;span class="caps"&gt;DNS&lt;/span&gt; entry you can refer to that only contains Active Directory servers local to the Subversion server.  For awhile had a few requests that would attempt to authenticate users to an Active Directory across the pond.&lt;/p&gt;</description>
      <pubDate>Thu, 29 Oct 2009 23:41:56 -0000</pubDate>
      <guid>http://musteat.org/nodes/show/160</guid>
      <link>http://musteat.org/nodes/show/160</link>
    </item>
    <item>
      <title>Awesomesauce</title>
      <description>&lt;p&gt;Deployment research for i want food&lt;/p&gt;
&lt;p&gt;&lt;a href="http://nginx.net/"&gt;NGiNX&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://haproxy.1wt.eu/"&gt;HAProxy&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://munin.projects.linpro.no/"&gt;Munin&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://god.rubyforge.org/"&gt;God&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://aws.amazon.com/ebs/"&gt;&lt;span class="caps"&gt;EBS&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mongrel.rubyforge.org/"&gt;Mongrel&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://rack.rubyforge.org/"&gt;Rack&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.danga.com/memcached/"&gt;Memcached&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 12 Jun 2009 13:02:32 -0000</pubDate>
      <guid>http://musteat.org/nodes/show/156</guid>
      <link>http://musteat.org/nodes/show/156</link>
    </item>
    <item>
      <title>Samsung Trance and Windows XP</title>
      <description>&lt;p&gt;If you are having issues getting the &lt;a href="http://www.samsung.com/us/consumer/detail/detail.do?group=mobilephones&amp;amp;type=mobilephones&amp;amp;subtype=verizonwireless&amp;amp;model_cd=SCH-U490ZRAVZW"&gt;Samsung Trance &lt;span class="caps"&gt;SCH&lt;/span&gt;-u490&lt;/a&gt; or any other &lt;a href="http://en.wikipedia.org/wiki/Media_Transfer_Protocol"&gt;&lt;span class="caps"&gt;MTP&lt;/span&gt; &lt;span class="caps"&gt;USB&lt;/span&gt;&lt;/a&gt; device to connect to Windows XP, install the latest Windows Media Player.  &lt;span class="caps"&gt;MTP&lt;/span&gt; based device support was added to WinXP by Windows Media Player 10.&lt;/p&gt;
&lt;p&gt;If you don&amp;#8217;t do this, the phone will come up as a &lt;span class="caps"&gt;USB&lt;/span&gt; mass storage device that is unable to start.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.microsoft.com/windows/windowsmedia/player/"&gt;Windows Media Player&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 14 May 2009 00:27:44 -0000</pubDate>
      <guid>http://musteat.org/nodes/show/154</guid>
      <link>http://musteat.org/nodes/show/154</link>
    </item>
    <item>
      <title>Installing Subversion/mod_dav_svn 1.5.5 from source on Ubuntu 8.04</title>
      <description>&lt;p&gt;I assume you know how to setup and configure Apache2 and Subversion on Ubuntu already.  If not &lt;a href="http://davidwinter.me.uk/articles/2006/02/16/subversion-over-apache-2-on-ubuntu/"&gt;go here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You should already have apache2 and subversion installed through Ubuntu&amp;#8217;s package management.&lt;/p&gt;
&lt;p&gt;The following overwrites the existing Subversion install, but saves you the hassle of configuring the module system in Apache.&lt;/p&gt;
&lt;h3&gt;Warning&lt;/h3&gt;
&lt;p&gt;I&amp;#8217;m still testing this approach before rolling it out for even my own general use, but initial testing appears positive.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;

# install tools and libraries to compile
sudo apt-get install make apache2-threaded-dev autoconf libtool libdb-dev

# get subversion release source and extract
wget http://subversion.tigris.org/downloads/subversion-1.5.5.tar.gz
tar xzvf subversion-1.5.5.tar.gz
cd subversion-1.5.5

# configure to use Apache apxs
./configure --with-apxs=/usr/bin/apxs2
# build and install
make clean &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install

# have the system reload dynamic objects
sudo /sbin/ldconfig -n /usr/lib/apache2/modules


# At this stage you should update your repositories using
#  sudo svnadmin upgrade &amp;lt;repos path&amp;gt;

# restart apache
sudo /etc/init.d/apache2 restart

&lt;/code&gt;
&lt;/pre&gt;</description>
      <pubDate>Thu, 19 Feb 2009 15:18:09 -0000</pubDate>
      <guid>http://musteat.org/nodes/show/153</guid>
      <link>http://musteat.org/nodes/show/153</link>
    </item>
    <item>
      <title>Safari and WWW-Authenticate: Negotiate</title>
      <description>&lt;p&gt;For my work on &lt;a href="http://musteat.org/nodes/show/140"&gt;&lt;span class="caps"&gt;SPNEGO&lt;/span&gt;&lt;/a&gt; I&amp;#8217;ve found that Safari does not play well with the Negotiate &lt;span class="caps"&gt;WWW&lt;/span&gt;-Authenticate message that needs to passed down to indicate a client can authorize with either &lt;span class="caps"&gt;NTLM&lt;/span&gt; or &lt;span class="caps"&gt;SPNEGO&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;What appears to happen is that the Safari continuously requests the address location until some arbitrary timer is hit on the Safari side where it gives up.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m seeing this behavior with&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Windows Safari 3.1.2(525.21)&lt;/li&gt;
	&lt;li&gt;Windows Safari 3.2.1(525.27.1)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It doesn&amp;#8217;t matter if Negotiate is presented as the only authentication method, or if its presented along side Basic auth.  Either way the browser behaves in the same way.  I&amp;#8217;d expect the client if unable to handle an authentication protocol, would simply display the 401 page provided from the request and stop.  I&amp;#8217;ve been verifying this behavior using &lt;a href="http://www.wireshark.org/"&gt;Wireshark&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Haven&amp;#8217;t yet found a explicit entry for this issue on Windows, but seen references to issues with &lt;span class="caps"&gt;NTLM&lt;/span&gt; on &lt;span class="caps"&gt;OSX&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://discussions.apple.com/message.jspa?messageID=6102379"&gt;Apple Forum&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://cgi.sfu.ca/~jdbates/moin/moin.cgi/KerberosApacheModule#head-bdbcafb3fd8d595896c2bed0a4a91d5f2600eff0"&gt;KerberosApacheModule Wiki&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So far my only solution is to carefully examine the user-agent, but this solution isn&amp;#8217;t elegant.  I essentially disable Safari from working correctly if it ever does get fixed.&lt;/p&gt;
&lt;h1&gt;Update &amp;#8211; New approach&lt;/h1&gt;
&lt;p&gt;So another approach has occurred to me, since I&amp;#8217;m appending Tomcat session notes to the user, primarily to track the gss-api connection for Kerberos Auth in case it takes more then one packet to send the Kerberos key,  I could also attach an additional value indicating that the user has been presented previously with a &lt;span class="caps"&gt;WWW&lt;/span&gt;-Negotiate and ignored it without sending up a valid response but the same session id.  Now this falls on it&amp;#8217;s face in some edge conditions, but most edge conditions can be resolved by simply restarting the browser or clearing the cookies for that website on the browser side.&lt;/p&gt;</description>
      <pubDate>Fri, 23 Jan 2009 13:09:02 -0000</pubDate>
      <guid>http://musteat.org/nodes/show/151</guid>
      <link>http://musteat.org/nodes/show/151</link>
    </item>
    <item>
      <title>Enabling debug output on Java PKCS #11</title>
      <description>&lt;p&gt;Pass a parameter to the VM &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
-Djava.security.debug="sunpkcs11"
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This property is a comma separated list.  For additional debug flags to turn on for the security systems in Java, &lt;a href="http://www.docjar.com/html/api/sun/security/util/Debug.java.html"&gt;see here&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 16 Jan 2009 12:15:18 -0000</pubDate>
      <guid>http://musteat.org/nodes/show/149</guid>
      <link>http://musteat.org/nodes/show/149</link>
    </item>
    <item>
      <title>Google AppEngine: Data store timeout fun</title>
      <description>&lt;p&gt;My first availability issue I ran into on Google AppEngine, it appeared to resolve itself around 10 seconds later, but two sequential requests failed.&lt;br /&gt;
Nothing appears to be reported in the &lt;a href="http://code.google.com/status/appengine"&gt;AppEngine Status&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blurry-lunch.appspot.com/"&gt;Application here&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Update&lt;/h3&gt;
&lt;p&gt;It looks like there is some anomaly that Google is investigating.  &lt;a href="http://code.google.com/status/appengine/detail/serving/2009/01/05#ae-trust-detail-helloworld-get-latency"&gt;Graph Here&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Error&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;




      207.170.206.103 - - [05/Jan/2009:11:42:08 -0800] "GET / HTTP/1.1" 500 1244 - -

      E 01-05 11:42AM 08.253

      Traceback (most recent call last):
        File "/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 498, in __call__
          handler.get(*groups)
        File "/base/data/home/apps/blurry-lunch/6.330217185206397397/iwantlunch.py", line 28, in get
          for location in locations:
        File "/base/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1324, in __iter__
          return self.run()
        File "/base/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1657, in run
          query_run = self._proto_query.Run(*self._args, **self._kwds)
        File "/base/python_lib/versions/1/google/appengine/ext/gql/__init__.py", line 572, in Run
          it = bind_results.Run()
        File "/base/python_lib/versions/1/google/appengine/api/datastore.py", line 860, in Run
          return self._Run()
        File "/base/python_lib/versions/1/google/appengine/api/datastore.py", line 882, in _Run
          _ToDatastoreError(err)
        File "/base/python_lib/versions/1/google/appengine/api/datastore.py", line 1637, in _ToDatastoreError
          raise errors[err.application_error](err.error_detail)
      Timeout

&lt;/code&gt;
&lt;/pre&gt;</description>
      <pubDate>Mon, 05 Jan 2009 11:55:43 -0000</pubDate>
      <guid>http://musteat.org/nodes/show/148</guid>
      <link>http://musteat.org/nodes/show/148</link>
    </item>
    <item>
      <title>Apache 2: mod_auth_ldap and Active Directory</title>
      <description>&lt;p&gt;At work we were looking to bind Subversion access to Active Directory.  Of course with any large Active Directory installation, there is extensive use of nested groups to enable disable access to a wide variety of services around the company.&lt;/p&gt;
&lt;p&gt;Thankfully mod_auth_ldap has a specific feature that can be enabled to support recursive group look ups.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.muquit.com/muquit/software/mod_auth_ldap/mod_auth_ldap_apache2.html#nested_groups"&gt;Documentation Here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Combining mod_auth_ldap along with &lt;a href="http://httpd.apache.org/docs/2.0/mod/core.html#limitexcept"&gt;&amp;lt;LimitExcept&amp;gt;&lt;/a&gt; enables us to create read-only access groups to the server, while allowing developers commit access.&lt;/p&gt;</description>
      <pubDate>Mon, 08 Dec 2008 15:59:42 -0000</pubDate>
      <guid>http://musteat.org/nodes/show/146</guid>
      <link>http://musteat.org/nodes/show/146</link>
    </item>
    <item>
      <title>Notes on Compiling Tomcat 6.0.18</title>
      <description>&lt;h2&gt;Why?&lt;/h2&gt;
&lt;p&gt;I needed to enable Log4j to make use of the SyslogAppender in a Linux environment.  If the Juli logger was capable of this I wouldn&amp;#8217;t have bothered.&lt;/p&gt;
&lt;h2&gt;What you need to know&lt;/h2&gt;
&lt;p&gt;You &lt;strong&gt;have&lt;/strong&gt; to use &lt;span class="caps"&gt;JDK&lt;/span&gt; 1.5.  The instructions presented &lt;a href="http://tomcat.apache.org/tomcat-6.0-doc/building.html"&gt;here&lt;/a&gt; say 1.5.x or later, but they apparently mean 1.5 line &lt;span class="caps"&gt;ONLY&lt;/span&gt;.  &lt;span class="caps"&gt;JDK&lt;/span&gt; 1.6 can not compile the &lt;span class="caps"&gt;DBCP&lt;/span&gt; dependency due to a backwards incompatible change in the Java core classes.  For more information see the &lt;a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=43147"&gt;bug here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now if you are like me, you have the 1.6 &lt;span class="caps"&gt;JDK&lt;/span&gt; setup in a build environment to be used by default.  Since my setup is localized to a batch script I launch a powershell environment from, all I need to do was modify the parts of the environment to point to the correct Java version.  I need to put the 5 &lt;span class="caps"&gt;JDK&lt;/span&gt; Bin into my path above everything else, and update the JAVA_HOME environment variable.&lt;/p&gt;
&lt;p&gt;This being powershell, this was a pretty simple task.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
PS Z:\&amp;gt; $env:JAVA_HOME = "D:\dev\java\jdk1.5.0_15"
PS Z:\&amp;gt; $env:path = $env:JAVA_HOME + "\bin;" + $env:path
PS Z:\&amp;gt; java -version
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode)
PS Z:\&amp;gt; $env:ANT_HOME
D:\dev\Java\ant\apache-ant-1.7.0
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Then to compile&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
PS D:\dev\Java\EE\Tomcat\6.0.18\apache-tomcat-6.0.18-src&amp;gt; ant clean-depend
PS D:\dev\Java\EE\Tomcat\6.0.18\apache-tomcat-6.0.18-src&amp;gt; ant download
PS D:\dev\Java\EE\Tomcat\6.0.18\apache-tomcat-6.0.18-src&amp;gt; ant
PS D:\dev\Java\EE\Tomcat\6.0.18\apache-tomcat-6.0.18-src&amp;gt; ant -f extras.xml
&lt;/code&gt;
&lt;/pre&gt;</description>
      <pubDate>Wed, 03 Dec 2008 16:17:16 -0000</pubDate>
      <guid>http://musteat.org/nodes/show/145</guid>
      <link>http://musteat.org/nodes/show/145</link>
    </item>
  </channel>
</rss>
