



= The Load Virtual Server

The `load` virtual server does load testing.



Use `listen load { ... }` in any virtual server to do load
testing against that server.


The main module is the proto module, even though we're
operating in the RADIUS namespace.



This is a valid Packet-Type for the current `namespace`



For now, only 'step' transport is available.



Do load testing in increasing steps.


Filename with input packet.  This is in the
same format as used by `radclient`.



Where the statistics file goes, in CSV format.

One line will be written to the file for each
second of the load generation run.

Each line will contain the following columns:
- time - since the test started running
- last_packet - The last time we added a request
  to the backlog.
- rtt - Round Trip Time i.e. the average delay
  between a request and response.  This is a
  moving average in nanoseconds.
- rttvar - Round Trip Time variance.  Moving
  average of the range between the smallest RTT
  and largest RTT.  The value is in nanoseconds.
- pps - Packets per second.  The maximum packet
  rate we're aiming for with this "step".  The
  load generator increases the load periodically
  in "steps".
- pps_accepted - Packets per second. Rate of
  response packets received.
- sent - How many packets have been generated
  by the load generation module from the start of
  the run.
- received - How many packets received since the
  start of the run.
- backlog - How many requests are awaiting
  responses.
- backlog_max - The largest the backlog has been
  since the start of the run.
- <usec - Absolute counter.  Responses received
  in less that a microsecond since the start
  of the run.
- us - Responses received in >= 1us < 10us since
  the start of the run.
- 100us, ms, 10ms, 100ms, s are all similar
  latency bins.
- blocked - 1 = true, 0 = false.   We're refusing
  to enqueue more packets until we get responses
  to the outstanding requests.


How many packets/s to start with.



How many packet/s to end up at.

When the load generator reaches this rate,
it prints the final statistics, and makes
the server exit.



How long we send packets for (in seconds) at each step.



How big of a packet/s step to jump after running each test.



We don't want to overload the server.  If
the server cannot process packets quickly
enough, we will get a backlog of
unprocessed packets.  If the backlog gets
too high, then the load generator will
temporarily stop sending packets.  Once the
backlog is low enough, it will continue.



How many packets to send immediately in
parallel, without waiting for a response.
When a reply is received, a new request may
be sent.



The rest of the recv/send sections are protocol specific, and are
taken from the `namespace`.






== Default Configuration

```
server load {
	namespace = radius
	listen load {
		proto = load
		type = Access-Request
		transport = step
		step {
			filename = ${confdir}/load.txt
			csv = ${confdir}/stats.csv
			start_pps	= 100
			max_pps		= 2000
			duration	= 10
			step		= 200
			max_backlog	= 1000
			parallel	= 25
		}
	}
recv Access-Request {
	accept
}
authenticate pap {
	pap
}
send Access-Accept {
	ok
}
send Access-Reject {
	ok
}
}
```
