<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/pub/Applications/RssViewTemplate/pretty-feed.xsl" type="text/xsl" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>Blog - Foswiki Blog</title>
	<link>https://blog.foswiki.org/Blog</link>
	<atom:link href="https://blog.foswiki.org/Blog/WebRss" rel="self" type="application/rss+xml" />
	<description>Foswiki project blog</description>
	<image>
		<url>/pub/System/FoswikiOrgContrib/assets/logo.svg</url>
		<title>Blog - Foswiki Blog</title>
		<link>https://blog.foswiki.org/Blog</link>
	</image>
	<language>en-us</language>
	<copyright>Copyright 2025 by contributing authors</copyright>
<item>
       <title>Foswiki 2.1.9 is released</title>
       <link>https://blog.foswiki.org/Blog/Foswiki219IsReleased</link>
       <guid>https://blog.foswiki.org/Blog/Foswiki219IsReleased</guid>
       <dc:creator>Michael Daum</dc:creator>
       <dc:date>2025-01-13T18:11:44Z</dc:date>
       <category>Release</category> <category>features</category>
<category>performance</category>
       <description> <![CDATA[
<p></p>

<img loading='lazy'  src='https://blog.foswiki.org/pub/Blog/Foswiki219IsReleased/igp_991dbba069922ef7a6298c5e463e9429_FoswikisLatest_8.png'  class='imagePlain imagePlain_none '  alt='FoswikisLatest 8.png' title='FoswikisLatest 8.png' width='800' height='516'   style='width:100%;height:auto' /><p class='p'>Foswiki-2.1.9 is now available for download! We are delighted to announce the new release, which includes 57 significant bug fixes compared to the previous 2.1.8 version. 
This update addresses a range of important issues and enhances the overall stability and performance.</p>

See the <a href='https://foswiki.org/System/ReleaseNotes02x01#Foswiki_Release_2.1.9_Details' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>release notes</a> for additional information.
<p></p>

<h2 id="Optimizing_Storage_Performance">  Optimizing Storage Performance </h2>
<p class='p'>This release focuses on performance optimization, building upon Foswiki's historical struggles with disk I/O bottlenecks. 
Traditionally, for each request, the engine would access multiple files to compile the necessary objects required to render a wiki page. 
This was particularly true for preference settings and access control rights, which often necessitated loading complex combinations of objects. 
To address this issue, extensive profiling has been conducted to identify areas where time can be shaved off. 
Notably, our analysis reveals that we have a performance window between 300ms and 1 second in which to make further optimizations, allowing us to fine-tune the engine's efficiency.</p>

See <a href='https://foswiki.org/Tasks/Item15206' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Item15206</a> for more details.
<p></p>

<h2 id="Optimizing_renaming_47deleting_webs">  Optimizing renaming/deleting webs </h2>
<p class='p'>In large wikis renaming/deleting webs takes forever with the web-server's connection to the Foswiki backend timing out.
This was caused by the system iterating over all of the wiki for all of the topics contained in the web to be renamed. 
In most cases this type of rewriting links isn't required or even desirable.</p>

See <a href='https://foswiki.org/Tasks/Item15333' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Item15333</a> and <a href='https://foswiki.org/Tasks/Item15220' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Item15220</a> for more details.
<p></p>

<h2 id="Optimizing_loading_CSS_44_JavaScript_and_I18n_files">  Optimizing loading CSS, JavaScript and I18n files </h2>
<p class='p'>A significant contributor to slow page loading times is the sheer volume of assets being loaded. 
Each wiki page may require a unique set of CSS and JavaScript files, which can be substantial in number. 
However, there are common core functionalities that need to be loaded on every page, while additional assets might be required only for specific cases. 
To address this, Foswiki now allows for the predefinition of this core set of assets, which can then be compiled into a single combined chunk. 
This approach reduces the number of parallel HTTP requests needed to load a page, resulting in improved performance.</p>

See <a href='https://foswiki.org/Tasks/Item15229' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Item15229</a> for more details.
<p></p>

<h2 id="Get_started_with_Foswiki_today_33">  Get started with Foswiki today! </h2>
<p></p>

Download it immediately from various locations, as detailed on our <strong><a href='https://foswiki.org/Download/FoswikiRelease02x01x09' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>download page</a></strong>. 
If you encounter any issues during installation, please submit a report through our <a href='https://foswiki.org/Tasks/WebHome' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>task tracker</a> for assistance.
For further guidance, visit our <a href='https://foswiki.org/System/SystemRequirements' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>System Requirements</a> and <a href='https://foswiki.org/System/InstallationGuide' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Installation Guide</a> pages. 
<p></p>

When reporting problems or requesting support, kindly use our task tracker. You can also reach us online via <a href='https://foswiki.org/Support/GetLiveSupport' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>IRC or Slack channels</a>.
<p class='p'></p>

<p>Tags: features, performance</p>

      ]]></description>
    </item>
