# Computation and Storage Cost Documentation

**URL:** <https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085>\
**Category:** Developers\
**Created:** [July 24, 2021, 1:11pm UTC](https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085 "2021-07-24T13:11:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ori](https://avatars.discourse-cdn.com/v4/letter/o/ecae2f/32.png) [@Ori](https://forum.dfinity.org/u/Ori)\
**Post date:** [July 24, 2021, 1:11pm UTC](https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085/1 "2021-07-24T13:11:24Z")

</div>

Cost of Compute and Storage Transactions on the Internet Computer

> **[Internet Computer | Documentation](https://sdk.dfinity.org/docs/developers-guide/computation-and-storage-costs.html)**
>
> Documentation for the internet computer.

---

<div class="post-metadata">

**Author:** ![senior.joinu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/senior.joinu/32/9240_2.png) [@senior.joinu](https://forum.dfinity.org/u/senior.joinu)\
**Post date:** [July 24, 2021, 8:29pm UTC](https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085/2 "2021-07-24T20:29:12Z")

</div>

> <https://twitter.com/dominic_w/status/1394713095218499584?s=20>

From the linked document:

| Transaction | Description | All Application Subnets |
| --- | --- | --- |
| GB Storage Per Second | For storing a GB of data per second | 127,000 |

From my pc:

> ~$ python  
> \>\>\> cycles\_per\_year = 127\_000 \* 60 \* 60 \* 24 \* 30 \* 12  
> \>\>\> t\_cycles\_per\_year = cycles\_per\_year / 1\_000\_000\_000.0  
> \>\>\> t\_cycles\_cost\_usd = 1.42  
> \>\>\> t\_cycles\_per\_year / t\_cycles\_cost\_usd  
> 2781.83661971831

Am I missing something? Is it 1 XDR per 1T cycles?

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [July 24, 2021, 10:00pm UTC](https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085/3 "2021-07-24T22:00:19Z")

</div>

I am on my phone and and quickly replying but when I saw this line my first thought was:

> [@senior.joinu](#):
>
> > > > t\_cycles\_per\_year = cycles\_per\_year / 1\_000\_000\_000.0

I think you may be dividing by billion, not trillion? And I _believe_ by your variable name that you are looking for Trillion.

(This may not address your higher level point, but just saw what I thought could be a big difference in whatever result you search for)

---

<div class="post-metadata">

**Author:** ![senior.joinu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/senior.joinu/32/9240_2.png) [@senior.joinu](https://forum.dfinity.org/u/senior.joinu)\
**Post date:** [July 24, 2021, 10:01pm UTC](https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085/4 "2021-07-24T22:01:49Z")

</div>

Thank you! That’s my fault. Missed extra `000`  
In that case it’s even better than $5!

---

<div class="post-metadata">

**Author:** ![senior.joinu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/senior.joinu/32/9240_2.png) [@senior.joinu](https://forum.dfinity.org/u/senior.joinu)\
**Post date:** [July 24, 2021, 10:16pm UTC](https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085/6 "2021-07-24T22:16:15Z")

</div>

Looks like it’s only 10 times more than AWS S3 in my region. Cool!

---

<div class="post-metadata">

**Author:** ![senior.joinu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/senior.joinu/32/9240_2.png) [@senior.joinu](https://forum.dfinity.org/u/senior.joinu)\
**Post date:** [July 24, 2021, 10:46pm UTC](https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085/7 "2021-07-24T22:46:29Z")

</div>

What if my query call loops forever? What if these calls are CPU-heavy?

Since there is no cycles consumption during query calls, is it safe?

---

<div class="post-metadata">

**Author:** ![akhilesh.singhania](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/akhilesh.singhania/32/487_2.png) [@akhilesh.singhania](https://forum.dfinity.org/u/akhilesh.singhania)\
**Post date:** [July 26, 2021, 7:54am UTC](https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085/8 "2021-07-26T07:54:44Z")

</div>

Thanks for the question. @diegop tagged me to answer it. My name is Akhi and I am the engineering manager for the execution team which built the bulk of the query handling mechanism.

We currently do not charge for queries however we do have mechanisms to limit how many resources are consumed by them.

- Each message execution has an upper limit on how many instructions it can consume. If a message execution is done before the limit is reached, then the message is declared as failed.
- On top of that, a given canister can only consume so many instructions executing queries per node on the subnet over a time period. This makes sure that a given canister does not execute too many queries.
- Next we have rate limiting on the http\_handler (the component that handles the http requests from users and forwards queries to execution). If the system / http\_handler is under too much load, then this component starts to reject new http requests from the user.

I hope that this helps answer your question above. Please let me know if you have further questions.

---

<div class="post-metadata">

**Author:** ![senior.joinu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/senior.joinu/32/9240_2.png) [@senior.joinu](https://forum.dfinity.org/u/senior.joinu)\
**Post date:** [July 26, 2021, 12:40pm UTC](https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085/9 "2021-07-26T12:40:31Z")

</div>

Thanks, it helped a lot.  
This means, that it is actually useful to optimize queries as well.

---

<div class="post-metadata">

**Author:** ![akhilesh.singhania](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/akhilesh.singhania/32/487_2.png) [@akhilesh.singhania](https://forum.dfinity.org/u/akhilesh.singhania)\
**Post date:** [July 26, 2021, 1:10pm UTC](https://forum.dfinity.org/t/computation-and-storage-cost-documentation/6085/10 "2021-07-26T13:10:24Z")

</div>

Yes, absolutely! And in future we will also start charging for queries so there is that incentive as well.
