After benchmarking the MoeingADS using ESC Chain, which can only send tokens, you may be curious about how it performs on smart contracts. So now we introduce how to run benchmarks to test the performance of calling smart contracts with MoeingEVM and MoeingADS.
We simulate such a scenario that 100% of CPU resource is used for verifying the transactions in blocks. As Vitalik Buterin pointed out, it is better for a node to put only 10% of CPU resource in verifying blocks. So if we want to reach the "one billion gas every 15 seconds" target, we'd better make sure the performance of solely verifying blocks can reach about 10 billion gas every 15 seconds.
The generated transactions can be categorized into three groups:
Deploy the smart contracts
Initialize the storage slots and the target addresses, using the run0 function
Transfer random amount of BCHs to the randomly-selected target addresses and overwrite some storage slots randomly, using the run2 function
The benchmarks are written in such a way that transactions in group 2 always create new storage slots while transactions in group 3 always overwrite existing storage slots. Most real transactions' behavior is at some position in between: they both create new slots and overwrite existing slots.
These three groups of transactions are carried out in sequence. We care about the performance of group 3 and the last part of group 2. Because when these transactions get executed, MoeingADS has already taken a lot of SSD space (200GB+) which is too large for OS to cache it in DRAM.
The gathered results are:
Performance of Group 3 (billion gas per second)
Performance of Group 2 (billion gas per second)
When CPU count increases from 8 to 16, the speed-up is obvious; but when from 16 to 32, the speed-up is not so obvious. This is because there are some jobs which cannot be parallelized.
We can see that 16 Graviton2 vCPUs are faster than 16 EPYC vCPUs. This is because a vCPU of Graviton2 is a physical core, while a vCPU of EPYC is just one thread of the two threads running on a physical core.
According the results, m6gd.4xlarge has the best price/cost: it burns 5.1~12.9 billion gas in 15 seconds, and its price is lower than m5ad.4xlarge.