<item>
       <title>Foswiki 2.1.8 is released</title>
       <link>https://blog.foswiki.org/Blog/Foswiki218IsReleased</link>
       <guid>https://blog.foswiki.org/Blog/Foswiki218IsReleased</guid>
       <dc:creator>Michael Daum</dc:creator>
       <dc:date>2023-08-07T09:15:02Z</dc:date>
       <category>Release</category> <category>security</category>
       <description> <![CDATA[
<p></p>

<img loading='lazy'  src='https://blog.foswiki.org/pub/Blog/Foswiki218IsReleased/igp_9231194886ad611cf8181f707f0c8bba_FoswikisLatest_28.png'  class='imagePlain imagePlain_none '  alt='FoswikisLatest 28.png' title='FoswikisLatest 28.png' width='800' height='572'   style='width:100%;height:auto' /><p class='p'>We are very pleased to announce the availability of Foswiki 2.1.8.
This release contains 61 fixes relative to 2.1.7, including 9 critical security related fixes.</p>

<div class="foswikiWarningMessage">
<strong>Upgrading to Foswiki 2.1.8 is highly recommended.</strong>
</div>
<p class='p'>Most notable are:</p>
 <ul>
<li> CVE-2023-33756: SpreadSheetPlugin's EVAL feature exposes information about paths and files on the server
</li> <li> CVE-2023-24698: Local file inclusion vulnerability in viewfile
</li></ul> 
<p class='p'>But also:</p>
 <ul>
<li> directories in working directory are created as world writable 777 permissions
</li> <li> possible XSS attack in attachment comments
</li> <li> restricted allowed protocols to http and https, i.e. forbid file protocol for local file inclusion
</li> <li> prevent symlink attacks by defaulting to a secure location for temporary files
</li> <li> update to jquery-ui 1.13.2
</li> <li> backport patch to earlier jQuery versons to fix a potential XSS vulnerability
</li> <li> possible XSS vulnerability in topic title field
</li></ul> 
<p></p>

For more details read the <a href='https://foswiki.org/System/ReleaseNotes02x01#Foswiki_Release_2.1.8_Details' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>release notes</a>
<p></p>

You can download it from different locations immediately, see our
<a href='https://foswiki.org/Download/FoswikiRelease02x01x08' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>download page</a> for
details. Please use our <a href='https://foswiki.org/Tasks/WebHome' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>task tracker</a> to report any issues.
Or contact us on <a href='https://foswiki.org/Support/GetLiveSupport' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>online</a> via IRC or Slack.
<p></p>

For installation information, see the <a href='https://foswiki.org/System/SystemRequirements' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>System Requirements</a> and the 
<a href='https://foswiki.org/System/InstallationGuide' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Installation Guide</a>.
<p class='p'></p>

<p class='p'></p>

<p class='p'></p>

<p>Tags: security</p>

      ]]></description>
    </item>
<item>
       <title>Updating Docker-Foswiki to 2.1.7</title>
       <link>https://blog.foswiki.org/Blog/UpdatingDockerFoswikiTo217</link>
       <guid>https://blog.foswiki.org/Blog/UpdatingDockerFoswikiTo217</guid>
       <dc:creator>Timothy Legge</dc:creator>
       <dc:date>2023-04-14T06:21:50Z</dc:date>
       <category>Release</category> <category>docker</category>
