Now that we have had multiple successful tests of Thumbor running on k8s, we need to address some of the outstanding issues around performance within thumbor. Thumbor-k8s generally performs on average worse per format than metal k8s, and for outlier cases (assumption is complex/larger files but also could be contention on-host) significantly worse. An example of these performances can be seen during the period where Thumbor-k8s served 50% of traffic in both datacentres here.
- We need a better statistical base to operate from as regards these assumptions - processing time graphs on the Thumbor dashboard are a good starting point but more fine-grained breakdowns of format and best/worst cases on Kubernetes would be very useful. For example currently graphs could indicate that k8s is on average slightly better than metal for imagemagick - is this correct? And if so, what divides it from other tools like ghostscript? Format metrics are a prometheus summary (via prometheus-statsd-exporter) so this is a good start. We may want to move them to histograms as summaries aren't aggregatable (see https://prometheus.io/docs/practices/histograms/#quantiles)
- Given that Thumbor is reading and writing files for intermediate stages, overlayFS may be adding some time to requests, we should investigate using better storage solutions for this.
- DJVU files in particular seem to be a challenge - For DJVU files average and max times of 5x have been noticed. To investigate this in particular, ddjvu should be examined for what resources it is using the most in order to potentially optimise for it.

