<h1>Perforce Helix Server (p4d) Benchmarking with Docker</h1>
<h2>Overview</h2>
<p>This set of scripts and results shows how benchmarks were run to compare native
p4d performance with performance when p4d is run inside a Docker container.</p>
<h2>Directory structure</h2>
<p>Some of this was created manually, some by syncing the workspace in which this README is located.</p>
<pre><code>~/benchmark$ find . -type d
./root
./root/branchsubmit [db.* files for both benchmarks]
./p4 [location of scripts (and results)]
./p4/root
./p4/root/branchsubmit
./p4/ckps [checkpoint downloaded as part of benchmark]
./p4/logs [p4d logs (subdirs per benchmark)]
./p4/logs/branchsubmit
./p4/logs/browse
./p4/bin [p4d and p4 under test (r16.1)]
./p4/clients [root for clients created (subdirs per benchmark)]
./p4/clients/branchsubmit
./p4/clients/branchsubmit/branchsubmit-client
./p4/clients/browse
./p4/journals [p4d journal (subdirs per benchmark)]
./p4/journals/branchsubmit
./p4/journals/browse
./p4/docker [Dockerfile and scripts]
./p4/bin.linux26x86_64 [client application for browse benchmark]
./p4/licenses [license required for browse benchmark]
</code></pre>
<p>Note that there is a symlink in ./root/browse so that it shares the db.* files with the other benchmark.</p>
<h2>Links for benchmarks</h2>
<ul>
<li><a href="http://answers.perforce.com/articles/KB/5358">KB Article</a></li>
</ul>
<p>You will not need browse.sh and branchsubmit.sh as the customised versions are in the p4 directory.</p>
<h1>Instructions for Benchmarks</h1>
<ul>
<li>Sync the workspace containing this README!</li>
<li>Download p4 & p4d and put into ./p4/bin</li>
<li>Download the zipped checkpoint and put into ./p4/ckps</li>
<li>Create Docker container</li>
<li>Run benchmarks (see below)</li>
</ul>
<h2>Creating Docker files</h2>
<p>Assume current directory is ~/benchmark</p>
<p>Run the following:
* ./build_docker.sh</p>
<h2>Running the branchsubmit benchmark</h2>
<p>Run the following:
<em> cd p4
</em> ./branchsubmit.sh setup
<em> ./branchsubmit.sh runme
</em> ./branchsubmit.sh runme
* ./branchsubmit.sh runme</p>
<p>This creates db.* (takes 10-20 minutes so you don't want to do it all the time).
It then runs the native p4d benchmark several times (which warms up file system cache).</p>
<p>Run the Docker version:</p>
<ul>
<li>cd ~/benchmark</li>
<li>./run_branchsubmit_in_docker.sh</li>
<li>./run_branchsubmit_in_docker.sh</li>
<li>./run_branchsubmit_in_docker.sh</li>
</ul>
<p>Note that the script defaults to the "runme" action.</p>