<category>installation</category>
<category>migration</category>
<category>update</category>
       <description> <![CDATA[
<p></p>

<img loading='lazy'  src='https://blog.foswiki.org/pub/Blog/UpdatingDockerFoswikiTo217/igp_bd14cb7c624b4cb2a55894c95c6ee0f3_Foswiki-Docker-3.png'  class='imagePlain imagePlain_right '  alt='Foswiki-Docker-3.png' title='Foswiki-Docker-3.png' width='300' height='193'    /><a href='https://hub.docker.com/r/timlegge/docker-foswiki' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>timlegge/docker-foswiki</a> has been updated to Foswiki 2.1.7. What you need to know to upgrade your instance.
<p class='p'></p>

<div class="foswikiToc" id="foswikiTOC"> <ul>
<li> <a href="#Introduction"> Introduction </a>
</li> <li> <a href="#Persistent_Volumes"> Persistent Volumes </a>
</li> <li> <a href="#Upgrading"> Upgrading </a> <ul>
<li> <a href="#Example_Steps_assuming_your_Docker_Container_can_access_the_Internet"> Example Steps assuming your Docker Container can access the Internet </a>
</li> <li> <a href="#Example_Steps_assuming_your_Docker_Container_cannot_access_the_Internet"> Example Steps assuming your Docker Container cannot access the Internet </a>
</li></ul> 
</li></ul> 
</div>
<p></p>

<h2 id="Introduction">  Introduction </h2>
<p></p>

With the first release of Foswiki since I started maintaining timlegge/docker-foswiki I wondered how painful the upgrade would be. I had vague visions of <a href="/Blog/MigratingFoswiki119OnUbuntuToFoswiki216OnDocker">Migrating Foswiki 1.1.9 on Ubuntu to Foswiki 2.1.6 on Docker</a> which was certainly an undertaking.
<p class='p'>No, it was much simpler than that but the nature of Docker images means its a little different.</p>

<h2 id="Persistent_Volumes">  Persistent Volumes </h2>
<p class='p'>In order for a docker instance to host something like Foswiki it needs persistent volumes. That is a place to hold the changing content. In timelegge/docker-foswiki the provided docker compose files esentially put the entire Foswiki website on a persistent volume. The way Foswiki automatically inter-mingles some of the data and code (or more properly automatically generates content sections under data) makes it difficult to do anything else.</p>

<p class='p'>So, simply pulling the latest Docker image for timlegge/docker-foswiki means you get all the updated alpine linux packages but Foswiki remains at the same version.</p>

<h2 id="Upgrading">  Upgrading </h2>
<p></p>

The steps are pretty minor and are essentially the exact came that are documented at <a href='https://foswiki.org/Download/FoswikiRelease02x01x07' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>here</a>.
<p></p>
 <ol>
<li> Download <a href='https://github.com/foswiki/distro/releases/download/FoswikiRelease02x01x07/Foswiki-upgrade-2.1.7.tgz' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>the upgrade package</a>
</li> <li> Copy it to your Docker Image's persistent volume
</li> <li> Unzip/tar over the existing Foswiki Installation
</li> <li> Save the updated LocalSite.cfg
</li> <li> Restart your Docker Container
</li></ol> 
<p></p>

<h3 id="Example_Steps_assuming_your_Docker_Container_can_access_the_Internet">  Example Steps assuming your Docker Container can access the Internet </h3>
<p></p>

<pre class='bash'>
docker exec -it docker-foswiki /bin/bash
cd /var/www/foswiki
wget https://github.com/foswiki/distro/releases/download/FoswikiRelease02x01x07/Foswiki-upgrade-2.1.7.tgz 
tar --strip-components&#61;1 -zxf Foswiki-upgrade-2.1.7.tgz 
cd tools
./configure --save
rm Foswiki-upgrade-2.1.7.tgz
exit
</pre>
<p class='p'>Then you simply need to restart your docker image to cache the updated Perl Code</p>

<h3 id="Example_Steps_assuming_your_Docker_Container_cannot_access_the_Internet">  Example Steps assuming your Docker Container cannot access the Internet </h3>
<p></p>

<pre class='bash'>
wget https://github.com/foswiki/distro/releases/download/FoswikiRelease02x01x07/Foswiki-upgrade-2.1.7.tgz
cp Foswiki-upgrade-2.1.7.tgz /var/lib/docker/volumes/foswiki&#95;foswiki&#95;www/&#95;data
docker exec -it docker-foswiki /bin/bash
cd /var/www/foswiki
tar --strip-components&#61;1 -zxf Foswiki-upgrade-2.1.7.tgz 
cd tools
./configure --save
rm Foswiki-upgrade-2.1.7.tgz
exit
</pre>
<p></p>

<p>Tags: docker, installation, migration, update</p>

      ]]></description>
    </item>
