How does CPU work in EOS network? by littleboy

View this thread on steempeak.com
· @littleboy · (edited)
$62.13
How does CPU work in EOS network?
<a href="https://musing.io/q/gamingthesystem/f38ch3vux">View the original post on Musing.io</a><br /><p>CPU is a network resource in the EOS mainnet network. EOS has a system which allocates CPU to network participants who stake EOS tokens for CPU resource. This system was implemented to prevent spam transactions and denial of service attack. It also prevents overloading of the network. CPU resource is allocated at a rate that is in proportion to how much EOS a user has staked.</p>
<p>CPU is calculated in microseconds and it represents computing time. In simple words, it indicates how much computing time is allocated to a user. Having more computing time would allow a user to make more transactions.</p>
<p>When a user performs an action in the EOS network, he losses a portion of his allocated CPU time. After using up all his CPU time, he will have to wait for 24 hours till CPU is recharged. The EOS code that sets this value is in the config file's 50th line:</p>
<p>&nbsp;&gt; static const uint32_t account_cpu_usage_average_window_ms &nbsp;= 24*60*60*1000l;&nbsp;</p>
<p>A user can check how much CPU time he has by visiting his EOS profile in a block explorer. Below, I have given my EOS profile links to two major block explorers as examples.</p>
<p>https://bloks.io/account/littleboyeos</p>
<p>https://eostracker.io/accounts/littleboyeos</p>
<p>At the time of writing, my CPU time showed as "<strong>CPU used - 48,062 Β΅s / 111,819 Β΅s</strong>". It means I have 111,819 microseconds of CPU time and I used 48,062 microseconds. That means, I have &nbsp;111819 - 48062 = &nbsp;63757 microseconds of CPU time left that I can use in the next 24 hours.</p>
<p>These stats are calculated at the time of my last transaction or other action I performed in the EOS network. So, if I don't do anything in the next few hours, the same stat would be shown to me.&nbsp;</p>
<p>This CPU time allocation constantly changes. It is calculated based on how busy the network is. If the network is very busy and it is running at 500+ transactions per second, users with a low amount of EOS staked will have low CPU time. If the network is not busy and only 5 transactions are happening per second, then users will have 100 times higher CPU time than when it is running at 500+ tps.</p>
<p>I have tried to use simple language in my answer so that it is understandable for both smart and average users. If you still have doubts about something related to EOS CPU time, share your thoughts in the comments.</p>
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 104 others
properties (23)
post_id61,484,021
authorlittleboy
permlinkfkrs9e4g5
categoryeos
json_metadata"{"appBody":"<p>CPU is a network resource in the EOS mainnet network. EOS has a system which allocates CPU to network participants who stake EOS tokens for CPU resource. This system was implemented to prevent spam transactions and denial of service attack. It also prevents overloading of the network. CPU resource is allocated at a rate that is in proportion to how much EOS a user has staked.<\/p>\n<p>CPU is calculated in microseconds and it represents computing time. In simple words, it indicates how much computing time is allocated to a user. Having more computing time would allow a user to make more transactions.<\/p>\n<p>When a user performs an action in the EOS network, he losses a portion of his allocated CPU time. After using up all his CPU time, he will have to wait for 24 hours till CPU is recharged. The EOS code that sets this value is in the config file's 50th line:<\/p>\n<p>&nbsp;&gt; static const uint32_t account_cpu_usage_average_window_ms &nbsp;= 24*60*60*1000l;&nbsp;<\/p>\n<p>A user can check how much CPU time he has by visiting his EOS profile in a block explorer. Below, I have given my EOS profile links to two major block explorers as examples.<\/p>\n<p>https:\/\/bloks.io\/account\/littleboyeos<\/p>\n<p>https:\/\/eostracker.io\/accounts\/littleboyeos<\/p>\n<p>At the time of writing, my CPU time showed as \"<strong>CPU used - 48,062 \u00b5s \/ 111,819 \u00b5s<\/strong>\". It means I have 111,819 microseconds of CPU time and I used 48,062 microseconds. That means, I have &nbsp;111819 - 48062 = &nbsp;63757 microseconds of CPU time left that I can use in the next 24 hours.<\/p>\n<p>These stats are calculated at the time of my last transaction or other action I performed in the EOS network. So, if I don't do anything in the next few hours, the same stat would be shown to me.&nbsp;<\/p>\n<p>This CPU time allocation constantly changes. It is calculated based on how busy the network is. If the network is very busy and it is running at 500+ transactions per second, users with a low amount of EOS staked will have low CPU time. If the network is not busy and only 5 transactions are happening per second, then users will have 100 times higher CPU time than when it is running at 500+ tps.<\/p>\n<p>I have tried to use simple language in my answer so that it is understandable for both smart and average users. If you still have doubts about something related to EOS CPU time, share your thoughts in the comments.<\/p>","musingPostType":"answer","appParentPermlink":"f38ch3vux","musingAppId":"aU2p3C3a8N","musingAppVersion":"1.1","appParentAuthor":"gamingthesystem","app":"Musing","appCategory":"eos","appDepth":2,"appTags":["eos"]}"
created2018-09-03 18:30:09
last_update2018-09-03 20:17:15
depth0
children10
net_rshares53,434,244,580,231
last_payout2018-09-10 18:30:09
cashout_time1969-12-31 23:59:59
total_payout_value47.330 SBD
curator_payout_value14.799 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length2,504
author_reputation198,507,892,119,261
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (168)
@stellabelle ·
$0.04
Good answer as I was wondering about this.

