We store all thumbnails ever requested in swift. This has many disadvantages. T211661: Automatically clean up unused thumbnails in Swift and T360589: De-fragment thumbnail sizes in mediawiki are long-term solutions but in the mean time, we are doing a one-off deletion of all thumbnails gradually over period of at least several months to free up space, reduce size of swift databases and allow for change of thumbnail sizes (T355914: Change default image thumbnail size)
Exploratory notes:
Something like this would clean up the thumbnails just fine:
swift list wikipedia-ja-local-thumb.01 | xargs -I{} swift delete wikipedia-ja-local-thumb.01 "{}"I ran it a couple of times on small containers and it basically drops thumbnails at rate of 2.3 thumbs per second. With that rate, it'll take 13.6 years to go through all containers. So some parallelism is needed.
Another issue to figure out why dc switchovers cause extra load on thumbor and make sure these deletions don't make things worse in the next switchover.
First we start with drop of thumbnails in local uploads of wikis (except commons) as they are quite small in comparison.
Progress:
- codfw
- 0x (should be re-done after other runs)
- 1x (should be re-done after other runs)
- 2x (should be re-done after other runs)
- 3x
- 4x
- 5x
- 6x
- 7x: Running
- 8x
- 9x
- ax
- bx
- cx
- dx
- ex
- fx
- eqiad
- 0x: Partially done: 01-04 done, 05-0f not done.
- 1x
- 2x
- 3x
- 4x
- 5x: Running
- 6x: Running
- 7x
- 8x
- 9x
- ax
- bx
- cx
- dx
- ex
- fx
