The Hidden Energy Cost of Communication
Angelo Corsaro
World Top Expert and Influencer in Cloud-to-Thing Continuum. Building technologies to communicate, compute and store — anywhere, at any scale, efficiently, securely and free from any constraint.
And how to minimise it with Zenoh
It is undeniable that there is growing scrutiny on the energy consumed by IT infrastructure. Clearly, there is increased attention to reducing the energy consumption of hardware as well as a trend toward provisioning energy from renewable sources. As a consequence, today, many of the cloud mega-vendors pride themselves with having a green datacenter — which is indeed great.?
Thus, the natural question should be: is there anything else we can do???
Surprisingly, the general perception is that we have addressed the bulk of the energy problem, yet the reality is different. Before getting into the details, I want to give you an example that will make this extremely concrete. An example that you can relate to in your daily experience with your mobile phone.?
Think for a moment about the activity that drains the mobile phone’s battery the fastest.? Yes, you got it, it is using the Internet, or more precisely, it is communication in general. This is a reflection of a general fact that engineers are familiar with: communication is more energy-hungry than computation.?
Now that we’ve seen the rabbit hole, let’s follow the white rabbit a bit deeper. Suppose that you are using your mobile phone to control a connected device, such as a thermostat in your living room. In this case, it is almost certain that in order to interact with your device you are communicating with a cloud service sitting thousands of kilometers away from you, which in turn is communicating with your smart device. Imagine for a moment how many network elements you are traversing in this planetary journey … only to reach something that is sitting in front of you. Wouldn’t it be more efficient to interact directly with your device? Of course it would, thus why don’t we do that?
Finally, to give you a sense of the amount of energy we are talking about, let me share a commonly reported example. Despacito’s video – the first YouTube video hitting the five-billion-views mark – burned, in the process, as much energy as 40,000 US households consume in a calendar year.? Based on what I’ve read on the analysis of this number, I’d argue that the communication cost is not even properly considered, thus the situation is even worse.??
Breaking Down the Problem
Now that you have a clear understanding of the problem, let’s try to break down its key elements. We have essentially three ways of reducing the energy consumed by communication:
I won’t be expanding on the first point, as this is the predominant approach taken today to reduce consumption, thus I’ll be focusing on the remaining two points.
Without getting into discussions of data parsimony, recently advocated by some initiatives such as the Shift Project, there is a lot we can do to reduce the amount of data sent across the network. Locality plays a big role – the key idea is to retain communication as local as possible and thus avoid burning energy with data crossing? the Internet without any good reason.?
For instance, in the example of the connected home device, exploiting locality would mean being able to communicate directly with the device whenever possible — as opposed to systematically letting the data travel across the globe.? In addition to locality, reducing the amount of unnecessary data sent across the network can also help a lot.? There are two ways of reducing unnecessary data, one is to avoid sending data that nobody is interested in and the other is to reduce to the bare minimum the protocol overhead necessary to carry the user data.?
The bad news is that most of the technology deployed today doesn't make it easy for exploiting location and has not necessarily been designed to minimize the amount of unnecessary data (from an information theory perspective) sent across the network.?
领英推荐
As an example, many of the messaging protocols that are used today for connected devices, such as MQTT, make it extremely hard if not impossible to exploit communication locality due to the limitation of the communication topologies supported. In other terms, MQTT allows applications only to communicate via the mediation of a broker. This broker is usually deployed on a cloud, and here we go, we are missing any chance of exploiting locality.?
Luckily, a new protocol designed to address the challenges posed by existing technologies, with energy being one of those, is experiencing? enormous traction and adoption. This protocol is called Zenoh (Zero network over-head). Let’s discover what it can do for us.
Zenoh: The? Zero Network Over-Head Protocol
Zenoh is an open source protocol designed by the ZettaScale team which has been receiving a lot of attention due to some of its very unique features. Before explaining what is special about Zenoh and how it can help, among other things, reducing the energy used in communication, it is worth explaining the motivations behind Zenoh’s design.?
When looking at the protocols available today, it is impossible to find a technology that is able to run efficiently from the datacenter down to the microcontroller. A protocol that can work efficiently on constrained as well as high-bandwidth networks. As a result, most of the systems that span from the datacenter to the microcontroller have to deal with the integration of multiple technologies, some of which are imposing some extremely strict limitations on the communication patterns.?
As an example, MQTT only supports client to broker communication and no peer-to-peer, yet peer-to-peer is essential to leverage locality.? If we take an example on the opposite side of the spectrum, DDS supports peer-to-peer, but it is very hard to get it to work across the Internet. Both of these protocols are not easy to use on constrained networks — in both cases another (non-wire-interoperable) protocol has to be used, MQTT-SN for one and DDS-XRCE for the other.
If we look at protocol overhead, neither DDS nor MQTT were really designed to minimize the protocol data, and even protocols that are supposed to be wire-efficient, such as DDS-XRCE are actually clumsy to use and overly verbose (see this blog)? On one hand, an MQTT publisher will send data even if there is nobody interested in receiving it. On the other hand, the wire-overhead for both DDS and MQTT is, at very minimum, several tens of bytes.?
Zenoh addresses the limitations of existing protocols, by providing a wire-overhead of about five bytes and providing the ability to communicate, share, and query data over arbitrary topologies. Different from mainstream protocols, Zenoh can run on IP networks but technically does not need it, as it can sit as low as Data-Link Level on the ISO/OSI communication model.
Zenoh is able to deliver great performance on both high-end and extremely constrained hardware and networks. It is able to deliver over 60 Gbps of throughput on regular workstations connected by 100 Gbps IP network and has a latency of 10usec.
Let’s now compare the impact of the wire-overhead. Imagine that there is a device that is sending a reading every hour, let’s assume that this reading is 16 bytes. With Zenoh, over a year timespan, the amount of data sent would be (16+5)*24*365 = 140160 + 43800 bytes, whereas the 43800 bytes would be the Zenoh protocol overhead. With MQTT, assuming a topic name of 32 characters, so that we can have the same minimal wire-overhead as DDS, we would get (16 + 75)*25*365 bytes = 140160? + 657000 bytes. There are two things to notice here. First, with MQTT and DDS we end up sending far more protocol data than user data. Second, these protocols have at least 15x more wire overhead than Zenoh. Please consider that while the protocol data is not a lot per se, if you consider that there could be millions of these devices communicating, you see that a factor 15 makes a huge difference in the amount of data sent and, as a consequence, the overall energy used. But there is more. In Zenoh, if applicable for your network, you could avoid using IP in some segments, further reducing the wire-overhead.?
The other aspect in which Zenoh can help cut down energy use is by keeping communications local.? As shown in the diagram below, Zenoh allows applications to communicate peer-to-peer, brokered by a router or a peer, or routed. This flexibility makes sure that the communication topology can always be optimal for your application and as such, exploit locality and reduce power consumption as explained earlier. If this wasn’t already great, Zenoh provides more, specifically, it makes available a primitive for geo-distributed queries that enables decentralized storage of data, thus providing yet another way of reducing energy consumption by leveraging locality for data at rest.
Final Thoughts?
In this article we have investigated the hidden cost of the communication, identified the different approaches that can be taken for reducing it, and introduced a novel and swiftly growing protocol, named Zenoh. Zenoh allows for the optimization of? energy utilization by supporting locality, and minimizing protocol data overhead.?