Back to blog

The Cost of a Byte

January 6, 2022 by

 Noah Martin
iOSAndroidApp size
Carbon footprint of an app

The size of an app has wide-reaching consequences on user experience. At first glance, you might consider slower install times, more install failures, and a higher uninstall rate. But it doesn't stop there. Unnecessary code leads to rising compile times. Large binaries increase how much work the runtime does to lookup conformances, slowing down every aspect of an app. The more classes you have, the more work is done by dyld, slowing app launches, and increasing memory usage. Some users pay for bandwidth usage, creating a literal direct cost to download your app. The effects even reach beyond your users, to the energy usage of the Internet as it transfers app downloads.

With more and more time spent online, people have been taking an interest in the energy usage and environmental impact of the Internet. Researchers from MIT, Purdue, and Yale even demonstrated that turning off the camera during a Zoom meeting shrinks the environmental footprint by 96%. This got me thinking about the environmental footprint of app size. While an app download is small compared to live video streaming, the scale of downloads can be in the 100s of millions. As is often the case with development at scale, a single decision shipped to this wide user base gives us a big opportunity.

The Internet's Footprint

There are a few estimates for how much the Internet contributes to global emissions, falling somewhere around 3% of the global total. This is on par with the amount generated by the airline industry. While technology is getting more efficient, the number of people connected to the internet and the amount of bandwidth they require is also increasing rapidly.

In 2019 a report from the Shift project made headlines claiming that 30 minutes of video streaming emits 1.6kg of CO2, the same amount as 4 miles of driving [1]. This figure was proven wrong and has since been updated. The most recent estimates are in the range of 30-80g, only 2-5% of the original estimate [2]. Great news for an individual's contribution, but not changing the global contribution of technology and the Internet.

An App's Footprint

Internet bandwidth is now primarily composed of video streaming, claiming over 60% on mobile networks. Of course, some network usage is going to app downloads, and we can use publicly available information to estimate the footprint of this traffic. First, we need to determine the energy usage per GB transferred over the Internet. There are many estimates out there, including reports from the International Energy Association rebutting the Shift project's original report, and a follow-up response from the Shift project. Researchers have been comparing these findings and more to determine what data is most accurate. Many discrepancies come from different boundary definitions (data centers, networks, end devices), how far in the network data needs to travel (CDN served data could be more efficient), or network type (cellular vs Wi-Fi). The Shift Project created a 1-byte report which uses 2.24e-10 kWh/byte for Wi-Fi and 9.56e-10 kWh/byte for cellular.

Network efficiency is always improving, although it takes time to deploy new technologies, so let's assume optimistically that the Wi-Fi estimate can apply to all app downloads. The US average electricity produces 0.386kg of CO2 per kWh bringing our total number to 8.646e-5kg CO2 / MB.

Assuming updates are released weekly (4 times a month), an app's carbon footprint is given by:

8.6464e-5 * (SD * D + SU * U * 4) = kg CO2/month

SD = App download size

D = Number of app downloads per month

SU = App update size

U = Number of users who update

Let's plug in the numbers for the most recent Uber iOS app:

8.6464e-5 kG CO2 per MB * (110 MB download size * 4,000,0000 downloads per month + 69 MB update size * 23,000,000 users who update * 4 updates per month) = 586.92 metric tons CO2/month [3]

Using the same usage stats, you can vary the size number to see that increasing app download size by 1MB increases emissions by 8,300 kg CO2/month.

Relative Size

These numbers are rough estimates because we don't know the exact distribution of users or what networks they use. Nonetheless, compared to commonly cited contributors to a carbon footprint, adding/removing 1MB in app size for a month has a surprisingly large impact.

1 MB of app size (assuming Uber's usage statistics) would be equivalent to:

The huge scale factor that applies when you take a small 1 MB download and multiply it by the millions of times an app like Uber is downloaded, drives the unexpectedly large carbon footprint. This is not to say that making smaller apps will be a huge help to climate change, quite the opposite. Despite all that we've shown, most of the energy consumed by a mobile device is gone before the user even gets a hold of it, in the manufacturing process [2]. A fully booked long-haul flight would create ~50x more emissions than 1 MB, only the per capita emissions are lower. Not to mention the switch to renewable energy could reduce the cost of a byte to zero.

When looking for ways to reduce one's personal impact on the environment, like walking/biking instead of driving or substituting a veggie burger for a hamburger, it can be discouraging to consider the relatively low impact of these personal choices. It's good to know those individual choices to reduce bandwidth when designing systems have an impact as well. Depending on user base size this can be an even more effective change. Nonetheless, every bit counts.

See what the carbon footprint of your app is

Default values used are estimates for Uber's latest iOS app at the time of publishing.


[1] https://nypost.com/2019/10/28/why-climate-change-activists-are-coming-for-your-binge-watch/

[2] https://doi.org/10.1145/3490165

[3] 4M downloads per month according to Sensor Tower. 93M active users with 50% of them on iOS and assuming half have auto-update enabled. Download and update sizes taken from iPhone 13.

Related articles