frenetic-lang/frenetic — pull request #316 by seliopou (2014-07-10 15:27:04+00:00)
Title: Batch process policy updates

The controller now has the ability to queue up multiple policy updates before attempting to install any of them on the network. As each subsequent policy update will wipe out the previous policy updates, the controller is free to use only the latest update and discard the the other ones in the queue. This leads to less thrashing in in the forwarding state of the network, causing the network to converge quicker when it's initialized. Batch processing should also help new switches entering the network to converge to a stable forwarding state as well.

By default the queue size is `0`—effectively the queue size before this pull request. Use the `--policy-queue-size=SIZE` command-line flag to specify the size of the queue that the controller should use.

Here are single-run numbers for pingall completion time and packet loss on a `tree2,2` topology using various policy queue sizes (n=3). Start the controller and mininet using the following commands:

```
$ ./katnetic.byte run --learn --policy-queue-size=SIZE
$ sudo mn --controller=remote --mac --topo=tree,2,3 --test=pingall
```

size | loss (%) | time (sec)
-------|----------|------------
0 | 16.67 | 45.364333
1 | 7.67 | 29.002667
2 | 5.33 | 19.793333
3 | 4 | 18.519333