In the past, resources were available on a first-come, first-serve basis. This was adequate when students were testing their work using ping. However, when a large file was downloaded from a virtual web server, the flood of packets carrying this data would queue up and cause large delays for other packets coming into the system. An ongoing download would increase round-trip-times to unacceptably high levels — so bad that the these RTTs were measured in seconds instead of milliseconds.
To overcome this fairness problem, each topology now has its own queue into which incoming packets are placed. These topology-specific queues are then served in a round-robin fashion to ensure that each topology receives prompt attention, even if one topology is experiencing heavier traffic. Currently, this scheme assumes each packet requires a similar amount of work on the simulator’s part. In the future, this scheme might be extended to monitor the time used by each job and then use deficit round robin to serve these queues. For now, however, the simpler round robin scheme seems to have greatly improved fairness. In particular, an ongoing download of a large file on one topology now has almost no perceptible impact the round trip times on another topology.
Implementing this scheme incurred some performance costs (mostly due to new synchronization constructs) — maximum throughput decreased by 25%. However, these performance costs have been offset by two new improvements. First, Psyco is now used to run the simulator. It only required a dozen or so new lines of code for a 6% performance boost. Second, we utilized a script for automatically commenting out logging statements and replacing them with pass statements. This script completely removes the impact of any logging statements which are only useful when debugging the system. Since we make liberal use of the logging module, this was a big win — about a 25% boost in performance. When combined with Psyco, the new system is actually about 5% faster (in terms of throughput) than it was before the topology-specific queues were introduced.