1

Good day, everyone! Can somebody explain how I can calculate or forecast of my contract CPU usage in mainnet on some period? I want to understand the process of identification the factors that define real values of cpu bandwith in the future.

| improve this question | | | | |
  • pretty much impossible at the moment.. just a few days the wasm interpreted was updated to work 2x faster so any CPU calculations before that were invalidated. similar things may happen in the future or if BPs upgrade their machines – confused00 Sep 27 '18 at 22:27
  • @confused00 when will the new interpreter coming? – Jimmy Guo Sep 28 '18 at 5:51
  • @JimmyGuo it already did in v1.3.0 github.com/EOSIO/eos/releases/tag/v1.3.0 – confused00 Sep 28 '18 at 13:47
0

As far as i know, You cannot calculate exactly CPU usage. With the same transaction will have different cost depending on BPs and network condition.

But you can forecast your CPU usage in smart contract by estimate how many transactions and how much does it costs for these transactions.

Example: You Dapp will have 100 transaction/day, CPU usage average ~ 1ms/transaction. --> This mean, you need 100ms CPU/day

More detail, you can refer here https://medium.com/leclevietnam/eos-resource-allocation-98bb6cb84497

| improve this answer | | | | |
1

You can now estimate your costs for a transaction by using EOS New York's EOS Charge.

Methodology:

There is a MongoDB query that runs hourly. This query averages the CPU and NET resource costs experienced for every action performed on the EOS Mainnet within the last 100,000 blocks

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.