From: Marcin Siodelski Date: Fri, 7 Sep 2012 11:03:44 +0000 (+0200) Subject: [2230] Added initial perfdhcp documentation to DHCP Perf Guide. X-Git-Tag: trac2351_base~66^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0920cc732d05f6fa7afd53e856c3a72560fc8ea8;p=thirdparty%2Fkea.git [2230] Added initial perfdhcp documentation to DHCP Perf Guide. --- diff --git a/tests/tools/dhcp-ubench/dhcp-perf-guide.html b/tests/tools/dhcp-ubench/dhcp-perf-guide.html index fd1929e901..60de83809b 100644 --- a/tests/tools/dhcp-ubench/dhcp-perf-guide.html +++ b/tests/tools/dhcp-ubench/dhcp-perf-guide.html @@ -1,23 +1,25 @@ -DHCP Performance Guide

DHCP Performance Guide

Tomasz Mrugalski

This is a companion document for BIND 10 version - 20120712.

Abstract

BIND 10 is a framework that features Domain Name System + + + DHCP Performance Guide

DHCP Performance Guide

Tomasz Mrugalski

Marcin Siodelski

This is a companion document for BIND 10 version + 20120712.

Abstract

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.


Preface

Table of Contents

1. Acknowledgements

1. Acknowledgements

ISC would like to acknowledge generous support for + measurement tool) and other related topics.


Preface

Table of Contents

Acknowledgements

Acknowledgements

ISC would like to acknowledge generous support for BIND 10 development of DHCPv4 and DHCPv6 components provided - by Comcast.

Chapter 1. Introduction

+ by Comcast.

Chapter 1. Introduction

This document is in its early stages of development. It is expected to grow significantly in a near future. It will cover topics like database backend perfomance measurements, pros an cons of various optimization techniques and tools. -

Chapter 2. ISC DHCP 4.x

+

Chapter 2. ISC DHCP 4.x

TODO: Write something about ISC DHCP4 here. -

Chapter 3. Kea

-

3.1. Backend performance evaluation

+

Backend performance evaluation

Kea will support several different database backends, using both popular databases (like MySQL or SQLite) and custom-developed solutions (like in-memory database). BIND 10 @@ -62,7 +64,7 @@

The framework attempts to do the same amount of operations for every backend thus allowing fair complarison between them. -

3.2. MySQL backend

MySQL backend requires MySQL client development libraries. It uses +

MySQL backend

MySQL backend requires MySQL client development libraries. It uses mysql_config tool (that works similar to pkg-config) to discover required compilation and linking options. To install required packages on Ubuntu, use the following command: @@ -111,13 +113,13 @@ Possible command-line parameters: -c yes|no - should compiled statements be used (MySQL only)

-

3.2.1. MySQL tweaks

One parameter that has huge impact on performance is a a backend engine. +

MySQL tweaks

One parameter that has huge impact on performance is a a backend engine. You can get a list of engines of your MySQL implementation by using

> show engines;

in your mysql client. Two notable engines are MyISAM and InnoDB. mysql_ubench will - use MyISAM for synchronous mode and InnoDB for asynchronous.

3.3. SQLite-ubench

SQLite backend requires both sqlite3 development and run-time package. Their + use MyISAM for synchronous mode and InnoDB for asynchronous.

SQLite-ubench

SQLite backend requires both sqlite3 development and run-time package. Their names may vary from system to system, but on Ubuntu 12.04 they are called sqlite3 libsqlite3-dev. To install them, use the following command: @@ -132,7 +134,7 @@ Possible command-line parameters:

> ./sqlite_ubench

or

> ./sqlite_ubench > results-sqlite.txt

-

3.3.1. SQLite tweaks

To modify default sqlite_ubench parameters, command line +

SQLite tweaks

