dhcp-perf-guide.html 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. <html><head>
  2. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  3. <title>DHCP Performance Guide</title><link rel="stylesheet" type="text/css" href="bind10-guide.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="description" content="BIND 10 is a framework that features Domain Name System (DNS) suite and Dynamic Host Configuration Protocol (DHCP) servers with development managed by Internet Systems Consortium (ISC). This document describes various aspects of DHCP performance, measurements and tuning. It covers BIND 10 DHCP (codename Kea), existing ISC DHCP4 software, perfdhcp (a DHCP performance measurement tool) and other related topics."></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" title="DHCP Performance Guide"><div class="titlepage"><div><div><h1 class="title"><a name="d0e3"></a>DHCP Performance Guide</h1></div><div><div class="author"><h3 class="author"><span class="firstname">Tomasz</span> <span class="surname">Mrugalski</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Marcin</span> <span class="surname">Siodelski</span></h3></div></div><div><p class="releaseinfo">This is a companion document for BIND 10 version
  4. 20120817.</p></div><div><p class="copyright">Copyright &copy; 2012 Internet Systems Consortium, Inc. ("ISC")</p></div><div><div class="abstract" title="Abstract"><p class="title"><b>Abstract</b></p><p>BIND 10 is a framework that features Domain Name System
  5. (DNS) suite and Dynamic Host Configuration Protocol (DHCP)
  6. servers with development managed by Internet Systems Consortium (ISC).
  7. This document describes various aspects of DHCP performance,
  8. measurements and tuning. It covers BIND 10 DHCP (codename Kea),
  9. existing ISC DHCP4 software, perfdhcp (a DHCP performance
  10. measurement tool) and other related topics.</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#d0e28">Preface</a></span></dt><dd><dl><dt><span class="section"><a href="#acknowledgements">Acknowledgements</a></span></dt></dl></dd><dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt><dt><span class="chapter"><a href="#dhcp4">2. ISC DHCP 4.x</a></span></dt><dt><span class="chapter"><a href="#kea">3. Kea</a></span></dt><dd><dl><dt><span class="section"><a href="#d0e54">Backend performance evaluation</a></span></dt><dt><span class="section"><a href="#mysql-backend">MySQL backend</a></span></dt><dd><dl><dt><span class="section"><a href="#d0e156">MySQL tweaks</a></span></dt></dl></dd><dt><span class="section"><a href="#sqlite-ubench">SQLite-ubench</a></span></dt><dd><dl><dt><span class="section"><a href="#sqlite-tweaks">SQLite tweaks</a></span></dt></dl></dd><dt><span class="section"><a href="#memfile-ubench">memfile-ubench</a></span></dt><dd><dl><dt><span class="section"><a href="#memfile-tweaks">memfile tweaks</a></span></dt></dl></dd><dt><span class="section"><a href="#d0e245">Performance measurements</a></span></dt><dt><span class="section"><a href="#d0e521">Possible further optimizations</a></span></dt></dl></dd><dt><span class="chapter"><a href="#perfdhcp">4. perfdhcp</a></span></dt><dd><dl><dt><span class="section"><a href="#d0e533">Purpose</a></span></dt><dt><span class="section"><a href="#perfdhcp-key-features">Key features</a></span></dt><dt><span class="section"><a href="#perfdhcp-command-line">Command line options</a></span></dt><dt><span class="section"><a href="#starting-perfdhcp">Starting perfdhcp</a></span></dt><dt><span class="section"><a href="#perfdhcp-commandline-examples">perfdhcp command line examples</a></span></dt><dd><dl><dt><span class="section"><a href="#perfdhcp-basic-usage">Example: basic usage</a></span></dt><dt><span class="section"><a href="#perfdhcp-rate-control">Example: rate control</a></span></dt><dt><span class="section"><a href="#perfdhcp-templates">Example: templates</a></span></dt></dl></dd></dl></dd></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>3.1. <a href="#d0e256">Synchronous results</a></dt><dt>3.2. <a href="#d0e332">Asynchronous results</a></dt><dt>3.3. <a href="#tbl-perf-results">Estimated performance</a></dt></dl></div><div class="preface" title="Preface"><div class="titlepage"><div><div><h2 class="title"><a name="d0e28"></a>Preface</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#acknowledgements">Acknowledgements</a></span></dt></dl></div><div class="section" title="Acknowledgements"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="acknowledgements"></a>Acknowledgements</h2></div></div></div><p>ISC would like to acknowledge generous support for
  11. BIND 10 development of DHCPv4 and DHCPv6 components provided
  12. by <a class="ulink" href="http://www.comcast.com/" target="_top">Comcast</a>.</p></div></div><div class="chapter" title="Chapter&nbsp;1.&nbsp;Introduction"><div class="titlepage"><div><div><h2 class="title"><a name="intro"></a>Chapter&nbsp;1.&nbsp;Introduction</h2></div></div></div><p>
  13. This document is in its early stages of development. It is
  14. expected to grow significantly in a near future. It will
  15. cover topics like database backend perfomance measurements,
  16. pros an cons of various optimization techniques and
  17. tools.
  18. </p></div><div class="chapter" title="Chapter&nbsp;2.&nbsp;ISC DHCP 4.x"><div class="titlepage"><div><div><h2 class="title"><a name="dhcp4"></a>Chapter&nbsp;2.&nbsp;ISC DHCP 4.x</h2></div></div></div><p>
  19. TODO: Write something about ISC DHCP4 here.
  20. </p></div><div class="chapter" title="Chapter&nbsp;3.&nbsp;Kea"><div class="titlepage"><div><div><h2 class="title"><a name="kea"></a>Chapter&nbsp;3.&nbsp;Kea</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#d0e54">Backend performance evaluation</a></span></dt><dt><span class="section"><a href="#mysql-backend">MySQL backend</a></span></dt><dd><dl><dt><span class="section"><a href="#d0e156">MySQL tweaks</a></span></dt></dl></dd><dt><span class="section"><a href="#sqlite-ubench">SQLite-ubench</a></span></dt><dd><dl><dt><span class="section"><a href="#sqlite-tweaks">SQLite tweaks</a></span></dt></dl></dd><dt><span class="section"><a href="#memfile-ubench">memfile-ubench</a></span></dt><dd><dl><dt><span class="section"><a href="#memfile-tweaks">memfile tweaks</a></span></dt></dl></dd><dt><span class="section"><a href="#d0e245">Performance measurements</a></span></dt><dt><span class="section"><a href="#d0e521">Possible further optimizations</a></span></dt></dl></div><p>
  21. </p><div class="section" title="Backend performance evaluation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e54"></a>Backend performance evaluation</h2></div></div></div><p>
  22. Kea will support several different database backends, using
  23. both popular databases (like MySQL or SQLite) and
  24. custom-developed solutions (like in-memory database). BIND 10
  25. source code features set of performance microbenchmarks.
  26. These are small tools written in C/C++ that simulate expected
  27. DHCP server behaviour and evaluate the performance of
  28. considered databases. As implemented benchmarks are not really
  29. simulating DHCP operation, but rather use set of primitives
  30. that can be used by a real server, they are called
  31. micro-benchmarks.
  32. </p><p>Although there are many operations and data types that
  33. server could store in a database, the most frequently used data
  34. type is lease information. Although lease information for IPv4
  35. and IPv6 differs slightly, it is expected that the performance
  36. differences will be minimal between IPv4 and IPv6 lease operations.
  37. Therefore each test uses lease4 table for performance measurements.
  38. </p><p>All benchmarks are implemented as single threaded applications
  39. that take advantage of a single database connection.</p><p>
  40. Those benchmarks are stored in tests/tools/dhcp-ubench
  41. directory. This directory contains simplified prototypes for
  42. various DB back-ends that are planned or considered as a
  43. backend engine for BIND10 DHCP. Athough trivial now, they are
  44. expected to evolve into useful tools that will allow users to
  45. measure performance in their specific environment.
  46. </p><p>
  47. Currently the following benchmarks are implemented:
  48. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>in memory+flat file</p></li><li class="listitem"><p>SQLite</p></li><li class="listitem"><p>MySQL</p></li></ul></div><p>
  49. </p><p>
  50. As they require additional (sometimes heavy) dependencies, they are not
  51. built by default. Actually, their build system is completely separated.
  52. It will be eventually merged with the main BIND10 makefile system, but
  53. that is a low priority for now.
  54. </p><p>
  55. All benchmarks will follow the same pattern:
  56. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>prepare operation (connect to a database, create a file etc.)</p></li><li class="listitem"><p>Measure timestamp 0</p></li><li class="listitem"><p>Commit new lease4 (repeated X times)</p></li><li class="listitem"><p>Measure timestamp 1</p></li><li class="listitem"><p>Search for random lease4 (repeated X times)</p></li><li class="listitem"><p>Measure timestamp 2</p></li><li class="listitem"><p>Update existing lease4 (repeated X times)</p></li><li class="listitem"><p>Measure timestamp 3</p></li><li class="listitem"><p>Delete existing lease4 (repeated X times)</p></li><li class="listitem"><p>Measure timestamp 4</p></li><li class="listitem"><p>Print out statistics, based on X and measured timestamps.</p></li></ol></div><p>
  57. Although this approach does not attempt to simulate actual DHCP server
  58. operation that has mix of all steps intervening, it answers the
  59. questions about basic database strenghts and weak points. In particular
  60. it can show what is the impact of specific DB optimizations, like
  61. changing engine, optimizing for writes/reads etc.
  62. </p><p>
  63. The framework attempts to do the same amount of operations for every
  64. backend thus allowing fair complarison between them.
  65. </p></div><div class="section" title="MySQL backend"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-backend"></a>MySQL backend</h2></div></div></div><p>MySQL backend requires MySQL client development libraries. It uses
  66. mysql_config tool (that works similar to pkg-config) to discover required
  67. compilation and linking options. To install required packages on Ubuntu,
  68. use the following command:
  69. </p><pre class="screen">$ <strong class="userinput"><code>sudo apt-get install mysql-client mysql-server libmysqlclient-dev</code></strong></pre><p>
  70. Make sure that MySQL server is running. Make sure that you have your setup
  71. configured so there is a user that is able to modify used database.</p><p>Before running tests, you need to initialize your database. You can
  72. use mysql.schema script for that purpose. WARNING: It will drop existing
  73. Kea database. Do not run this on your production server. Assuming your
  74. MySQL user is kea, you can initialize your test database by:
  75. </p><pre class="screen">$ <strong class="userinput"><code>mysql -u kea -p &lt; mysql.schema</code></strong></pre><p>
  76. </p><p>After database is initialized, you are ready to run the test:
  77. </p><pre class="screen">$ <strong class="userinput"><code>./mysql_ubench</code></strong></pre><p>
  78. or
  79. </p><pre class="screen">$ <strong class="userinput"><code>./mysql_ubench &gt; results-&gt;mysql.txt</code></strong></pre><p>
  80. Redirecting output to a file is important, because for each operation
  81. there is a single character printed to show progress. If you have a slow
  82. terminal, this may considerably affect test perfromance. On the other hand,
  83. printing something after each operation is required, as poor DB setting
  84. may slow down operations to around 20 per second. Observant user is expected
  85. to note that initial dots are printed too slowly and abort the test.</p><p>Currently all default parameters are hardcoded. Default values can be
  86. overwritten using command line switches. Although all benchmarks take
  87. the same list of parameters, some of them are specific to a given backend
  88. type. To get a list of supported parameters, run your benchmark with -h option:
  89. </p><pre class="screen">$ <strong class="userinput"><code>./mysql_ubench -h</code></strong>
  90. This is a benchmark designed to measure expected performance
  91. of several backends. This particular version identifies itself
  92. as following:
  93. MySQL client version is 5.5.24
  94. Possible command-line parameters:
  95. -h - help (you are reading this)
  96. -m hostname - specifies MySQL server to connect (MySQL backend only)
  97. -u username - specifies MySQL user name (MySQL backend only)
  98. -p password - specifies MySQL passwod (MySQL backend only)
  99. -f name - database or filename (MySQL, SQLite and memfile)
  100. -n integer - number of test repetitions (MySQL, SQLite and memfile)
  101. -s yes|no - synchronous/asynchronous operation (MySQL, SQLite and memfile)
  102. -v yes|no - verbose mode (MySQL, SQLite and memfile)
  103. -c yes|no - should compiled statements be used (MySQL only)
  104. </pre><p>
  105. </p><div class="section" title="MySQL tweaks"><div class="titlepage"><div><div><h3 class="title"><a name="d0e156"></a>MySQL tweaks</h3></div></div></div><p>One parameter that has huge impact on performance is a a backend engine.
  106. You can get a list of engines of your MySQL implementation by using
  107. </p><pre class="screen">&gt; <strong class="userinput"><code>show engines;</code></strong></pre><p>
  108. in your mysql client. Two notable engines are MyISAM and InnoDB. mysql_ubench will
  109. use MyISAM for synchronous mode and InnoDB for asynchronous.</p></div></div><div class="section" title="SQLite-ubench"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sqlite-ubench"></a>SQLite-ubench</h2></div></div></div><p>SQLite backend requires both sqlite3 development and run-time package. Their
  110. names may vary from system to system, but on Ubuntu 12.04 they are called
  111. sqlite3 libsqlite3-dev. To install them, use the following command:
  112. </p><pre class="screen">&gt; <strong class="userinput"><code>sudo apt-get install sqlite3 libsqlite3-dev</code></strong></pre><p>
  113. Before running the test the database has to be created. Use the following command for that:
  114. </p><pre class="screen">&gt; <strong class="userinput"><code>cat sqlite.schema | sqlite3 sqlite.db</code></strong></pre><p>
  115. A new database called sqlite.db will be created. That is the default name used
  116. by sqlite_ubench test. If you prefer other name, make sure you update
  117. sqlite_ubench.cc accordingly.</p><p>Once the database is created, you can run tests:
  118. </p><pre class="screen">&gt; <strong class="userinput"><code>./sqlite_ubench</code></strong></pre><p>
  119. or
  120. </p><pre class="screen">&gt; <strong class="userinput"><code>./sqlite_ubench &gt; results-sqlite.txt</code></strong></pre><p>
  121. </p><div class="section" title="SQLite tweaks"><div class="titlepage"><div><div><h3 class="title"><a name="sqlite-tweaks"></a>SQLite tweaks</h3></div></div></div><p>To modify default sqlite_ubench parameters, command line
  122. switches can be used. Currently supported parameters are
  123. (default values specified in brackets):
  124. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>-f filename - name of the database file ("sqlite.db")</p></li><li class="listitem"><p>-n num - number of iterations (100)</p></li><li class="listitem"><p>-s yes|no - should the operations be performend in synchronous (yes)
  125. or asynchronous (no) manner (yes)</p></li><li class="listitem"><p>-v yes|no - verbose mode. Should the test print out progress? (yes)</p></li><li class="listitem"><p>-c yes|no - compiled statements. Should the SQL statements be precompiled?</p></li></ol></div><p>
  126. </p><p>SQLite can run in asynchronous or synchronous mode. This
  127. mode can be controlled by using sync parameter. It is set
  128. using (PRAGMA synchronous = ON or OFF).</p><p>Another tweakable feature is journal mode. It can be
  129. turned to several modes of operation. Its value can be
  130. modified in SQLite_uBenchmark::connect(). See
  131. http://www.sqlite.org/pragma.html#pragma_journal_mode for
  132. detailed explanantion.</p></div></div><div class="section" title="memfile-ubench"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="memfile-ubench"></a>memfile-ubench</h2></div></div></div><p>Memfile backend is custom developed prototype backend that
  133. somewhat mimics operation of ISC DHCP4. It uses in-memory
  134. storage using standard C++ and boost mechanisms (std::map and
  135. boost::shared_ptr&lt;&gt;). All database changes are also
  136. written to a lease file. That file is strictly write-only. This
  137. approach takes advantage of the fact that simple append is faster
  138. than edition with potential whole file relocation.</p><div class="section" title="memfile tweaks"><div class="titlepage"><div><div><h3 class="title"><a name="memfile-tweaks"></a>memfile tweaks</h3></div></div></div><p>To modify default memfile_ubench parameters, command line
  139. switches can be used. Currently supported parameters are
  140. (default values specified in brackets):
  141. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>-f filename - name of the database file ("dhcpd.leases")</p></li><li class="listitem"><p>-n num - number of iterations (100)</p></li><li class="listitem"><p>-s yes|no - should the operations be performend in synchronous (yes)
  142. or asynchronous (no) manner (yes)</p></li><li class="listitem"><p>-v yes|no - verbose mode. Should the test print out progress? (yes)</p></li></ol></div><p>
  143. </p><p>memfile can run in asynchronous or synchronous mode. This
  144. mode can be controlled by using sync parameter. It uses
  145. fflush() and fsync() in synchronous mode to make sure that
  146. data is not buffered and physically stored on disk.</p></div></div><div class="section" title="Performance measurements"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e245"></a>Performance measurements</h2></div></div></div><p>This section contains sample results for backend performance measurements,
  147. taken using microbenchmarks. Tests were conducted on reasonably powerful machine:
  148. </p><pre class="screen">
  149. CPU: Quad-core Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz (8 logical cores)
  150. HDD: 1,5TB Seagate Barracuda ST31500341AS 7200rpm (used only one of them), ext4 partition
  151. OS: Ubuntu 12.04, running kernel 3.2.0-26-generic SMP x86_64
  152. compiler: g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  153. MySQL version: 5.5.24
  154. SQLite version: 3.7.9sourceid version is 2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e</pre><p>
  155. </p><p>Benchmarks were run in two series: synchronous and
  156. asynchronous. As those modes offer radically different
  157. performances, synchronous mode was conducted for 1000 (one
  158. thousand) repetitions and asynchronous mode was conducted for
  159. 100000 (hundred thousand) repetitions.</p><div class="table"><a name="d0e256"></a><p class="title"><b>Table&nbsp;3.1.&nbsp;Synchronous results</b></p><div class="table-contents"><table summary="Synchronous results" border="1"><colgroup><col align="center" class="Backend"><col align="center" class="Num"><col align="center" class="Create"><col align="center" class="Search"><col align="center" class="Update"><col align="center" class="Delete"></colgroup><thead><tr><th align="center">Backend</th><th align="center">Operations</th><th align="center">Create</th><th align="center">Search</th><th align="center">Update</th><th align="center">Delete</th><th align="center">Average</th></tr></thead><tbody><tr><td align="center">MySQL</td><td align="center">1000</td><td align="center">31.603978s</td><td align="center"> 0.116612s</td><td align="center">27.964191s</td><td align="center">27.695209s</td><td align="center">21.844998s</td></tr><tr><td align="center">SQLite</td><td align="center">1000</td><td align="center">61.421356s</td><td align="center"> 0.033283s</td><td align="center">59.476638s</td><td align="center">56.034150s</td><td align="center">44.241357s</td></tr><tr><td align="center">memfile</td><td align="center">1000</td><td align="center">41.711886s</td><td align="center"> 0.000724s</td><td align="center">42.267578s</td><td align="center">42.169679s</td><td align="center">31.537467s</td></tr></tbody></table></div></div><br class="table-break"><p>Following parameters were measured for asynchronous mode.
  160. MySQL and SQLite were run with 100 thousand repetitions. Memfile
  161. was run for 1 million repetitions due to much larger performance.</p><div class="table"><a name="d0e332"></a><p class="title"><b>Table&nbsp;3.2.&nbsp;Asynchronous results</b></p><div class="table-contents"><table summary="Asynchronous results" border="1"><colgroup><col align="center" class="Backend"><col align="center" class="Num"><col align="center" class="Create"><col align="center" class="Search"><col align="center" class="Update"><col align="center" class="Delete"></colgroup><thead><tr><th align="center">Backend</th><th align="center">Operations</th><th align="center">Create [s]</th><th align="center">Search [s]</th><th align="center">Update [s]</th><th align="center">Delete [s]</th><th align="center">Average [s]</th></tr></thead><tbody><tr><td align="center">MySQL</td><td align="center">100000</td><td align="center">10.584842s</td><td align="center">10.386402s</td><td align="center">10.062384s</td><td align="center"> 8.890197s</td><td align="center"> 9.980956s</td></tr><tr><td align="center">SQLite</td><td align="center">100000</td><td align="center"> 3.710356s</td><td align="center"> 3.159129s</td><td align="center"> 2.865354s</td><td align="center"> 2.439406s</td><td align="center"> 3.043561s</td></tr><tr><td align="center">memfile</td><td align="center">1000000 (sic!)</td><td align="center"> 6.084131s</td><td align="center"> 0.862667s</td><td align="center"> 6.018585s</td><td align="center"> 5.146704s</td><td align="center"> 4.528022s</td></tr></tbody></table></div></div><br class="table-break"><p>Presented performance results can be computed into operations per second metrics.
  162. It should be noted that due to large differences between various operations (sometime
  163. over 3 orders of magnitude), it is difficult to create a simple, readable chart with
  164. that data.</p><div class="table"><a name="tbl-perf-results"></a><p class="title"><b>Table&nbsp;3.3.&nbsp;Estimated performance</b></p><div class="table-contents"><table summary="Estimated performance" border="1"><colgroup><col align="center" class="Backend"><col align="center" class="Create"><col align="center" class="Search"><col align="center" class="Update"><col align="center" class="Delete"><col align="center" class="Average"></colgroup><thead><tr><th align="center">Backend</th><th align="center">Create [oper/s]</th><th align="center">Search [oper/s]</th><th align="center">Update [oper/s]</th><th align="center">Delete [oper/s]</th><th align="center">Average [oper/s]</th></tr></thead><tbody><tr><td align="center">MySQL (async)</td><td align="center">9447.47</td><td align="center">9627.97</td><td align="center">9938.00</td><td align="center">11248.34</td><td align="center">10065.45</td></tr><tr><td align="center">SQLite (async)</td><td align="center">26951.59</td><td align="center">31654.29</td><td align="center">34899.70</td><td align="center">40993.59</td><td align="center">33624.79</td></tr><tr><td align="center">memfile (async)</td><td align="center">164362.01</td><td align="center">1159195.84</td><td align="center">166152.01</td><td align="center">194299.11</td><td align="center">421002.24</td></tr><tr><td align="center">MySQL (sync)</td><td align="center">31.64</td><td align="center">8575.45</td><td align="center">35.76</td><td align="center">36.11</td><td align="center">2169.74</td></tr><tr><td align="center">SQLite (sync)</td><td align="center">16.28</td><td align="center">20045.37</td><td align="center">16.81</td><td align="center">17.85</td><td align="center">7524.08</td></tr><tr><td align="center">memfile (sync)</td><td align="center">23.97</td><td align="center">1381215.47</td><td align="center">23.66</td><td align="center">23.71</td><td align="center">345321.70</td></tr></tbody></table></div></div><br class="table-break"><div class="mediaobject"><img src="performance-results-graph1.png" alt="Performance measurements"><div class="caption"><p>Graphical representation of the performance results
  165. presented in table <a class="xref" href="#tbl-perf-results" title="Table&nbsp;3.3.&nbsp;Estimated performance">Table&nbsp;3.3, &#8220;Estimated performance&#8221;</a>.</p></div></div></div><div class="section" title="Possible further optimizations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e521"></a>Possible further optimizations</h2></div></div></div><p>
  166. For debugging purposes the code was compiled with -g -O0
  167. flags. While majority of the time was spent in backend
  168. functions (that was probably compiled with -O2 flags), the
  169. benchmark code could perform faster, when compiled with -O2,
  170. rather than -O0. That is expected to affect memfile benchmark.
  171. </p><p>
  172. Currently all operations were conducted on one by one
  173. basis. Each operation was treated as a separate
  174. transaction. Grouping X operations together will potentially
  175. bring almost X fold increase in synchronous operations.
  176. Extension for this benchmark in this regard should be considered.
  177. That affects only write operations (insert, update and delete). Read
  178. operations (search) are expected to be barely affected.
  179. </p><p>
  180. Multi-threaded or multi-process benchmark may be considered in
  181. the future. It may be somewhat difficult as only some backends
  182. support concurrent access.
  183. </p></div></div><div class="chapter" title="Chapter&nbsp;4.&nbsp;perfdhcp"><div class="titlepage"><div><div><h2 class="title"><a name="perfdhcp"></a>Chapter&nbsp;4.&nbsp;perfdhcp</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#d0e533">Purpose</a></span></dt><dt><span class="section"><a href="#perfdhcp-key-features">Key features</a></span></dt><dt><span class="section"><a href="#perfdhcp-command-line">Command line options</a></span></dt><dt><span class="section"><a href="#starting-perfdhcp">Starting perfdhcp</a></span></dt><dt><span class="section"><a href="#perfdhcp-commandline-examples">perfdhcp command line examples</a></span></dt><dd><dl><dt><span class="section"><a href="#perfdhcp-basic-usage">Example: basic usage</a></span></dt><dt><span class="section"><a href="#perfdhcp-rate-control">Example: rate control</a></span></dt><dt><span class="section"><a href="#perfdhcp-templates">Example: templates</a></span></dt></dl></dd></dl></div><div class="section" title="Purpose"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e533"></a>Purpose</h2></div></div></div><p>
  184. Evaluation of the performance of a DHCP server requires that it
  185. be tested under varying traffic loads. perfdhcp is a testing
  186. tool with the capability to create traffic loads
  187. and generate statistics from the results. Additional features,
  188. such as the ability to send customised DHCP packets, allow it to
  189. be used in a wide range of functional testing.
  190. </p></div><div class="section" title="Key features"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="perfdhcp-key-features"></a>Key features</h2></div></div></div><p>
  191. perfdhcp has a number of command line switches to
  192. control DHCP message exchanges. Currently they fall into
  193. the following categories:
  194. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
  195. Rate control - control how many DHCP exchanges
  196. are initiated within a period of time. The tool can also simulate
  197. best effort conditions by attempting to initiate as many DHCP
  198. packet exchanges as possible within a unit of time.
  199. </p></li><li class="listitem"><p>
  200. Test exit specifiers - control the conditions for test
  201. completion, including the number of initiated exchanges,
  202. the test period orthe maximum number of dropped packets.
  203. </p></li><li class="listitem"><p>
  204. Packet templates - specify files containing packet templates that
  205. are used by perfdhcp to create custom DHCP messages. The tool
  206. allows the specification of a number of values indicating
  207. offsets of values within a packet that are set by the tool.
  208. </p></li><li class="listitem"><p>
  209. Reporting - for each test produce a set of performance data
  210. including the achieved packet exchange rate (server performance).
  211. There are a number of diagnostic selectors available that
  212. enable periodic (intermediate) reporting, printing of packet timestamps,
  213. and the listing of detailed information about internal perfdhcp
  214. states (for debugging).
  215. </p></li><li class="listitem"><p>
  216. Different mode of operations - specify the DHCP protocol used
  217. (v4 or v6), two-way or four-way exchanges, use of the
  218. Rapid Commit option for DHCPv6.
  219. </p></li><li class="listitem"><p>
  220. IP layer options - specify the local/remote address, local interface
  221. and local port to be used for communication with DHCP server.
  222. </p></li></ul></div><p>
  223. </p></div><div class="section" title="Command line options"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="perfdhcp-command-line"></a>Command line options</h2></div></div></div><p>
  224. The following "help" output from the tool describes the
  225. command line switches. This summary also lists the tool's
  226. possible exit codes as well as describing the
  227. error counters printed when the test is complete:
  228. </p><pre class="screen">$ <strong class="userinput"><code>./perfdhcp -h</code></strong>
  229. perfdhcp [-hv] [-4|-6] [-r&lt;rate&gt;] [-t&lt;report&gt;] [-R&lt;range&gt;] [-b&lt;base&gt;]
  230. [-n&lt;num-request&gt;] [-p&lt;test-period&gt;] [-d&lt;drop-time&gt;] [-D&lt;max-drop&gt;]
  231. [-l&lt;local-addr|interface&gt;] [-P&lt;preload&gt;] [-a&lt;aggressivity&gt;]
  232. [-L&lt;local-port&gt;] [-s&lt;seed&gt;] [-i] [-B] [-c] [-1]
  233. [-T&lt;template-file&gt;] [-X&lt;xid-offset&gt;] [-O&lt;random-offset]
  234. [-E&lt;time-offset&gt;] [-S&lt;srvid-offset&gt;] [-I&lt;ip-offset&gt;]
  235. [-x&lt;diagnostic-selector&gt;] [-w&lt;wrapped&gt;] [server]
  236. The [server] argument is the name/address of the DHCP server to
  237. contact. For DHCPv4 operation, exchanges are initiated by
  238. transmitting a DHCP DISCOVER to this address.
  239. For DHCPv6 operation, exchanges are initiated by transmitting a DHCP
  240. SOLICIT to this address. In the DHCPv6 case, the special name 'all'
  241. can be used to refer to All_DHCP_Relay_Agents_and_Servers (the
  242. multicast address FF02::1:2), or the special name 'servers' to refer
  243. to All_DHCP_Servers (the multicast address FF05::1:3). The [server]
  244. argument is optional only in the case that -l is used to specify an
  245. interface, in which case [server] defaults to 'all'.
  246. The default is to perform a single 4-way exchange, effectively pinging
  247. the server.
  248. The -r option is used to set up a performance test, without
  249. it exchanges are initiated as fast as possible.
  250. Options:
  251. -1: Take the server-ID option from the first received message.
  252. -4: DHCPv4 operation (default). This is incompatible with the -6 option.
  253. -6: DHCPv6 operation. This is incompatible with the -4 option.
  254. -a&lt;aggressivity&gt;: When the target sending rate is not yet reached,
  255. control how many exchanges are initiated before the next pause.
  256. -b&lt;base&gt;: The base mac, duid, IP, etc, used to simulate different
  257. clients. This can be specified multiple times, each instance is
  258. in the &lt;type&gt;=&lt;value&gt; form, for instance:
  259. (and default) mac=00:0c:01:02:03:04.
  260. -d&lt;drop-time&gt;: Specify the time after which a request is treated as
  261. having been lost. The value is given in seconds and may contain a
  262. fractional component. The default is 1 second.
  263. -E&lt;time-offset&gt;: Offset of the (DHCPv4) secs field / (DHCPv6)
  264. elapsed-time option in the (second/request) template.
  265. The value 0 disables it.
  266. -h: Print this help.
  267. -i: Do only the initial part of an exchange: DO or SA, depending on
  268. whether -6 is given.
  269. -I&lt;ip-offset&gt;: Offset of the (DHCPv4) IP address in the requested-IP
  270. option / (DHCPv6) IA_NA option in the (second/request) template.
  271. -l&lt;local-addr|interface&gt;: For DHCPv4 operation, specify the local
  272. hostname/address to use when communicating with the server. By
  273. default, the interface address through which traffic would
  274. normally be routed to the server is used.
  275. For DHCPv6 operation, specify the name of the network interface
  276. via which exchanges are initiated.
  277. -L&lt;local-port&gt;: Specify the local port to use
  278. (the value 0 means to use the default).
  279. -O&lt;random-offset&gt;: Offset of the last octet to randomize in the template.
  280. -P&lt;preload&gt;: Initiate first &lt;preload&gt; exchanges back to back at startup.
  281. -r&lt;rate&gt;: Initiate &lt;rate&gt; DORA/SARR (or if -i is given, DO/SA)
  282. exchanges per second. A periodic report is generated showing the
  283. number of exchanges which were not completed, as well as the
  284. average response latency. The program continues until
  285. interrupted, at which point a final report is generated.
  286. -R&lt;range&gt;: Specify how many different clients are used. With 1
  287. (the default), all requests seem to come from the same client.
  288. -s&lt;seed&gt;: Specify the seed for randomization, making it repeatable.
  289. -S&lt;srvid-offset&gt;: Offset of the server-ID option in the
  290. (second/request) template.
  291. -T&lt;template-file&gt;: The name of a file containing the template to use
  292. as a stream of hexadecimal digits.
  293. -v: Report the version number of this program.
  294. -w&lt;wrapped&gt;: Command to call with start/stop at the beginning/end of
  295. the program.
  296. -x&lt;diagnostic-selector&gt;: Include extended diagnostics in the output.
  297. &lt;diagnostic-selector&gt; is a string of single-keywords specifying
  298. the operations for which verbose output is desired. The selector
  299. keyletters are:
  300. * 'a': print the decoded command line arguments
  301. * 'e': print the exit reason
  302. * 'i': print rate processing details
  303. * 'r': print randomization details
  304. * 's': print first server-id
  305. * 't': when finished, print timers of all successful exchanges
  306. * 'T': when finished, print templates
  307. -X&lt;xid-offset&gt;: Transaction ID (aka. xid) offset in the template.
  308. DHCPv4 only options:
  309. -B: Force broadcast handling.
  310. DHCPv6 only options:
  311. -c: Add a rapid commit option (exchanges will be SA).
  312. The remaining options are used only in conjunction with -r:
  313. -D&lt;max-drop&gt;: Abort the test if more than &lt;max-drop&gt; requests have
  314. been dropped. Use -D0 to abort if even a single request has been
  315. dropped. If &lt;max-drop&gt; includes the suffix '%', it specifies a
  316. maximum percentage of requests that may be dropped before abort.
  317. In this case, testing of the threshold begins after 10 requests
  318. have been expected to be received.
  319. -n&lt;num-request&gt;: Initiate &lt;num-request&gt; transactions. No report is
  320. generated until all transactions have been initiated/waited-for,
  321. after which a report is generated and the program terminates.
  322. -p&lt;test-period&gt;: Send requests for the given test period, which is
  323. specified in the same manner as -d. This can be used as an
  324. alternative to -n, or both options can be given, in which case the
  325. testing is completed when either limit is reached.
  326. -t&lt;report&gt;: Delay in seconds between two periodic reports.
  327. Errors:
  328. - tooshort: received a too short message
  329. - orphans: received a message which doesn't match an exchange
  330. (duplicate, late or not related)
  331. - locallimit: reached to local system limits when sending a message.
  332. Exit status:
  333. The exit status is:
  334. 0 on complete success.
  335. 1 for a general error.
  336. 2 if an error is found in the command line arguments.
  337. 3 if there are no general failures in operation, but one or more
  338. exchanges are not successfully completed.
  339. </pre><p>
  340. </p></div><div class="section" title="Starting perfdhcp"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="starting-perfdhcp"></a>Starting perfdhcp</h2></div></div></div><p>
  341. In order to run a performance test, at least two separate systems
  342. have to be installed: client and server. The first one must have
  343. perfdhcp installed, and the latter must be running the DHCP server
  344. (either v4 or v6). If only single system is available the client
  345. and server can be run on virtual machines (running on the same
  346. physical system) but in this case performance data may be heavily
  347. impacted by the overhead involved in running such the virtual
  348. machines.
  349. </p><p>
  350. Currently, perfdhcp is seen from the server perspective as relay agent.
  351. This simplifies its implementation: specifically there is no need to
  352. receive traffic sent to braodcast addresses. However, it does impose
  353. a requirement that the IPv4
  354. address has to be set manually on the interface that will be used to
  355. communicate with the server. For example, if the DHCPv4 server is listening
  356. on the interface connected to the 172.16.1.0 subnet, the interface on client
  357. machine has to have network address assigned from the same subnet, e.g.
  358. </p><pre class="screen"><strong class="userinput"><code>#ifconfig eth3 172.16.1.2. netmask 255.255.255.0 up</code></strong></pre><p>
  359. </p><p>
  360. As DHCP uses low port numbers (67 for DHCPv4 relays and
  361. 547 for DHCPv6), running perfdhcp with non-root privileges will
  362. usually result in the error message similar to this:
  363. </p><pre class="screen"><strong class="userinput"><code>$./perfdhcp -4 -l eth3 -r 100 all</code></strong>
  364. Error running perfdhcp: Failed to bind socket 3 to 172.16.1.2/port=67
  365. </pre><p>
  366. The '-L' command line switch allows the use of a custom local port.
  367. However, although the following command line will work:
  368. </p><pre class="screen"><strong class="userinput"><code>$./perfdhcp -4 -l eth3 -r 100 -L 10067 all</code></strong></pre><p>
  369. in the standard configuration no responses will be received
  370. from the DHCP server because the server responds to default relay
  371. port 67. A way to overcome this issue is to run
  372. perfdhcp as root.
  373. </p></div><div class="section" title="perfdhcp command line examples"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="perfdhcp-commandline-examples"></a>perfdhcp command line examples</h2></div></div></div><p>
  374. In this section, a number of perfdhcp command line examples
  375. are presented as a quick start guide for new users. For the
  376. detailed list of command line options refer to
  377. <a class="xref" href="#perfdhcp-command-line" title="Command line options">the section called &#8220;Command line options&#8221;</a>.
  378. </p><div class="section" title="Example: basic usage"><div class="titlepage"><div><div><h3 class="title"><a name="perfdhcp-basic-usage"></a>Example: basic usage</h3></div></div></div><p>
  379. If server is listening on interface with IPv4 address 172.16.1.1,
  380. the simplest perfdhcp command line will look like:
  381. </p><pre class="screen"><strong class="userinput"><code>#./perfdhcp 172.16.1.1</code></strong>
  382. ***Rate statistics***
  383. Rate: 206.345
  384. ***Statistics for: DISCOVER-OFFER***
  385. sent packets: 21641
  386. received packets: 350
  387. drops: 21291
  388. orphans: 0
  389. min delay: 9.022 ms
  390. avg delay: 143.100 ms
  391. max delay: 259.303 ms
  392. std deviation: 56.074 ms
  393. collected packets: 30
  394. ***Statistics for: REQUEST-ACK***
  395. sent packets: 350
  396. received packets: 268
  397. drops: 82
  398. orphans: 0
  399. min delay: 3.010 ms
  400. avg delay: 152.470 ms
  401. max delay: 258.634 ms
  402. std deviation: 56.936 ms
  403. collected packets: 0
  404. </pre><p>
  405. Here, perfdhcp uses remote address 172.16.1.1 as a
  406. destination address and will use a suitable local interface for
  407. communication. Since, no rate control parameters have been specified,
  408. it will initiate DHCP exchanges at the maximum possible rate. Due to the server's
  409. performance limitation, it is likely that many of the packets will be dropped.
  410. The performance test will continue running until it is
  411. interrupted by the user (with ^C).
  412. </p><p>
  413. The default performance statistics reported by perfdhcp have the
  414. following meaning:
  415. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Rate - number of packet exchanges (packet sent
  416. to the server and matching response received from the server)
  417. completed within a second.</p></li><li class="listitem"><p>sent packets - total number of DHCP packets of
  418. a specific type sent to the server.</p></li><li class="listitem"><p>received packets - total number of DHCP packets
  419. of specific type received from the server.</p></li><li class="listitem"><p>drops - number of dropped packets for the
  420. particular exchange. The number of dropped packets is calculated as
  421. the difference between the number of sent packets and number of
  422. response packets received from the server. In some cases, the
  423. server will have sent a reponse but perfdhcp execution ended before
  424. the reponse arrived. In such case this packet will be counted
  425. as dropped.</p></li><li class="listitem"><p>orphans - number of packets that have been
  426. received from the server and did not match any packet sent by
  427. perfdhcp. This may occur if received packet has been sent
  428. to some other host or if then exchange timed out and
  429. the sent packet was removed from perfdhcp's list of packets
  430. awaiting a response.</p></li><li class="listitem"><p>min delay - minimum delay that occured between
  431. sending the packet to the server and receiving a reponse from
  432. it.</p></li><li class="listitem"><p>avg delay - average delay between sending the
  433. packet of the specific type the server and receiving a response
  434. from it.</p></li><li class="listitem"><p>max delay - maximum delay that occured between
  435. sending the packet to the server and receiving a response from
  436. it.</p></li><li class="listitem"><p>std deviation - standard deviation of the delay
  437. between sending the packet of a specific type to the server and
  438. receiving response from it.</p></li><li class="listitem"><p>collected packets - number of sent packets that
  439. were garbage collected. Packets may get garbage collected when
  440. the waiting time for server a response exceeds value set with the
  441. '-d' (drop time) switch.
  442. -d&lt;drop-time&gt;.</p></li></ul></div><p>
  443. </p><p>
  444. Note: should multiple interfaces on the system running perfdhcp be
  445. connected to the same subnet, the interface to be used for the test
  446. can be specified using either the interface name:
  447. </p><pre class="screen"><strong class="userinput"><code>#./perfdhcp -l eth3</code></strong></pre><p>
  448. or a local address assigned to it:
  449. </p><pre class="screen"><strong class="userinput"><code>#./perfdhcp -l 172.16.1.2</code></strong></pre><p>
  450. </p></div><div class="section" title="Example: rate control"><div class="titlepage"><div><div><h3 class="title"><a name="perfdhcp-rate-control"></a>Example: rate control</h3></div></div></div><p>
  451. In the examples above perfdhcp initiates new exchanges with a best
  452. effort rate. With this setting, many packets are expected to be dropped
  453. by the server due to performance limitations. In many cases though, it is
  454. desired to verify that the server can handle an expected (reasonable) rate
  455. without dropping any packets. The following command is an example of such
  456. a test: it causes perfdhcp to initiate 300 four-way exchanges
  457. per second, and runs the test for 60 seconds:
  458. </p><pre class="screen"><strong class="userinput"><code>#./perfdhcp -l eth3 -p 60 -r 300</code></strong>
  459. ***Rate statistics***
  460. Rate: 256.683 exchanges/second, expected rate: 300 exchanges/second
  461. ***Statistics for: DISCOVER-OFFER***
  462. sent packets: 17783
  463. received packets: 15401
  464. drops: 2382
  465. orphans: 0
  466. min delay: 0.109 ms
  467. avg delay: 75.756 ms
  468. max delay: 575.614 ms
  469. std deviation: 60.513 ms
  470. collected packets: 11
  471. ***Statistics for: REQUEST-ACK***
  472. sent packets: 15401
  473. received packets: 15317
  474. drops: 84
  475. orphans: 0
  476. min delay: 0.536 ms
  477. avg delay: 72.072 ms
  478. max delay: 576.749 ms
  479. std deviation: 58.189 ms
  480. collected packets: 0
  481. </pre><p>
  482. Note that here, the packet drops for the DISCOVER-OFFER
  483. exchange have been significantly reduced (when compared with the
  484. output from the previous example) thanks to the setting of a
  485. reasonable rate. The non-zero number of packet drops and achieved
  486. rate (256/s) indicate that server's measured performance is lower than 300 leases
  487. per second. A further rate decrease should eliminate most of the packet
  488. drops and bring the achieved rate close to expected rate:
  489. </p><pre class="screen"><strong class="userinput"><code>#./perfdhcp -l eth3 -p 60 -r 100 -R 30</code></strong>
  490. ***Rate statistics***
  491. Rate: 99.8164 exchanges/second, expected rate: 100 exchanges/second
  492. ***Statistics for: DISCOVER-OFFER***
  493. sent packets: 5989
  494. received packets: 5989
  495. drops: 0
  496. orphans: 0
  497. min delay: 0.023 ms
  498. avg delay: 2.198 ms
  499. max delay: 181.760 ms
  500. std deviation: 9.429 ms
  501. collected packets: 0
  502. ***Statistics for: REQUEST-ACK***
  503. sent packets: 5989
  504. received packets: 5989
  505. drops: 0
  506. orphans: 0
  507. min delay: 0.473 ms
  508. avg delay: 2.355 ms
  509. max delay: 189.658 ms
  510. std deviation: 5.876 ms
  511. collected packets: 0
  512. </pre><p>
  513. There are now no packet drops, confirming that the server is able to
  514. handle a load of 100 leases/second.
  515. Note that the last parameter (-R 30) configures perfdhcp to simulate
  516. traffic from 30 distinct clients.
  517. </p></div><div class="section" title="Example: templates"><div class="titlepage"><div><div><h3 class="title"><a name="perfdhcp-templates"></a>Example: templates</h3></div></div></div><p>
  518. By default the DHCP messages are formed with default options. With
  519. template files, it is possible to define a custom packet format.
  520. </p><p>
  521. The template file names are specified with -T&lt;template-file&gt;
  522. command line option. This option can be specified zero, one or two times.
  523. The first occurence of this option refers to DISCOVER or SOLICIT message
  524. and the second occurence refers to REQUEST (DHCPv4 or DHCPv6) message.
  525. If -T option occurs only once the DISCOVER or SOLICIT message will be
  526. created from the template and the REQUEST message will be created
  527. dynamically (without the template). Note that each template file
  528. holds data for exactly one DHCP message type. Templates for multiple
  529. message types must not be combined in the single file.
  530. The content in template files is encoded in hexadecimal format.
  531. perfdhcp forms the packet by replacing parts of the binary stream read
  532. from the file with variable data such as elapsed time, hardware address, DUID
  533. etc. The offsets where such variable data is placed is specific to the
  534. template file and have to be specified from the command line. Refer to
  535. <a class="xref" href="#perfdhcp-command-line" title="Command line options">the section called &#8220;Command line options&#8221;</a> to find out how to
  536. specify offsets for particular options and fields. With the following
  537. command line the DHCPv6 SOLICIT and REQUEST packets will be formed from
  538. solicit.hex and request6.hex packets:
  539. </p><pre class="screen"><strong class="userinput"><code>#./perfdhcp -6 -l eth3 -r 100 -R 20 -T solicit.hex -T request6.hex -O 21 -E 84 -S 22 -I 40 servers</code></strong>
  540. ***Rate statistics***
  541. Rate: 99.5398 exchanges/second, expected rate: 100 exchanges/second
  542. ***Statistics for: SOLICIT-ADVERTISE***
  543. sent packets: 570
  544. received packets: 569
  545. drops: 1
  546. orphans: 0
  547. min delay: 0.259 ms
  548. avg delay: 0.912 ms
  549. max delay: 6.979 ms
  550. std deviation: 0.709 ms
  551. collected packets: 0
  552. ***Statistics for: REQUEST-REPLY***
  553. sent packets: 569
  554. received packets: 569
  555. drops: 0
  556. orphans: 0
  557. min delay: 0.084 ms
  558. avg delay: 0.607 ms
  559. max delay: 6.490 ms
  560. std deviation: 0.518 ms
  561. collected packets: 0
  562. </pre><p>
  563. where the switches have the following meaning:
  564. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>two occurences of -O 21 - DUID's last octet
  565. positions in SOLICIT and REQUEST respectively.</p></li><li class="listitem"><p>-E 84 - elapsed time option position in the
  566. REQUEST template</p></li><li class="listitem"><p>-S 22 - server id position in the REQUEST
  567. template</p></li><li class="listitem"><p>-I 40 - IA_NA option position in the REQUEST
  568. template</p></li></ul></div><p>
  569. </p><p>
  570. The offsets of options indicate where they begin in the packet.
  571. The only exception from this rule is -O&lt;random-offset&gt;
  572. option that specifies the end of the DUID (DHCPv6) or MAC address
  573. (DHCPv4). Depending on the number of simulated clients
  574. (see -R&lt;random-range&gt; command line option) perfdhcp
  575. will be randomizing bytes in packet buffer starting from this
  576. position backwards. For the number of simulated clients
  577. &lt;= 256 only one octet (at random-offset position)
  578. will be ranomized, for the number of clients &lt;= 65536
  579. two octets (at random-offset and random-offset-1)
  580. will be randmized etc.
  581. </p></div></div></div></div></body></html>