Difference between revisions of "Internet Computer performance"

From Internet Computer Wiki
Jump to: navigation, search
Line 50: Line 50:
 
! Source !! Cost (measured in Joules (J))
 
! Source !! Cost (measured in Joules (J))
 
|-
 
|-
| One Internet Computer transaction || 261 J
+
| One Internet Computer transaction || 261 J
 
|-
 
|-
| One Google search || 1'080J<ref>https://store.chipkin.com/articles/did-you-know-it-takes-00003-kwh-per-google-search-and-more</ref>
+
| One Google search || 1'080&thinsp;J<ref>https://store.chipkin.com/articles/did-you-know-it-takes-00003-kwh-per-google-search-and-more</ref>
 
|-
 
|-
| One Solana transaction || 1'837 J<ref>https://solana.com/news/solana-energy-usage-report-november-2021#ref1</ref>
+
| One Solana transaction || 1'837&thinsp;J<ref>https://solana.com/news/solana-energy-usage-report-november-2021#ref1</ref>
 
|-
 
|-
| One Ethereum 2 transaction || 126'000 J<ref>https://blog.ethereum.org/2021/05/18/country-power-no-more/</ref>
+
| One Ethereum 2 transaction || 126'000&thinsp;J<ref>https://blog.ethereum.org/2021/05/18/country-power-no-more/</ref>
 
|-
 
|-
| One Cardano transaction || 1'972'440 J<ref>https://www.trgdatacenters.com/most-environment-friendly-cryptocurrencies/</ref>
+
| One Cardano transaction || 1'972'440&thinsp;J<ref>https://www.trgdatacenters.com/most-environment-friendly-cryptocurrencies/</ref>
 
|-
 
|-
| One Ethereum transaction || 692'820'000 J<ref>https://digiconomist.net/ethereum-energy-consumption/</ref>
+
| One Ethereum transaction || 692'820'000&thinsp;J<ref>https://digiconomist.net/ethereum-energy-consumption/</ref>
 
|-
 
|-
| One Bitcoin transaction || 6'995'592'000 J<ref>https://digiconomist.net/bitcoin-energy-consumption</ref>
+
| One Bitcoin transaction || 6'995'592'000&thinsp;J<ref>https://digiconomist.net/bitcoin-energy-consumption</ref>
 
|}
 
|}
  

Revision as of 13:41, 25 May 2022

A key objective of the Internet Computer is to provide a public compute layer that replaces traditional IT. A natural concern is that this will cause an increase in global energy consumption, which is bad for the environment, because the Internet Computer is a blockchain network. However, this is not the case.

The Internet Computer works very differently to other blockchains, and is powered by advanced new cryptography. Internally, the network is able to strictly limit the replication of data and computation, while still providing the liveness and security guarantees expected of a blockchain. It also has the ability to assign different “trust levels” to units of blockchain code that it hosts (“smart contracts”), which changes the level of replication applied to their computations and data. In its current state of development, it is already orders of magnitude more efficient than other blockchains, but it is designed to eventually become more efficient that traditional IT too.

Like all blockchains, the Internet Computer network directly applies replication, in combination with advanced cryptography, to create a tamperproof platform with far better liveness guarantees than traditional IT. Yet, it also limits replication, while using the replication that occurs to drive efficiency, for example by scaling out “query” transactions. Systems and services built using traditional IT platform often heavily reply upon replication, but because replication is tagged-on, rather than being a core part of how the underlying platform works, we believe that in the long run the Internet Computer will be substantially more efficient.

For example, a large online service might be built on Amazon Web Services using a database in a master-slave configuration, Kubernetes instances of web workers, memcached instances for caching the results of database queries, and a CDN (content distribution network) that caches web content they serve on the edge of the network. This already creates a large amount of replication without creating a tamperproof platform, nor providing liveness guarantees. For example, each slave node of the database replicates its computations and data, and regular snapshots will also be taken as backups, data used by the web workers is replicated by the memcached instances, and each work will also cache data in its memory, while the product of web queries will be replicated all over the world on CDN nodes.

Because replication is at the core of the design of the Internet Computer, it can derive powerful security, liveness and other properties from replication, while also applying it more efficiently. For example, because the Internet Computer is a single logical blockchain and platform, as it grows larger, the utilization of the underlying node hardware upon which it runs can be made higher than, say, a standalone server machine in a data center. A key objective of the Internet Computer is, over time, to provide a public compute platform that provides a more power efficient way for the world to build systems and services.

Performance experiments

Here, we describe the DFINITY Foundation's performance evaluation of the Internet Computer. The current measurements are from May 2022.

Scalability of the Internet Computer is facilitated by sharding the IC into subnet blockchains. Every subnet blockchain can process update calls (writes) from ingress messages independently from other subnets. The IC can scale up by adding more subnets at the cost of having more network traffic (as applications potentially need to communicate across subnets). In its current form, the IC should be able to scale out to hundreds of subnets.

Query calls (reads) can be processed locally by nodes in a subnet. The response to a query call can therefore have low latency since the query just needs a response by a single node and does not require inter-node communication or agreement. The more nodes a subnet has, the more query calls it can handle; and the more nodes the IC has, the more query calls it can handle.

Test setup

The experiments were run concurrently against all subnets other than the NNS and some of the most utilized application subnets to avoid disturbance of active IC users. The IC has a set of boundary nodes that route calls to the core nodes that host the subnets. The experiments sent loads against the subnets directly and are did not route traffic through the boundary nodes. Boundary nodes have additional rate limiting, which is currently set slightly more conservative compared to what the IC can handle and running against the boundary nodes would therefore be unsuitable for performance evaluation. The experiment targeted all nodes in every subnet concurrently, much the same as what boundary nodes would be doing if we would use them.

The experiment consisted of installing one counter canister in every subnet. This counter canister is essentially a no-op canister. It only maintains a counter, which can be queried via query calls and incremented via update calls. The counter value is not using orthogonal persistence, so the overhead for the execution layer of the IC is minimal. Stressing the counter canister can be seen as a way to determine the system overhead or baseline performance.

Measurements

Update calls

The Internet Computer can currently sustain more than 22'000 updates/second for a period of four minutes, with peaks over 22'150 updates/second. The update calls measured here are triggered from ingress messages sent from outside the IC.

Query calls

Arguably more important are query calls, since they contribute to more than 90% of the traffic observed on the IC. The Internet Computer can currently process up to 1'450'395 queries per second. During the experiment each load is increased incrementally and run for a period of 5 minutes.

Energy consumption

The following is an approximation of mainnet power consumption. The peak power consumption of our nodes is 700W. If we assume a power usage effectiveness (PUE) 1, 2, of 2.33 that leads to a total power consumption of 1631.0W including cooling and other data center operations costs. Given a total of 518 nodes and 11 boundary nodes in mainnet, resulting in a worst case of 862799W to operate all IC nodes for mainnet. This is a worst case analysis for power consumption of nodes as we would normally expect them to throttle when not fully utilized and thereby reducing power consumption.

Given the maximum rate of updates and queries that we can currently support in the IC, one update call would consume 38.95J (Joules) and one query call 0.59J. These figures are for a hypothetically fully utilized IC. With the current approximate rate of 3300 transactions/s, the IC uses 261.45J per transaction.

Putting this in context

We can see that even with conservative estimations, the energy consumption of the Internet Computer is substantially lower than competing blockchain projects, but also existing (highly optimized) web2 tech. See the table below to put IC performance in perspective.

Energy consumption comparison
Source Cost (measured in Joules (J))
One Internet Computer transaction 261 J
One Google search 1'080 J[1]
One Solana transaction 1'837 J[2]
One Ethereum 2 transaction 126'000 J[3]
One Cardano transaction 1'972'440 J[4]
One Ethereum transaction 692'820'000 J[5]
One Bitcoin transaction 6'995'592'000 J[6]


Conclusion and next steps

The Internet Computer today already shows impressive performance. On top of that, it should be possible to further scale out the IC using:

  • More subnets: This will immediately increase the query and update call throughput. While adding subnets might eventually lead to other scalability problems, the IC in its current shape should be able to support hundreds of subnets.
  • Performance improvements: Performance can also be improved by better single machine, network and consensus performance tuning. Increasing the performance by at least an order of magnitude is plausible.

See Also

References