To modify default sqlite_ubench parameters, command line switches can be used. Currently supported parameters are (default values specified in brackets):

  1. -f filename - name of the database file ("sqlite.db")

  2. -n num - number of iterations (100)

  3. -s yes|no - should the operations be performend in synchronous (yes) @@ -143,13 +145,13 @@ Possible command-line parameters: turned to several modes of operation. Its value can be modified in SQLite_uBenchmark::connect(). See http://www.sqlite.org/pragma.html#pragma_journal_mode for - detailed explanantion.

3.4. memfile-ubench

Memfile backend is custom developed prototype backend that + detailed explanantion.

memfile-ubench

Memfile backend is custom developed prototype backend that somewhat mimics operation of ISC DHCP4. It uses in-memory storage using standard C++ and boost mechanisms (std::map and boost::shared_ptr<>). All database changes are also written to a lease file. That file is strictly write-only. This approach takes advantage of the fact that simple append is faster - than edition with potential whole file relocation.

3.4.1. memfile tweaks

To modify default memfile_ubench parameters, command line + than edition with potential whole file relocation.

memfile tweaks

To modify default memfile_ubench parameters, command line switches can be used. Currently supported parameters are (default values specified in brackets):

  1. -f filename - name of the database file ("dhcpd.leases")

  2. -n num - number of iterations (100)

  3. -s yes|no - should the operations be performend in synchronous (yes) @@ -157,7 +159,7 @@ Possible command-line parameters:

    memfile can run in asynchronous or synchronous mode. This mode can be controlled by using sync parameter. It uses fflush() and fsync() in synchronous mode to make sure that - data is not buffered and physically stored on disk.

3.5. Performance measurements

This section contains sample results for backend performance measurements, + data is not buffered and physically stored on disk.

Performance measurements

This section contains sample results for backend performance measurements, taken using microbenchmarks. Tests were conducted on reasonably powerful machine:

 CPU: Quad-core Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz (8 logical cores)
@@ -170,13 +172,13 @@ SQLite version: 3.7.9sourceid version is 2011-11-01 00:52:41 c7c6050ef060877ebe7
       asynchronous. As those modes offer radically different
       performances, synchronous mode was conducted for 1000 (one
       thousand) repetitions and asynchronous mode was conducted for
-      100000 (hundred thousand) repetitions.

Table 3.1. Synchronous results

BackendOperationsCreateSearchUpdateDeleteAverage
MySQL100031.603978s 0.116612s27.964191s27.695209s21.844998s
SQLite100061.421356s 0.033283s59.476638s56.034150s44.241357s
memfile100041.711886s 0.000724s42.267578s42.169679s31.537467s

Following parameters were measured for asynchronous mode. + 100000 (hundred thousand) repetitions.

Table 3.1. Synchronous results

BackendOperationsCreateSearchUpdateDeleteAverage
MySQL100031.603978s 0.116612s27.964191s27.695209s21.844998s
SQLite100061.421356s 0.033283s59.476638s56.034150s44.241357s
memfile100041.711886s 0.000724s42.267578s42.169679s31.537467s

Following parameters were measured for asynchronous mode. MySQL and SQLite were run with 100 thousand repetitions. Memfile - was run for 1 million repetitions due to much larger performance.

Table 3.2. Asynchronous results

BackendOperationsCreate [s]Search [s]Update [s]Delete [s]Average [s]
MySQL10000010.584842s10.386402s10.062384s 8.890197s 9.980956s
SQLite100000 3.710356s 3.159129s 2.865354s 2.439406s 3.043561s
memfile1000000 (sic!) 6.084131s 0.862667s 6.018585s 5.146704s 4.528022s

Presented performance results can be computed into operations per second metrics. + was run for 1 million repetitions due to much larger performance.

Table 3.2. Asynchronous results

BackendOperationsCreate [s]Search [s]Update [s]Delete [s]Average [s]
MySQL10000010.584842s10.386402s10.062384s 8.890197s 9.980956s
SQLite100000 3.710356s 3.159129s 2.865354s 2.439406s 3.043561s
memfile1000000 (sic!) 6.084131s 0.862667s 6.018585s 5.146704s 4.528022s

