Throughput is a measure of how many units of information a system can process in a given time window. To measure performance on a transaction platform, throughput is expressed in terms of TPS, transactions per second:
- For Bitcoin, TPS can be computed as follows. A Bitcoin block normally contains 1,500-2,000 transactions. Let's use the high-end number, 2,000. Since it takes 60 minutes to confirm these 2000 transactions, its TPS = 2,000 / (60*60) = 0.56; that is, only half a transaction per second. A similar calculation for Ethereum yields a TPS = 2,000 / 204 = 9.8, almost 10 transactions per second—much better than Bitcoin. Led by Vitalik, the Ethereum Foundation is working on the sharding approach, targeting at increasing TPS by 80 times.
- For comparison, VISA has an average TPS of 2000 with a peak at 40,000. A high-performance database such as VoltDB can handle over a million insertions per second. A stock exchange can match thousands of trades per second.
- However, this comparison is not complete. From a business point of view, a credit card or exchange transaction is finalized only when it is cleared and settled. For credit cards, a billing cycle is normally 2-3 months. A stock exchange takes three days to settle a transaction. In this sense, Ethereum is much faster, since on the blockchain transaction and settlement occur simultaneously.
- When compared with a database, Ethereum is at a disadvantage. A database commitment can take place right after the insertion, updating, or deletion of a transaction.
- These are the reasons causing Ethereum's slowness:
- Every full node must execute the same smart contract code.
- As the Ethereum network becomes larger, the time for reaching a consensus will take longer, as it takes time to transfer data between a growing number of nodes to verify transactions, access info, and communicate.
- There are ways to increase the throughput. The following are a few:
- When the block size is increased, more transactions can be hosted in a block and a higher TPS can be obtained.
- Running multiple chains in parallel. Enterprise chains such as Hyperledger Fabric and R3's Corda use this approach.
- State channel design helps to increase throughput. An example of a state channel implementation for Ethereum is Raiden. Micro Raiden was launched in November 2017. The idea behind state channels is to use off-chain for a transaction between two parties and use on-chain for the settlement of the transaction. Off-chain transactions are another topic worth an in-depth discussion, but not in this book.