Add configurable delay between purgeChangedPages batches
authorBryan Davis <bd808@wikimedia.org>
Fri, 11 Oct 2013 19:42:10 +0000 (13:42 -0600)
committerOri.livneh <ori@wikimedia.org>
Tue, 15 Oct 2013 15:38:52 +0000 (15:38 +0000)
commit55651f02f240917b90b90708f13fbf071c8f808a
treef21f30ac73a6b344e48a452341f6dd0b077ffc47
parent2d56adb39328ac086bed031bc47b1c1448ee1db5
Add configurable delay between purgeChangedPages batches

UDP flooding is possible when purging large numbers of files. This
change adds a command line switch to the purgeChangedPages.php
maintenance script to insert an artificial delay between purge batches.
The intent is to allow the network time to process the batch that was
just sent before flooding with a second batch.

`--sleep-per-batch` can be used in combination with `--batch-size` to
manage network and to some extent query load. A suggested starting point
would be to use `--sleep-per-batch=500` in concert with the default
batch size of 100 to target a maximum rate of 200 packets/second.

Bug: 55632
Change-Id: Ibfc54b1767f145098465404a2b23cd92852e41fd
maintenance/purgeChangedPages.php