Presented performance results can be computed into operations per second metrics. It should be noted that due to large differences between various operations (sometime over 3 orders of magnitude), it is difficult to create a simple, readable chart with - that data.

Table 3.3. Estimated performance

BackendCreate [oper/s]Search [oper/s]Update [oper/s]Delete [oper/s]Average [oper/s]
MySQL (async)9447.479627.979938.0011248.3410065.45
SQLite (async)26951.5931654.2934899.7040993.5933624.79
memfile (async)164362.011159195.84166152.01194299.11421002.24
MySQL (sync)31.648575.4535.7636.112169.74
SQLite (sync)16.2820045.3716.8117.857524.08
memfile (sync)23.971381215.4723.6623.71345321.70

Performance measurements

Graphical representation of the performance results - presented in table Table 3.3, “Estimated performance”.

3.6. Possible further optimizations

+ that data.

Table 3.3. Estimated performance

BackendCreate [oper/s]Search [oper/s]Update [oper/s]Delete [oper/s]Average [oper/s]
MySQL (async)9447.479627.979938.0011248.3410065.45
SQLite (async)26951.5931654.2934899.7040993.5933624.79
memfile (async)164362.011159195.84166152.01194299.11421002.24
MySQL (sync)31.648575.4535.7636.112169.74
SQLite (sync)16.2820045.3716.8117.857524.08
memfile (sync)23.971381215.4723.6623.71345321.70

Performance measurements

Graphical representation of the performance results + presented in table Table 3.3, “Estimated performance”.

Possible further optimizations

For debugging purposes the code was compiled with -g -O0 flags. While majority of the time was spent in backend functions (that was probably compiled with -O2 flags), the @@ -194,6 +196,209 @@ SQLite version: 3.7.9sourceid version is 2011-11-01 00:52:41 c7c6050ef060877ebe7 Multi-threaded or multi-process benchmark may be considered in the future. It may be somewhat difficult as only some backends support concurrent access. -

Chapter 4. perfdhcp

- TODO: Write something about perfdhcp here. -

+

Chapter 4. perfdhcp

Purpose

+ There is a growing need to evaluate performance of DHCP servers in + different traffic conditions to understand their bottle necks. + This helps to elimante bugs in existing DHCP software as well + as make informed decisions regarding new DHCP software designs + to significantly improve its performance. The perfdhcp tool has + been created to fill the gap in performance measurement capabilities + mostly. However, the number of implemented features and parameters + exposed to the user make this tool useful for functional testing as + well. +

Key features

+ The perfdhcp exposes the number of command line parameters to + control DHCP message exchanges. Currently they fall back to + the following categories: +

  1. + Rate control - control how many DHCP exchanges + are initiated within a period of time. Tool can also simulate + best effort conditions where it attempts to start as many + exchanges as possible. +

  2. + Test exit specifiers - control the conditions when test + completes including number of initiated exchanges, test period or + maximum number of dropped packets. +

  3. + Packet templates - specify files containing packet templates that + are used by perfdhcp to create custom DHCP messages instead of + default. Tool also allows to specify number of values indicating + offsets of variable values within a packet that are modified in + flight by the tool. +

  4. + Reporting - for each test produce the set of performance data + including achieved packet exchange rate (server performance). + There is also a number of diagnostic selectors available that + enable periodic (intermediate) reporting, packet timestamps + printing and detailed information about perfdhcp internal + states (for debugging). +

  5. + Different mode of operations - specify DHCP version used + (v4 or v6), 2-way or 4-way exchanges, use Rapid Commit option + for DHCPv6. +

  6. + IP layer options - specify local/remote address, local interface + and local port to be used for communication with DHCP server. +

+

Command line options

+ The following command line options may be used with perfdhcp tool. + This summary also presents its possible exit codes as well as + error counters printed along when test is complete: +

