# DB size in Temporal

**URL:** <https://community.temporal.io/t/db-size-in-temporal/7356>\
**Category:** Community Support\
**Created:** [February 22, 2023, 11:42am UTC](https://community.temporal.io/t/db-size-in-temporal/7356 "2023-02-22T11:42:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manish\_Baraskar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/manish_baraskar/32/3004_2.png) [@Manish\_Baraskar](https://community.temporal.io/u/Manish_Baraskar)\
**Post date:** [February 22, 2023, 11:42am UTC](https://community.temporal.io/t/db-size-in-temporal/7356/1 "2023-02-22T11:42:51Z")

</div>

Hi Maxim/Thiomir

Is there any way to check the database size that temporal creates for its integrated db either it is MySQL, postgres etc while installation. If yes please help and how can we increase the size if required.

Thanks…

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [February 22, 2023, 5:14pm UTC](https://community.temporal.io/t/db-size-in-temporal/7356/2 "2023-02-22T17:14:04Z")

</div>

Hi, not sure I understand the question, the size of the db is something you set up and the db capacity needed is much related to your workload size.

---

<div class="post-metadata">

**Author:** ![Manish\_Baraskar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/manish_baraskar/32/3004_2.png) [@Manish\_Baraskar](https://community.temporal.io/u/Manish_Baraskar)\
**Post date:** [February 22, 2023, 5:39pm UTC](https://community.temporal.io/t/db-size-in-temporal/7356/3 "2023-02-22T17:39:31Z")

</div>

Hi @tihomir you mean to say that while installation of temporal we can define the size, basically capacity of database.

Let say in future where temporal logs its history in its integrated database run out of memory(size assigned while temporal installation) and I want to increase the size and as well want to know the default size it has taken.

Any cmd, any config that can help me with this.

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [February 22, 2023, 8:30pm UTC](https://community.temporal.io/t/db-size-in-temporal/7356/4 "2023-02-22T20:30:37Z")

</div>

I don’t think there is a great answer for your question currently.

If you are doing a new setup you would imo have to do a load test and then measure the db size differences. This would then give you an idea of estimation given your db size currently, and what to expect given your expected workloads in the future.

For example consider having following simple workflows to test:  
a) workflow that executes 1, 4, 16, etc sequential activities  
b) workflow that executes 1, 4, 16 etc parallel child workflows

If you have an existing setup already, look at your db cpu, memory utilization and disc IO as well as  
measure your persistence latencies (server metrics):

`histogram_quantile(0.95, sum(rate(persistence_latency_bucket{}[1m])) by (operation, le))`

What to aim for can vary depending on db, for example shoot for p99 being less than 50ms for Cassandra, MySQL. For PostgreSQL you might want this to be even lower (as its single db setup).  
Distributed dbs (for example Cockroach) might be slower on larger scales, but would have to measure.

Hope this helps

---

<div class="post-metadata">

**Author:** ![Manish\_Baraskar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/manish_baraskar/32/3004_2.png) [@Manish\_Baraskar](https://community.temporal.io/u/Manish_Baraskar)\
**Post date:** [February 23, 2023, 4:00am UTC](https://community.temporal.io/t/db-size-in-temporal/7356/5 "2023-02-23T04:00:53Z")

</div>

Thanks @tihomir