Posted using [Partiko iOS](https://steemit.com/@partiko-ios)
πŸ‘  
properties (23)
post_id61,485,677
authorstellabelle
permlinkstellabelle-re-littleboy-fkrs9e4g5-20180903t185523591z
categoryeos
json_metadata{"app":"partiko"}
created2018-09-03 18:55:27
last_update2018-09-03 18:55:27
depth1
children0
net_rshares37,387,248,884
last_payout2018-09-10 18:55:27
cashout_time1969-12-31 23:59:59
total_payout_value0.032 SBD
curator_payout_value0.010 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length104
author_reputation436,515,832,240,166
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@allcapsonezero ·
$0.05
DO RAM next!!!  Thanks.
πŸ‘  
properties (23)
post_id61,487,977
authorallcapsonezero
permlinkre-littleboy-fkrs9e4g5-20180903t193058250z
categoryeos
json_metadata{"tags":["eos"],"app":"steemit\/0.1"}
created2018-09-03 19:31:00
last_update2018-09-03 19:31:00
depth1
children4
net_rshares45,398,802,216
last_payout2018-09-10 19:31:00
cashout_time1969-12-31 23:59:59
total_payout_value0.039 SBD
curator_payout_value0.012 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length23
author_reputation11,540,436,142,415
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@littleboy ·
Thanks for the suggestion, I am considering writing a post about that.
πŸ‘  
properties (23)
post_id61,491,573
authorlittleboy
permlinkre-allcapsonezero-re-littleboy-fkrs9e4g5-20180903t202555871z
categoryeos
json_metadata{"tags":["eos"],"app":"steemit\/0.1"}
created2018-09-03 20:25:57
last_update2018-09-03 20:25:57
depth2
children2
net_rshares12,564,434,089
last_payout2018-09-10 20:25:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length70
author_reputation198,507,892,119,261
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@allcapsonezero ·
I will read it if you make it.
properties (22)
post_id61,492,379
authorallcapsonezero
permlinkre-littleboy-re-allcapsonezero-re-littleboy-fkrs9e4g5-20180903t203923510z
categoryeos
json_metadata{"tags":["eos"],"app":"steemit\/0.1"}
created2018-09-03 20:39:24
last_update2018-09-03 20:39:24
depth3
children0
net_rshares0
last_payout2018-09-10 20:39:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length30
author_reputation11,540,436,142,415
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@stellabelle ·
$0.04
Yes please RAM! I don’t quite understand it, so in newbie terminology would be great!

Posted using [Partiko iOS](https://steemit.com/@partiko-ios)
πŸ‘  
properties (23)
post_id61,510,908
authorstellabelle
permlinkstellabelle-re-littleboy-re-allcapsonezero-re-littleboy-fkrs9e4g5-20180904t020241009z
categoryeos
json_metadata{"app":"partiko"}
created2018-09-04 02:02:42
last_update2018-09-04 02:02:42
depth3
children0
net_rshares37,440,337,854
last_payout2018-09-11 02:02:42
cashout_time1969-12-31 23:59:59
total_payout_value0.032 SBD
curator_payout_value0.010 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length147
author_reputation436,515,832,240,166
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@stellabelle ·
+1

Posted using [Partiko iOS](https://steemit.com/@partiko-ios)
πŸ‘  
properties (23)
post_id61,510,937
authorstellabelle
permlinkstellabelle-re-allcapsonezero-re-littleboy-fkrs9e4g5-20180904t020305106z
categoryeos
json_metadata{"app":"partiko"}
created2018-09-04 02:03:06
last_update2018-09-04 02:03:06
depth2
children0
net_rshares6,731,019,664
last_payout2018-09-11 02:03:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length64
author_reputation436,515,832,240,166
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@steemitboard ·
Congratulations @littleboy! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/comments.png)](http://steemitboard.com/@littleboy) Award for the number of comments

<sub>_Click on the badge to view your Board of Honor._</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



> Do you like [SteemitBoard's project](https://steemit.com/@steemitboard)? Then **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
properties (22)
post_id61,544,223
authorsteemitboard
permlinksteemitboard-notify-littleboy-20180904t105439000z
categoryeos
json_metadata{"image":["https:\/\/steemitboard.com\/img\/notify.png"]}
created2018-09-04 10:54:39
last_update2018-09-04 10:54:39
depth1
children0
net_rshares0
last_payout2018-09-11 10:54:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length676
author_reputation38,705,954,145,809
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@yanipetkov · (edited)
$0.04
Huge collection of informative articles. I should have started following you earlier, now have to go all the way back and start reading many your older posts!

Posted using [Partiko Android](https://steemit.com/@partiko-android)
πŸ‘  
properties (23)
post_id61,558,444
authoryanipetkov
permlinkyanipetkov-re-littleboy-fkrs9e4g5-20180904t140202559z
categoryeos
json_metadata{"app":"partiko"}
created2018-09-04 14:02:03
last_update2018-09-04 14:02:33
depth1
children0
net_rshares36,745,303,219
last_payout2018-09-11 14:02:03
cashout_time1969-12-31 23:59:59
total_payout_value0.031 SBD
curator_payout_value0.010 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length228
author_reputation25,835,818,340,322
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@steem-ua ·
#### Hi @littleboy!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your **UA** account score is currently 3.998 which ranks you at **#3466** across all Steem accounts.
Your rank has improved 5 places in the last three days (old rank 3471).

In our last Algorithmic Curation Round, consisting of 188 contributions, your post is ranked at **#13**.
##### Evaluation of your UA score:

* You're on the right track, try to gather more followers.
* The readers appreciate your great work!
* Great user engagement! You rock!


**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
post_id61,652,583
authorsteem-ua
permlinkre-fkrs9e4g5-20180905t133900z
categoryeos
json_metadata{"app":"beem\/0.19.54"}
created2018-09-05 13:39:00
last_update2018-09-05 13:39:00
depth1
children0
net_rshares0
last_payout2018-09-12 13:39:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length657
author_reputation23,203,609,903,979
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@ankarlie ·
Thanks for this wonderful explanation about CPU allocation on the EOS netowork. Glad to hear that it resets every 24 hours. I was not able to play EOS knights because I used up all my CPU allocations LOL. I thought I needed more EOS to stake to my CPU to continue LOL that would make that a very expensive game to play LOL.
properties (22)
post_id61,819,558
authorankarlie
permlinkre-littleboy-fkrs9e4g5-20180907t090238936z
categoryeos
json_metadata{"app":"steemit\/0.1","tags":["eos"]}
created2018-09-07 09:02:42
last_update2018-09-07 09:02:42
depth1
children0
net_rshares0
last_payout2018-09-14 09:02:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length323
author_reputation21,821,715,475,664
root_title"How does CPU work in EOS network?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000