Energy efficiency of modern codecs
How efficient are modern codecs? Can we ever work out whether the power use of compression algorithms is a net gain for global power consumption?
Come on a thought experiment with me.
I have invented a new image compression format. It shrinks images to 50% smaller sizes than AVIF and is completely lossless. Brilliant!
There's only one problem - it is 1 million times slower.
If it takes your computer 10 seconds to compress an AVIF, it'll take 115 days to compress using my new format.
Is that worth it?
There are five aspects to think about here.
Time
If you're someone like, say, Netflix - this might be fine. You can throw a whole bunch of cloud servers at the problem, so you're not time-bound.
If you're a smaller service, or if you require instantaneous image compression, this is a pointless format. The time-cost - let alone processing costs - is prohibitive.
Space
If you're a library with billions of images - storage costs are a real concern. Halving those costs could save you more than it would cost to recompress all your images.
But storage is pretty cheap these days. Terabytes of storage are easily in range of home users. Is the cost of encoding worth it given that space isn't a limiting factor?
Transit
The Netflix logo is downloaded a hundred million times per day. So would a massive saving in bandwidth costs be worth the trade-off? Probably, yes.
If you pay per MB for your Internet access, you'll probably welcome this new codec. Saving money is great.
But how much does bandwidth really cost? Is it that expensive for either party?
User Experience
I've only mentioned the speed of encoding so far. Most codecs are asymmetric; they take a long time to encode but are fairly quick to decode.
Image formats like JPG and PNG are displayed practically instantly even on modest hardware. What if my wonderful new image format takes a couple of seconds to decode and display? That might be unacceptable. Asking the user to buy a new computer or upgrade their software may also be impossible.
Power and Pollution
I think this is what it comes down to. How much energy does it take to create and use these images? I don't know how much CO2 it costs to transport a GB of data from one side of the planet to the other. And I don't know how energy efficient data centres are around the world.
I suspect that this is an impossible calculation. This daft image format would be a disaster if run on coal-powered server which sent data over a solar-powered fibre-optic cable. But, conversely, if we have a wind-turbine powered server sending data over the Deep Space Network to Mars (expensive and bandwidth-constrained) then this format is probably less polluting.
I worry that new compression formats face diminishing returns when faced with massive power costs. If the power required to encode and decode images continues to get larger, it could outstrip the savings made on transit and storage.
Randall says: