Rate limits, scheduling and preemption #114
This has been kicking around my head for a couple of weeks, especially since 12e82af dropped, and given we just had an Indicent™ on SwitchCraft, I thought it might be as good a time as any to write up an issue on this:
Basically, we need a better way to prevent computers running amok. Or rather, when computers run amok, we need to reduce the impact that has on the rest of the server (and ideally on other computers). I think the best way in order to do this is as follows:
As far as work on the computer thread goes, it should be pretty trivial in a conceptual sense. The actual
Server time is a little more complex. Unlike computers, tasks are executed in multiple places - turtles (on TE tick, executes commands for that computer),
I haven't found a satisfactory solution to this yet, without introducing high latencies or massive unfairness. Though, as hopefully most of the time we'll be well within our budget, I think we mostly need to worry about the case where a couple of computers are hogging all execution time.
* We're always going to go above our budget, as we don't know how long something will take before we do it.
It should also be possible to extend some of this code to the bandwidth limiting areas of #33, though I haven't fully thought though all of that yet.
The text was updated successfully, but these errors were encountered: