How inefficient are dapps?
ETH vs AWS/BerkleyDB
Dapps offer the same data storage and computations that can be performed using web services with centralized databases. Here I compare performance metrics and the cost of services between the two. Specifically I compare write speed, write costs, data storage costs, and sync speed. I use Amazon web services (AWS) as the benchmark for efficient web services and BerkleyDB for a database that is accessible to anyone today. I use Ethereum since it is the most popular dapp platform.
How long does it take to write to the system such that someone else can read it? For Ethereum this means how long does it take for transactions to confirm. The highest transaction volume Ethereum has ever had was on January 4th 2018 with 1.35M confirmed transactions. That’s 15.6 transactions per second. For comparison, I use some performance metrics of BerkelyDB database. For transactional writes to disk, the slowest system allows 34,888 writes per second. A web service will typically use a centralized database like BerkleyDB. Transactional write latency is at least 2.2 thousand times slower write speeds through Ethereum than with a centralized database.
Every update on the Ethereum chain will require a transaction fee and a gas fee. On September 1st 2018, the price for the median transaction fee is $0.06, and the average is $0.21. Actions which would trigger a fee would be sending a message, making a purchase, uploading data, editing data. Amazon API gateway offers 1 million API calls for $4.25 per month. The actual cost of changing internal data on a website server has no direct costs. Ethereum has at least 14 thousand times more expensive write costs.
In the Yellow paper, the price of storing a 256 bit word is 20k gas. The gas price is about 2.5 Gwei on September 1st 2018. So storage of one KB is 0.0016 ETH (there are 32 * 256 bits = 1 KB). Storage of one GB is 1600 ETH. As of the same date the price of ETH is $288. So the price of storing 1 GB is $460,800. For Amazon’s S3 pricing their most expensive option is $0.023 per GB of storage. Ethereum’s has at least 20 million times more expensive data storage than contemporary web services.
The average block is about 22 KB as of September 1st 2018. On Geth I downloaded 119 blocks in 7 minutes on a client that has only been out of sync for a few months. So that’s approximately 2.618 MB of data in 124 seconds, or 6.2 KB per second. In my experience, this is not an overly slow sync speed. In fact, with the chain data of about 100MB, this would suggest that I could sync with Ethreum’s entire history in less than 4 hours, which is very fast. In contrast, the global internet connection speed was about 5.6 MB / second in 2015. So syncing blockchain data on Ethereum is conservatively about 903 times slower bandwidth than contemporary web architecture.
To be clear this is a conservative estimation of the inefficiency of dapps. I have used pessimistic numbers for AWS/BerkleyDB and optimistic figures for Ethereum. The significance of this is that Ethereum was never realistically a competitive general computing platform and this should have been obvious from the very beginning. Any future technology improvements will apply to web services in the same way that they will apply to blockchains.