Every now and then, we see a big spike in dispatch lag, usually for one or two specific wikis. To mitigate this problem and allow the backlog to be dealt with quickly, we should tweak the parameters of the dispatchChanges script to be more suitable for a high volume repo with many clients. particularly:
- reduce --randomness, perhaps to 3. With the default value of 10, the lagged wiki has a 1/10 chance to be picked for a given dispatcher run.
- reduce --dispatch-interval to 5. The default of 60 means that the lagged wiki will receive at most one batch of changes per 60 seconds (no matter how many dispatchers we are running).
Note: reducing --batch-interval may lead to increased overhead for smaller wikis. See T179008 for an alternative approach.