]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add documentation for load testing
authorAlan T. DeKok <aland@freeradius.org>
Wed, 4 Dec 2019 15:11:07 +0000 (10:11 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 4 Dec 2019 15:12:12 +0000 (10:12 -0500)
raddb/sites-available/test_load [new file with mode: 0644]

diff --git a/raddb/sites-available/test_load b/raddb/sites-available/test_load
new file mode 100644 (file)
index 0000000..3e65081
--- /dev/null
@@ -0,0 +1,148 @@
+#  -*- text -*-
+#
+#
+#  $Id$
+
+#######################################################################
+#
+#  = The Load Test Virtual Server
+#
+#  The load test virtual server generates test load, without using a
+#  client program.
+
+#  ## Virtual Server
+#
+#
+server load {
+       #
+       #  For now, only "namespace = radius" is supported.
+       #
+       namespace = radius
+
+       #
+       #  Listen 
+       #
+       listen {
+               #
+               #  Any packet types are supported.
+               #
+               #  However, only one packet type should be specified.
+               #
+               type = Access-Request
+
+               #
+               #  The load generator uses the "load" transport.
+               #
+               transport = load
+
+               #
+               #  load:: Configuration for load testing.
+               #
+               load {
+                       #
+                       #  filename:: File which contains one test packet.
+                       #
+                       #  The contents of the file are the same as
+                       #  used by "radclient".
+                       #
+                       #  For now, the secret is hard-coded to
+                       #  "testing123".
+                       #
+                       #  The Packet-Type attribute is also ignored.
+                       #
+                       filename = ${confdir}/input.txt
+
+                       #
+                       #  csv:: Where the output statistics are printed,
+                       #  in CSV format.
+                       #
+                       #  The first line of the output file contains a header
+                       #  which describes the columns.
+                       #
+                       csv = ${logdir}/stats.csv
+
+                       #
+                       #  start_pps:: What packet/s rate to start at.
+                       #                       
+                       start_pps       = 600
+
+                       #
+                       #  max_pps:: What maximum packet/s rate to end at.
+                       #
+                       max_pps         = 1000
+
+                       #
+                       #  duration:: How long in seconds to run each test.
+                       #
+                       duration        = 5
+
+                       #
+                       #  step:: Once `duration` is done, increase
+                       #  the PPS by this rate.
+                       #
+                       #  The tests are run repeatedly for `duration`
+                       #  seconds, increasing the PPS by `step` each
+                       #  time, until `max_pps` is reached.  At that
+                       #  point, the test stops, and no more packets
+                       #  are generated.
+                       #
+                       step            = 20
+
+                       #
+                       #  parallel: How many packets to send at once.
+                       #
+                       #  The "interrupt" rate of the load generator
+                       #  is "pps / parallel".  The server can
+                       #  generally process 5K "interrupts" per
+                       #  second.  So to send 50K pps, set "pps =
+                       #  50K" and "parallel = 10".
+                       #
+                       parallel        = 1
+
+                       #
+                       #  max_backlog:: The maximum allowed backlog
+                       #  in milliseconds, not packets.
+                       #
+                       #  The backlog is "packets sent without a
+                       #  reply".
+                       #
+                       #  If we are sending at 2K PPS, and
+                       #  "max_backlog = 1000", then the maximum
+                       #  number of packets allowed in the backlog
+                       #  will be 2K.
+                       #
+                       #  Using a time-based backlog seems to be more
+                       #  flexible than a counter-based backlog.
+                       #
+                       #  Once the backlog is hit, the load generator
+                       #  will stop sending packets on timed
+                       #  intervals.  Instead, it will send one new
+                       #  packet when it receives a reply.  If the
+                       #  backlog falls below the "max_backlog"
+                       #  limit, then the load generator switches
+                       #  back to sending at the "pps" rate.
+                       #
+                       max_backlog     = 1000
+               }
+       }
+
+#
+#  Put any logic here.
+#
+recv Access-Request {
+       accept
+}
+
+
+authenticate pap {
+       pap
+}
+
+send Access-Accept {
+       ok
+}
+
+send Access-Reject {
+       ok
+}
+}