Tracking packet/s in the server

Alan DeKok aland at deployingradius.com
Wed Feb 22 17:30:18 CET 2012


  The "listen" sections in 3.0 have a new entry:

	max_pps = 300

  If that socket receives MORE than that many packets/s, it throws away
all new packets.  The packet/s counter is tracked in a sliding window
over the last second.  That means "the number of packets received in the
second immediately before receiving the current packet".  It's not
tracking the number of packets in the current wall-clock second.

  The feature is mainly intended for accounting sockets.  It is *very*
expensive to process accounting packets.  They can usually be discarded
without a problem, as the NAS will retransmit them.

  The idea is to set the "max_pps" to some fairly large value.  Then if
the server receives a sudden influx of traffic, it won't die.  Instead,
it will continue to make progress at a steady rate.

  The feature has another configuration entry in the "thread pool" section:

	auto_limit_acct = yes/no

  If set to "yes", it auto-limits accounting packets.  The server
maintains a queue of packets for child threads.  With
auto_limit_acct=yes, it tracks the rate at which packets leave the
queue, and the rate at which they enter the queue.

  If the queue is more than half full, AND the rate of entry is larger
than the exit rate, it throws the accounting packet away.  All other
packet types are unaffected.

  The idea here is for the server to automatically adapt to overload
conditions.  If it's getting traffic than it can handle, it starts to
throw away that traffic.

  Suggestions for better heuristics are welcomed.  Testing is also
welcomed.  :)

  Alan DeKok.



More information about the Freeradius-Devel mailing list