$ ./perfdhcp -h
+perfdhcp [-hv] [-4|-6] [-r<rate>] [-t<report>] [-R<range>] [-b<base>]
+    [-n<num-request>] [-p<test-period>] [-d<drop-time>] [-D<max-drop>]
+    [-l<local-addr|interface>] [-P<preload>] [-a<aggressivity>]
+    [-L<local-port>] [-s<seed>] [-i] [-B] [-c] [-1]
+    [-T<template-file>] [-X<xid-offset>] [-O<random-offset]
+    [-E<time-offset>] [-S<srvid-offset>] [-I<ip-offset>]
+    [-x<diagnostic-selector>] [-w<wrapped>] [server]
+
+The [server] argument is the name/address of the DHCP server to
+contact.  For DHCPv4 operation, exchanges are initiated by
+transmitting a DHCP DISCOVER to this address.
+
+For DHCPv6 operation, exchanges are initiated by transmitting a DHCP
+SOLICIT to this address.  In the DHCPv6 case, the special name 'all'
+can be used to refer to All_DHCP_Relay_Agents_and_Servers (the
+multicast address FF02::1:2), or the special name 'servers' to refer
+to All_DHCP_Servers (the multicast address FF05::1:3).  The [server]
+argument is optional only in the case that -l is used to specify an
+interface, in which case [server] defaults to 'all'.
+
+The default is to perform a single 4-way exchange, effectively pinging
+the server.
+The -r option is used to set up a performance test, without
+it exchanges are initiated as fast as possible.
+
+Options:
+-1: Take the server-ID option from the first received message.
+-4: DHCPv4 operation (default). This is incompatible with the -6 option.
+-6: DHCPv6 operation. This is incompatible with the -4 option.
+-a<aggressivity>: When the target sending rate is not yet reached,
+    control how many exchanges are initiated before the next pause.
+-b<base>: The base mac, duid, IP, etc, used to simulate different
+    clients.  This can be specified multiple times, each instance is
+    in the <type>=<value> form, for instance:
+    (and default) mac=00:0c:01:02:03:04.
+-d<drop-time>: Specify the time after which a request is treated as
+    having been lost.  The value is given in seconds and may contain a
+    fractional component.  The default is 1 second.
+-E<time-offset>: Offset of the (DHCPv4) secs field / (DHCPv6)
+    elapsed-time option in the (second/request) template.
+    The value 0 disables it.
+-h: Print this help.
+-i: Do only the initial part of an exchange: DO or SA, depending on
+    whether -6 is given.
+-I<ip-offset>: Offset of the (DHCPv4) IP address in the requested-IP
+    option / (DHCPv6) IA_NA option in the (second/request) template.
+-l<local-addr|interface>: For DHCPv4 operation, specify the local
+    hostname/address to use when communicating with the server.  By
+    default, the interface address through which traffic would
+    normally be routed to the server is used.
+    For DHCPv6 operation, specify the name of the network interface
+    via which exchanges are initiated.
+-L<local-port>: Specify the local port to use
+    (the value 0 means to use the default).
+-O<random-offset>: Offset of the last octet to randomize in the template.
+-P<preload>: Initiate first <preload> exchanges back to back at startup.
+-r<rate>: Initiate <rate> DORA/SARR (or if -i is given, DO/SA)
+    exchanges per second.  A periodic report is generated showing the
+    number of exchanges which were not completed, as well as the
+    average response latency.  The program continues until
+    interrupted, at which point a final report is generated.
+-R<range>: Specify how many different clients are used. With 1
+    (the default), all requests seem to come from the same client.
+-s<seed>: Specify the seed for randomization, making it repeatable.
+-S<srvid-offset>: Offset of the server-ID option in the
+    (second/request) template.
+-T<template-file>: The name of a file containing the template to use
+    as a stream of hexadecimal digits.
+-v: Report the version number of this program.
+-w<wrapped>: Command to call with start/stop at the beginning/end of
+    the program.
+-x<diagnostic-selector>: Include extended diagnostics in the output.
+    <diagnostic-selector> is a string of single-keywords specifying
+    the operations for which verbose output is desired.  The selector
+    keyletters are:
+   * 'a': print the decoded command line arguments
+   * 'e': print the exit reason
+   * 'i': print rate processing details
+   * 'r': print randomization details
+   * 's': print first server-id
+   * 't': when finished, print timers of all successful exchanges
+   * 'T': when finished, print templates
+-X<xid-offset>: Transaction ID (aka. xid) offset in the template.
+
+DHCPv4 only options:
+-B: Force broadcast handling.
+
+DHCPv6 only options:
+-c: Add a rapid commit option (exchanges will be SA).
+
+The remaining options are used only in conjunction with -r:
+
+-D<max-drop>: Abort the test if more than <max-drop> requests have
+    been dropped.  Use -D0 to abort if even a single request has been
+    dropped.  If <max-drop> includes the suffix '%', it specifies a
+    maximum percentage of requests that may be dropped before abort.
+    In this case, testing of the threshold begins after 10 requests
+    have been expected to be received.
+-n<num-request>: Initiate <num-request> transactions.  No report is
+    generated until all transactions have been initiated/waited-for,
+    after which a report is generated and the program terminates.
+-p<test-period>: Send requests for the given test period, which is
+    specified in the same manner as -d.  This can be used as an
+    alternative to -n, or both options can be given, in which case the
+    testing is completed when either limit is reached.
+-t<report>: Delay in seconds between two periodic reports.
+
+Errors:
+- tooshort: received a too short message
+- orphans: received a message which doesn't match an exchange
+   (duplicate, late or not related)
+- locallimit: reached to local system limits when sending a message.
+
+Exit status:
+The exit status is:
+0 on complete success.
+1 for a general error.
+2 if an error is found in the command line arguments.
+3 if there are no general failures in operation, but one or more
+  exchanges are not successfully completed.
+
+        

+

Running a test

+ In order to run performance test at least two separate systems + have to be installed: client and server. The first one has to have + perfdhcp tool installed, the latter has to have DHCP server + running (v4 or v6). If only single system is available the client + and server can be run on virtual machines (running on the same + phisical system) but in this case performance data may be heavily + impacted by the performance of VMs. +

+ The DHCP operates on low port numbers (67 for DHCPv4 relays and + 547 for DHCPv6) running perfdhcp with non-root priviliges will + usually result in the error message similar to this: +

$./perfdhcp -4 -l eth3 -r 100 all
+Error running perfdhcp: Failed to bind socket 3 to 172.16.1.2/port=67
+        

+ perfdhcp exposes '-L' command line option that + imposes use of custom local port and the following command line will + work: +

$./perfdhcp -4 -l eth3 -r 100 -L 10067 all

+ but in the standard configuration no responses will be received + from the ISC DHCP server because server responds to default relay + port 67. +

+ Alternative way to overcome the issue with lack of privileges + to use default DHCP port number is to run perfdhcp as root. +

+ In this section the perfdhcp command line options examples + are presented as a quick start guide for new users. For the + detailed list of command line options refer to + the section called “Command line options”. +

+

+          
+        

+

\ No newline at end of file diff --git a/tests/tools/dhcp-ubench/dhcp-perf-guide.xml b/tests/tools/dhcp-ubench/dhcp-perf-guide.xml index 16bbd63fa9..bfde03de31 100644 --- a/tests/tools/dhcp-ubench/dhcp-perf-guide.xml +++ b/tests/tools/dhcp-ubench/dhcp-perf-guide.xml @@ -22,9 +22,9 @@ - PERFORMANCE OF THIS SOFTWARE. --> - - + + DHCP Performance Guide @@ -37,7 +37,10 @@ Tomasz Mrugalski - + + Marcin + Siodelski + BIND 10 is a framework that features Domain Name System (DNS) suite and Dynamic Host Configuration Protocol (DHCP) @@ -586,9 +589,252 @@ SQLite version: 3.7.9sourceid version is 2011-11-01 00:52:41 c7c6050ef060877ebe7 perfdhcp - - TODO: Write something about perfdhcp here. - - +
+ Purpose + + There is a growing need to evaluate performance of DHCP servers in + different traffic conditions to understand their bottle necks. + This helps to elimante bugs in existing DHCP software as well + as make informed decisions regarding new DHCP software designs + to significantly improve its performance. The perfdhcp tool has + been created to fill the gap in performance measurement capabilities + mostly. However, the number of implemented features and parameters + exposed to the user make this tool useful for functional testing as + well. + +
+ +
+ Key features + + The perfdhcp exposes the number of command line parameters to + control DHCP message exchanges. Currently they fall back to + the following categories: + + + + Rate control - control how many DHCP exchanges + are initiated within a period of time. Tool can also simulate + best effort conditions where it attempts to start as many + exchanges as possible. + + + + + Test exit specifiers - control the conditions when test + completes including number of initiated exchanges, test period or + maximum number of dropped packets. + + + + + Packet templates - specify files containing packet templates that + are used by perfdhcp to create custom DHCP messages instead of + default. Tool also allows to specify number of values indicating + offsets of variable values within a packet that are modified in + flight by the tool. + + + + + Reporting - for each test produce the set of performance data + including achieved packet exchange rate (server performance). + There is also a number of diagnostic selectors available that + enable periodic (intermediate) reporting, packet timestamps + printing and detailed information about perfdhcp internal + states (for debugging). + + + + + Different mode of operations - specify DHCP version used + (v4 or v6), 2-way or 4-way exchanges, use Rapid Commit option + for DHCPv6. + + + + + IP layer options - specify local/remote address, local interface + and local port to be used for communication with DHCP server. + + + + +
+ +
+ Command line options + + The following command line options may be used with perfdhcp tool. + This summary also presents its possible exit codes as well as + error counters printed along when test is complete: + $ ./perfdhcp -h +] [-t] [-R] [-b] + [-n] [-p] [-d] [-D] + [-l] [-P] [-a] + [-L] [-s] [-i] [-B] [-c] [-1] + [-T] [-X] [-O] [-S] [-I] + [-x] [-w] [server] + +The [server] argument is the name/address of the DHCP server to +contact. For DHCPv4 operation, exchanges are initiated by +transmitting a DHCP DISCOVER to this address. + +For DHCPv6 operation, exchanges are initiated by transmitting a DHCP +SOLICIT to this address. In the DHCPv6 case, the special name 'all' +can be used to refer to All_DHCP_Relay_Agents_and_Servers (the +multicast address FF02::1:2), or the special name 'servers' to refer +to All_DHCP_Servers (the multicast address FF05::1:3). The [server] +argument is optional only in the case that -l is used to specify an +interface, in which case [server] defaults to 'all'. + +The default is to perform a single 4-way exchange, effectively pinging +the server. +The -r option is used to set up a performance test, without +it exchanges are initiated as fast as possible. + +Options: +-1: Take the server-ID option from the first received message. +-4: DHCPv4 operation (default). This is incompatible with the -6 option. +-6: DHCPv6 operation. This is incompatible with the -4 option. +-a: When the target sending rate is not yet reached, + control how many exchanges are initiated before the next pause. +-b: The base mac, duid, IP, etc, used to simulate different + clients. This can be specified multiple times, each instance is + in the = form, for instance: + (and default) mac=00:0c:01:02:03:04. +-d: Specify the time after which a request is treated as + having been lost. The value is given in seconds and may contain a + fractional component. The default is 1 second. +-E: Offset of the (DHCPv4) secs field / (DHCPv6) + elapsed-time option in the (second/request) template. + The value 0 disables it. +-h: Print this help. +-i: Do only the initial part of an exchange: DO or SA, depending on + whether -6 is given. +-I: Offset of the (DHCPv4) IP address in the requested-IP + option / (DHCPv6) IA_NA option in the (second/request) template. +-l: For DHCPv4 operation, specify the local + hostname/address to use when communicating with the server. By + default, the interface address through which traffic would + normally be routed to the server is used. + For DHCPv6 operation, specify the name of the network interface + via which exchanges are initiated. +-L: Specify the local port to use + (the value 0 means to use the default). +-O: Offset of the last octet to randomize in the template. +-P: Initiate first exchanges back to back at startup. +-r: Initiate DORA/SARR (or if -i is given, DO/SA) + exchanges per second. A periodic report is generated showing the + number of exchanges which were not completed, as well as the + average response latency. The program continues until + interrupted, at which point a final report is generated. +-R: Specify how many different clients are used. With 1 + (the default), all requests seem to come from the same client. +-s: Specify the seed for randomization, making it repeatable. +-S: Offset of the server-ID option in the + (second/request) template. +-T: The name of a file containing the template to use + as a stream of hexadecimal digits. +-v: Report the version number of this program. +-w: Command to call with start/stop at the beginning/end of + the program. +-x: Include extended diagnostics in the output. + is a string of single-keywords specifying + the operations for which verbose output is desired. The selector + keyletters are: + * 'a': print the decoded command line arguments + * 'e': print the exit reason + * 'i': print rate processing details + * 'r': print randomization details + * 's': print first server-id + * 't': when finished, print timers of all successful exchanges + * 'T': when finished, print templates +-X: Transaction ID (aka. xid) offset in the template. + +DHCPv4 only options: +-B: Force broadcast handling. + +DHCPv6 only options: +-c: Add a rapid commit option (exchanges will be SA). + +The remaining options are used only in conjunction with -r: + +-D: Abort the test if more than requests have + been dropped. Use -D0 to abort if even a single request has been + dropped. If includes the suffix '%', it specifies a + maximum percentage of requests that may be dropped before abort. + In this case, testing of the threshold begins after 10 requests + have been expected to be received. +-n: Initiate transactions. No report is + generated until all transactions have been initiated/waited-for, + after which a report is generated and the program terminates. +-p: Send requests for the given test period, which is + specified in the same manner as -d. This can be used as an + alternative to -n, or both options can be given, in which case the + testing is completed when either limit is reached. +-t: Delay in seconds between two periodic reports. + +Errors: +- tooshort: received a too short message +- orphans: received a message which doesn't match an exchange + (duplicate, late or not related) +- locallimit: reached to local system limits when sending a message. + +Exit status: +The exit status is: +0 on complete success. +1 for a general error. +2 if an error is found in the command line arguments. +3 if there are no general failures in operation, but one or more + exchanges are not successfully completed. +]]> + + +
+
+ Running a test + + In order to run performance test at least two separate systems + have to be installed: client and server. The first one has to have + perfdhcp tool installed, the latter has to have DHCP server + running (v4 or v6). If only single system is available the client + and server can be run on virtual machines (running on the same + phisical system) but in this case performance data may be heavily + impacted by the performance of VMs. + + + The DHCP operates on low port numbers (67 for DHCPv4 relays and + 547 for DHCPv6) running perfdhcp with non-root priviliges will + usually result in the error message similar to this: + $./perfdhcp -4 -l eth3 -r 100 all +Error running perfdhcp: Failed to bind socket 3 to 172.16.1.2/port=67 + + perfdhcp exposes '-L' command line option that + imposes use of custom local port and the following command line will + work: + $./perfdhcp -4 -l eth3 -r 100 -L 10067 all + but in the standard configuration no responses will be received + from the ISC DHCP server because server responds to default relay + port 67. + + + Alternative way to overcome the issue with lack of privileges + to use default DHCP port number is to run perfdhcp as root. + + + In this section the perfdhcp command line options examples + are presented as a quick start guide for new users. For the + detailed list of command line options refer to + . + + + + + + +
+