It's no secrect that ImageMagick creates thumbs fast but often unecessarily large.
I just optimized the thumb directory with 265K files (12 GB) with jpegoptim. It took only 10 minutes (8 core x 3 GHz) and I saved over 1 GB :) #perfmatters
Now wouldn't it be great to optimize the thumbs right after creation? The thumb is immediatly available by IM, then the optimizer runs over it and replaces it if possible.
Related: https://phabricator.wikimedia.org/T101015 (Use optimised version instead of original when original size is used as thumbnail)
Edit: pngcrush saved me ~8% files size (190 MB in 2,2 GB, these 2,2 GB png thumbs were included in the JPEG calculations above)