<item>
       <title>Foswiki 2.1.7 is released</title>
       <link>https://blog.foswiki.org/Blog/Foswiki217IsReleased</link>
       <guid>https://blog.foswiki.org/Blog/Foswiki217IsReleased</guid>
       <dc:creator>Michael Daum</dc:creator>
       <dc:date>2024-12-28T13:45:59Z</dc:date>
       <category>Release</category> <category>security</category>
       <description> <![CDATA[
<p class='p'>We are very pleased to announce the availability of Foswiki 2.1.7.
This release addresses significant security issues we discovered in all previous Foswiki releases.</p>

<strong>Upgrade to Foswiki 2.1.7 is highly recommended.</strong>
<p></p>

This release comes with a total of 110 fixes and enhancements as well as 7 security fixes.
For more details read the <a href='https://foswiki.org/System/ReleaseNotes02x01#Important_changes_in_Foswiki_2.1.7' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>release notes</a>
<p></p>

You can download it from different locations immediately, see our
<a href='https://foswiki.org/Download/FoswikiRelease02x01x07' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>download page</a> for
details. Please use our <a href='https://foswiki.org/Tasks/WebHome' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>task tracker</a> to report any issues.
Or contact us on <a href='https://foswiki.org/Support/GetLiveSupport' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>online</a> via IRC or Slack.
<p></p>

For installation information, see the <a href='https://foswiki.org/System/SystemRequirements' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>System Requirements</a> and the 
<a href='https://foswiki.org/System/InstallationGuide' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Installation Guide</a>.
<p class='p'></p>

<p class='p'></p>

<p>Tags: security</p>

      ]]></description>
    </item>
<item>
       <title>Foswiki, Docker and performance: Examples</title>
       <link>https://blog.foswiki.org/Blog/FoswikiDockerAndPerformanceExample</link>
       <guid>https://blog.foswiki.org/Blog/FoswikiDockerAndPerformanceExample</guid>
       <dc:creator>Bram van Oosterhout</dc:creator>
       <dc:date>2025-01-27T17:10:17Z</dc:date>
       <category>TOP</category> <category>development</category>
