Optimising Paloose Performance

Some Background

First of all it is useful to look at the performance of a completely "vanilla" system. The test server I used was a Linux box with the following specification:

Not the most highly specified machine but it served — its history is simple: my son had a bag of bits that he did not know what to do with, so I added a case and PSU and gained a new machine.

First of all to produce a bench mark I ran some tests (using siege) running on my local network. The server is connected to this network wirelessly via a Netgear DG834G router, while the siege machine, which was a MacPro G5 running Mac OS-X Leopard. Nothing very outstanding here but more than sufficient to get some representative results.

The first test was to run the siege test on Apache (using the same HTML version of the XML Paloose test file) and also the same with Tomcat running 2.1.10 Cocoon (caching on). These were run against an identical set of XML files and transforms in Paloose. The sitemap was:

Test sitemap
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <map:components> <map:generators default="file"> <map:generator name="file" src="resource://lib/generation/FileGenerator"/> </map:generators> <map:transformers default="xslt"> <map:transformer name="xslt" src="resource://lib/transforming/TRAXTransformer"> <map:use-request-parameters>true</map:use-request-parameters> </map:transformer> <map:transformer name="i18n" src="resource://lib/transforming/I18nTransformer"> <map:catalogues default="index"> <map:catalogue id="index" name="index" location="context://content/translations"/> </map:catalogues> <map:untranslated-text>untranslated text</map:untranslated-text> </map:transformer> </map:transformers> <map:serializers default="xml"> <map:serializer name="html" mime-type="text/html" src="resource://lib/serialization/HTMLSerializer"> <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public> <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system> <encoding>iso-8859-1</encoding> </map:serializer> <map:serializer name="xhtml" mime-type="text/html" src="resource://lib/serialization/XHTMLSerializer"> <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public> <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system> <encoding>iso-8859-1</encoding> </map:serializer> <map:serializer name="text" mime-type="text/plain" src="resource://lib/serialization/TextSerializer"/> <map:serializer name="xml" mime-type="text/xml" src="resource://lib/serialization/XMLSerializer"/> </map:serializers> <map:matchers default="wildcard"> <map:matcher name="wildcard" src="resource://lib/matching/WildcardURIMatcher"/> <map:matcher name="regexp" src="resource://lib/matching/RegexpURIMatcher"/> </map:matchers> <map:readers default="resource"> <map:reader name="resource" src="resource://lib/reading/ResourceReader"/> </map:readers> <map:selectors default="browser"> <map:selector name="browser" src="resource://lib/selection/BrowserSelector"> <browser name="explorer" useragent="MSIE"/> ... <browser name="netscape" useragent="Mozilla"/> <browser name="safari" useragent="Safari"/> </map:selector> </map:selectors> </map:components> <map:pipelines> <map:pipeline> <map:match pattern="**.html"> <map:generate src="context://content/{1}.xml" label="xml-content"/> <map:transform src="context://resources/transforms/page2html.xsl" label="page-transform"> <map:parameter name="page" value="{1}"/> </map:transform> <map:transform src="context://resources/transforms/stripNamespaces.xsl"/> <map:serialize type="html"/> </map:match> </map:pipeline> <map:handle-errors> <map:generate src="context://content/error.xml"/> <map:transform src="context://resources/transforms/error2html.xsl"/> <map:serialize type="html"/> </map:handle-errors> </map:pipelines> </map:sitemap>

While not as simple as it could be it is reasonably representative of a single sitemap site. Note that there are no subsitemaps. The XML content was also suitably simple at about 200 lines of trivial XML. The XSL transforms were also suitably pared down from those that serve this Paloose site. In fact we are not looking for absolute speeds here, merely comparisons betwen the benchmark of Apache and Tomcat/Cocoon against Paloose.

As can be seen from the graph below Paloose does not score highly against Apache or a cached Tomcat/Cocoon. This is quite expected and a result of many factors: PHP, parsing the sitemaps each time, using DOM instead of SAX in the sitemap pipeline. The best we can say is that there is room for improvement and that all the sites that I have run have not needed the raw speed that Apache or Tomcat could deliver. It is also another reason why Apache should be used to serve the files hat Paloose does not deal with (CSS, graphics etc).

The next page looks at how we can increase the performance

Copyright 2006 – 2017 Hugh Field-Richards. All Rights Reserved.