<category>installation</category>
<category>performance</category>
       <description> <![CDATA[
<p></p>

I have spent some time setting up an Apache Foswiki docker container to use as the basis for some course material. I wanted a container that started quickly and worked in the <a href='https://www.katacoda.com/' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Katacoda</a> course environment. I also wanted it to have good response times , which prompted me to try various "optimisations" that are available in Apache and Foswiki. Since it is easy to set up multiple environments in Katacoda/Docker, my curiosity got the better of me and I decided to compare and contrast. It sent me down a few rabbit holes and I thought the results might be of interest to others. So here is the write up.
<p class='p'></p>

The Katacoda scenario is available at <a href='https://www.katacoda.com/bramvanoosterhout-tutorial/courses/foswiki0/dockerfoswiki' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Katacoda tutorials</a> You can login with your <code>GitHub</code> <em>userid</em> and <em>password</em>.  The scenario builds 5 different environments and measures their performance. The environments are:
<p class='p'></p>

<table class="foswikiTable">
	<thead>
		<tr class="foswikiTableOdd">
			<th class="foswikiTableCol0 foswikiFirstCol"> <a href="/Blog/WebRss?sortcol=0;table=1;up=0#sorted_table" rel="nofollow" title="Sort by this column">Environment</a> </th>
			<th class="foswikiTableCol1 foswikiLastCol"> <a href="/Blog/WebRss?sortcol=1;table=1;up=0#sorted_table" rel="nofollow" title="Sort by this column">Supports</a> </th>
		</tr>
	</thead>
	<tbody>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol"> CGI </td>
			<td class="foswikiTableCol1 foswikiLastCol"> The out of the box Foswiki install with the standard CGI configuration file. This illustrates the standard performance. </td>
		</tr>
		<tr class="foswikiTableOdd">
			<td class="foswikiTableCol0 foswikiFirstCol"> CGI-gz </td>
			<td class="foswikiTableCol1 foswikiLastCol"> The CGI environment, with support for the delivery of the pre-zipped <code>js</code> and <code>css</code> files. This will reduce the volume of data to be transported to render the page </td>
		</tr>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol"> PageOpt </td>
			<td class="foswikiTableCol1 foswikiLastCol"> The CGI environment with the <code>PageOptimizerPlugin</code> configured. This will reduce the number of files to be requested to render the page. One <code>js</code> and one <code>css</code> file </td>
		</tr>
		<tr class="foswikiTableOdd">
			<td class="foswikiTableCol0 foswikiFirstCol"> CGI-deflate </td>
			<td class="foswikiTableCol1 foswikiLastCol"> The CGI environment with the Apache <code>mod_deflate</code> enabled. This will reduce the volume of data to be transported to render the page </td>
		</tr>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> FCGI </td>
			<td class="foswikiTableCol1 foswikiLastCol foswikiLast"> The foswiki install with the Fast CGI configuration file and Apache <code>mod_fcgid</code> installed </td>
		</tr>
	</tbody></table>
<p class='p'></p>

<p class='p'>In the first instance I measured page download times using  a simple technique:</p>

<pre>
/usr/bin/time --quiet -f &#34;&#37;e&#34; wget -pq --header&#61;&#34;accept-encoding: gzip&#34; --no-check-certificate --delete-after https://localhost/foswiki
</pre>
<p></p>

This command will download all the components for the <code>Main.WebHome</code> page and print the time it took for the command to complete. My first results were:
<p></p>

<table class="foswikiTable">
	<tbody>
		<tr class="foswikiTableOdd">
			<th class="foswikiTableCol0 foswikiFirstCol"> Environment </th>
			<th colspan="3"> from the <code>localhost</code> (ms) </th>
			<th colspan="3"> from my home server (ms) </th>
		</tr>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol"> &nbsp; </td>
			<td class="foswikiTableCol1"> first </td>
			<td class="foswikiTableCol2"> second </td>
			<td class="foswikiTableCol3"> third </td>
			<td class="foswikiTableCol4"> first </td>
			<td class="foswikiTableCol5"> avg (4) </td>
			<td class="foswikiTableCol6 foswikiLastCol"> std dev </td>
		</tr>
		<tr class="foswikiTableOdd">
			<td class="foswikiTableCol0 foswikiFirstCol"> CGI </td>
			<td class="foswikiTableCol1"> 600 </td>
			<td class="foswikiTableCol2"> 570 </td>
			<td class="foswikiTableCol3"> 630 </td>
			<td class="foswikiTableCol4"> 1100 </td>
			<td class="foswikiTableCol5"> 690 </td>
			<td class="foswikiTableCol6 foswikiLastCol"> 105 </td>
		</tr>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol"> CGI-gz </td>
			<td class="foswikiTableCol1"> 640 </td>
			<td class="foswikiTableCol2"> 570 </td>
			<td class="foswikiTableCol3"> 580 </td>
			<td class="foswikiTableCol4"> 700 </td>
			<td class="foswikiTableCol5"> 685 </td>
			<td class="foswikiTableCol6 foswikiLastCol"> 82 </td>
		</tr>
		<tr class="foswikiTableOdd">
			<td class="foswikiTableCol0 foswikiFirstCol"> PageOpt </td>
			<td class="foswikiTableCol1"> 630 </td>
			<td class="foswikiTableCol2"> 640 </td>
			<td class="foswikiTableCol3"> 600 </td>
			<td class="foswikiTableCol4"> 700 </td>
			<td class="foswikiTableCol5"> 700 </td>
			<td class="foswikiTableCol6 foswikiLastCol"> 105 </td>
		</tr>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol"> CGI-deflate </td>
			<td class="foswikiTableCol1"> 700 </td>
			<td class="foswikiTableCol2"> 660 </td>
			<td class="foswikiTableCol3"> 650 </td>
			<td class="foswikiTableCol4"> 870 </td>
			<td class="foswikiTableCol5"> 687 </td>
			<td class="foswikiTableCol6 foswikiLastCol"> 58 </td>
		</tr>
		<tr class="foswikiTableOdd">
			<td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> Fast CGI </td>
			<td class="foswikiTableCol1 foswikiLast"> 660 </td>
			<td class="foswikiTableCol2 foswikiLast"> 170 </td>
			<td class="foswikiTableCol3 foswikiLast"> 170 </td>
			<td class="foswikiTableCol4 foswikiLast"> 690 </td>
			<td class="foswikiTableCol5 foswikiLast"> 682 </td>
			<td class="foswikiTableCol6 foswikiLastCol foswikiLast"> 101 </td>
		</tr>
	</tbody></table>
<p></p>

In the first instance, these numbers were rather perplexing. All the timings are with 2 standard deviations of one another. No different! Except for the first CGI measurement on my home server (which is also the first measurement against the platform) And the second and third Fast CGI measurement on the <code>localhost</code>. The 1100ms on my home server is likely caused by a DNS lookup that is cached for the subsequent experiments. And the change in the Fast CGI measurement between the first and second sample is caused by the startup of <code>foswiki.fcgi</code>, which is not repeated in the later retrievals.
<p></p>

But all other timings are around 650 +/- 200 ms with 95% confidence. Judging from the Fast CGI measurements on <code>localhost</code>, the time is mostly taken up in the transport of the various elements and the server delivers them faster to the network than the network can deliver them to the client in all configurations.
<p></p>

To look at this further, I tried several tools that measure web page download speed. I used Dynomapper's blog <a href='https://dynomapper.com/blog/21-sitemaps-and-seo/457-top-15-tools-for-measuring-website-or-application-speed' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Top 15 tools for measuring website or application speed</a> as a guide an got some interesting insights.
<p></p>

<a href='https://tools.pingdom.com/' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Pingdom</a> gave me the first confirmation that the different configurations were actually working.
<p></p>

<table class="foswikiTable">
	<thead>
		<tr class="foswikiTableOdd">
			<th class="foswikiTableCol0 foswikiFirstCol"> <a href="/Blog/WebRss?sortcol=0;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column">Environment</a> </th>
			<th class="foswikiTableCol1"> <a href="/Blog/WebRss?sortcol=1;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column">Grade</a> </th>
			<th class="foswikiTableCol2"> <a href="/Blog/WebRss?sortcol=2;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column">Size (kB)</a> </th>
			<th class="foswikiTableCol3"> <a href="/Blog/WebRss?sortcol=3;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column">Time (s)</a> </th>
			<th class="foswikiTableCol4"> <a href="/Blog/WebRss?sortcol=4;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column">Requests (count)</a> </th>
			<th class="foswikiTableCol5 foswikiLastCol"> <a href="/Blog/WebRss?sortcol=5;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column">Comment</a> </th>
		</tr>
	</thead>
	<tbody>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol"> CGI </td>
			<td class="foswikiTableCol1"> C 74 </td>
			<td class="foswikiTableCol2"> 242.9 </td>
			<td class="foswikiTableCol3"> 3.67 </td>
			<td class="foswikiTableCol4"> 36 </td>
			<td class="foswikiTableCol5 foswikiLastCol"> The baseline configuration </td>
		</tr>
		<tr class="foswikiTableOdd">
			<td class="foswikiTableCol0 foswikiFirstCol"> CGI-gz </td>
			<td class="foswikiTableCol1"> C 74 </td>
			<td class="foswikiTableCol2"> 125.2 </td>
			<td class="foswikiTableCol3"> 3.39 </td>
			<td class="foswikiTableCol4"> 36 </td>
			<td class="foswikiTableCol5 foswikiLastCol"> Reduced download size for zipped .css and .js </td>
		</tr>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol"> PageOpt </td>
			<td class="foswikiTableCol1"> C 76 </td>
			<td class="foswikiTableCol2"> 239.3 </td>
			<td class="foswikiTableCol3"> 3.83 </td>
			<td class="foswikiTableCol4"> 29 </td>
			<td class="foswikiTableCol5 foswikiLastCol"> Reduced requests due to <code>PageOptimizerPlugin</code> </td>
		</tr>
		<tr class="foswikiTableOdd">
			<td class="foswikiTableCol0 foswikiFirstCol"> CGI-deflate </td>
			<td class="foswikiTableCol1" style="text-align:right"> C 74 </td>
			<td class="foswikiTableCol2"> 242.8 </td>
			<td class="foswikiTableCol3"> 3.51 </td>
			<td class="foswikiTableCol4"> 36 </td>
			<td class="foswikiTableCol5 foswikiLastCol"> No noticeable change. The Katacoda <code>nginx</code> proxy unzips the result. (<a href='https://serverfault.com/questions/731247/nginx-reverse-proxy-how-to-pass-through-accept-encoding-header-to-back-end-se' class='natExternalLink' rel='nofollow noopener noreferrer' target='_blank'>Serverfault</a>). Apache debug shows compression is done. Timing diagram shows that response from the server for jquery-2.2.4.js (85.6kB) takes 220ms ve 82ms in the CGI environment. Compressing on the fly creates overhead </td>
		</tr>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> Fast CGI </td>
			<td class="foswikiTableCol1 foswikiLast"> C 74 </td>
			<td class="foswikiTableCol2 foswikiLast"> 241.6 </td>
			<td class="foswikiTableCol3 foswikiLast"> 3.76 </td>
			<td class="foswikiTableCol4 foswikiLast"> 36 </td>
			<td class="foswikiTableCol5 foswikiLastCol foswikiLast"> No noticeable change </td>
		</tr>
	</tbody></table>
<p></p>

Looking at the detailed timings shown in Pingdom, you will notice that most of the time is recorded as <em>Wait</em> time. Wait time is made up of a number of components:
<p></p>

<table class="foswikiTable">
	<thead>
		<tr class="foswikiTableOdd">
			<th class="foswikiTableCol0 foswikiFirstCol"> <a href="/Blog/WebRss?sortcol=0;table=4;up=0#sorted_table" rel="nofollow" title="Sort by this column">Component</a> </th>
			<th class="foswikiTableCol1 foswikiLastCol"> <a href="/Blog/WebRss?sortcol=1;table=4;up=0#sorted_table" rel="nofollow" title="Sort by this column">Abbreviation</a> </th>
		</tr>
	</thead>
	<tbody>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol"> Time to send the request from the browser to the server </td>
			<td class="foswikiTableCol1 foswikiLastCol"> <code>Tsend</code> </td>
		</tr>
		<tr class="foswikiTableOdd">
			<td class="foswikiTableCol0 foswikiFirstCol"> Time to retrieve the requested object from disk </td>
			<td class="foswikiTableCol1 foswikiLastCol"> <code>Tget</code> </td>
		</tr>
		<tr class="foswikiTableEven">
			<td class="foswikiTableCol0 foswikiFirstCol"> Time to process the requested object for transmission </td>
			<td class="foswikiTableCol1 foswikiLastCol"> <code>Tprocess</code> </td>
		</tr>
		<tr class="foswikiTableOdd">
			<td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> Time to return the requested object from the server to the browser </td>
			<td class="foswikiTableCol1 foswikiLastCol foswikiLast"> <code>Treturn</code> </td>
		</tr>
	</tbody></table>
<p class='p'>Tsend and Treturn are defined by the network properties,I will assume that they are constant across elements for a single measurement. Tget is a server property and will be relatively constant across elements (ignoring disk transfer time, which will depend of element size). Tprocess will be zero for the static elements.</p>

This is probably a naive model, but it gave me the idea that <code>Tprocess</code> should be zero for static elements (js, css, png, etc...). And Pingdom creates a <code>JSON</code> file with all the measurements for down load, the HTTP archive file (HAR). I took measurements in three different environments. The results were revealing. 
<p></p>

<h3 id="Environment_45_Tinkerbell_Apache_CGI">  Environment - Tinkerbell Apache CGI </h3>
<p></p>

<img loading='lazy'  src='https://blog.foswiki.org/pub/Blog/FoswikiDockerAndPerformanceExample/TinkerbellCGI.PNG'  class='imagePlain imagePlain_right '  alt='TinkerbellCGI.PNG' title='TinkerbellCGI.PNG' width='371' height='288'    />The graph on the right shows the wait times for the objects retrieved to create the <code>Main.WebHome</code> page. All but one are static elements. And there is one clear outlier: The <code>html</code> whch has a wait time of almost 4 seconds! Tinkerbell is a 20 year old machine, with a very low power consumption that has been running in my basement non stop for all that time. It's not built for high powered processing and it illustrates the point that creating html needs cpu and memory. From the graph you can also see that the static elements wait varying times, but that large elements do not necessarily create a longer wait. The median wait time at Tinkerbell is 246 ms. And all elements are retrieved in approximately that time.  
<p></p>

<h3 id="Environment_45_Katacoda_Apache_CGI">  Environment - Katacoda Apache CGI </h3>
<p></p>

<img loading='lazy'  src='https://blog.foswiki.org/pub/Blog/FoswikiDockerAndPerformanceExample/KatacodaCGI.PNG'  class='imagePlain imagePlain_left '  alt='KatacodaCGI.PNG' title='KatacodaCGI.PNG' width='361' height='285'    />Next I did the same experiment in my Katacoda Apache CGI environment. It's a docker container in a docker container, so it will have some overheads. But it is likely to have a much better cpu and probably more memory too. The results are in the graph on the left. There is again a single outlier: the html that now has a wait time of 730 ms. So more iron improved the wait time for Main.Webhome four fold. At the same time, you can see that the there is some spread in the wait times of the static elements. To my surprise, the mediam wait time for static elements went up to 323 ms. I won't speculate why this is longer than for Tinkerbell. But it does suggest that the actual processing time for <code>Main.Webhome</code> can be as short and 730-323=407 ms. The rest is starting <code>perl</code> and getting <code>Main/WebHome.txt</code> from disk.
<p></p>

<h3 id="Environment_45_Katacoda_Apache_Fast_CGI">  Environment - Katacoda Apache Fast CGI </h3>
<p></p>

<img loading='lazy'  src='https://blog.foswiki.org/pub/Blog/FoswikiDockerAndPerformanceExample/KatacodaFCGI.PNG'  class='imagePlain imagePlain_right '  alt='KatacodaFCGI.PNG' title='KatacodaFCGI.PNG' width='401' height='291'    />If starting <code>perl</code> is a substantial overhead in retrieving the <code>Main.WebHome</code> page, then the wait time can be reduced further by configuring Apache and Foswiki with FCGI. The results in my Katacoda Apache FCGI environment are shown in the graph on the right. The median processing time for the static elements in this sample is 408 ms, demonstrating how unreliable my arguments here are. But wait time for <code>Main.WebHome</code> has disappeared in the noise! The actual number is: 229 ms.
<p></p>

<span class='foswikiClear'></span>
<p></p>

So what does all this mean for the performance of Foswiki.  <ul>
<li> The result that surprised me most is the the wait times in the retrieval of the static elements. It should be noted that many of these elemnts are retrieved in parallel, but only after the the html has been evaluated in the browser. So it seems one should expect at least 200-400 ms delay in the retrieval of a page for the static elements. Caching these elements in the browser will help improve the overall performance. But the first encounter is sensitive to this wait time.
</li> <li> Use <code>FastCGI</code>. It will reduce the wait time for <code>html</code> generation. In the Katacoda Apache FCGI environment it takes 500 ms to start, which are a consistent overhead on each transaction if you use regular CGI.
</li> <li> If you want to improve performance beyond what Fast CGI gives you, use a server with more generous specifications. More cpu and more memory make a difference.
</li> <li> Pre-zipped elements provided with Foswiki may make a difference on slow networks, but they will have no effect on the wait time. And for most elements, the wait time is 99% of the total time to receive the element.
</li> <li> Apache <code>mod_deflate</code> is unlikely to make any improvement in the performance of your Foswiki site. The time taken to compress and decompress is added to the time it takes to retrieve the element from disk. It may help on a slow network, but you should check if it is worth it.
</li> <li> <code>PageOptimizerPlugin</code>. This plugin collects all static <code>css</code> and <code>js</code> in one <code>css</code> and one <code>js</code> file and caches the result. From the server side perspective there are now two files to serve instead of say 10. But since the  the retrieval is parallel, you are still stuck with whatever wait time is associated with the two files. At least 200 ms. Sites like Pingdom and many others recommend reducing the number of static elements per page to retrieve, because the browser needs the <code>css</code> and <code>js</code> before it can render the page. So combining the elements together may improve the user experience.
</li></ul> 
<p class='p'></p>

<p>Tags: development, installation, performance</p>

      ]]></description>
    </item>
</channel></rss>
