# How much extra disk space is required for chat?

**URL:** https://meta.discourse.org/t/how-much-extra-disk-space-is-required-for-chat/237965
**Category:** Self-hosting
**Tags:** chat, server-resources
**Created:** [August 4, 2022, 5:50pm UTC](https://meta.discourse.org/t/how-much-extra-disk-space-is-required-for-chat/237965 "2022-08-04T17:50:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [August 4, 2022, 5:50pm UTC](https://meta.discourse.org/t/how-much-extra-disk-space-is-required-for-chat/237965/1 "2022-08-04T17:50:57Z")

</div>

Will chat messages take a significant amount of disk storage? I have roughly 15G remains and around 100 active users per day and would like to test it.

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [September 2, 2022, 6:44pm UTC](https://meta.discourse.org/t/how-much-extra-disk-space-is-required-for-chat/237965/3 "2022-09-02T18:44:28Z")

</div>

Hey @th21 apologies for the delayed response here!

I don’t think you should be too concerned about disk space. On one or the most active chat forums we host, this is the breakdown of current disk space usage for various database tables:

```plaintext
| 754 MB | posts |
| 511 MB | post_search_data |
| 471 MB | uploads |
| 410 MB | post_timings |
| 336 MB | stylesheet_cache |
| 258 MB | user_auth_token_logs |
| 251 MB | user_actions |
| 199 MB | post_hotlinked_media |
| 117 MB | notifications |
| 109 MB | chat_messages |
| 105 MB | user_histories |
| 104 MB | post_actions |
| 100 MB | topic_links |

```

This site uses the default 90-day retention period for messages in chat channels, and unlimited retention for direct messages.

In any case, I doubt it’ll be an issue for you, and you an existing option to mitigate the risk by lowering the retention period if you do find it to be an issue.

Hope that helps!

And if you do start trying it out or have already done so, we’d be happy to hear any other feedback you have here or in the `#chat-feedback` channel.

---

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [September 2, 2022, 7:04pm UTC](https://meta.discourse.org/t/how-much-extra-disk-space-is-required-for-chat/237965/4 "2022-09-02T19:04:58Z")

</div>

Ty for the detailed table, can I ask how to get one if I would like to check my forum’s space breakdown as well?

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [September 2, 2022, 7:11pm UTC](https://meta.discourse.org/t/how-much-extra-disk-space-is-required-for-chat/237965/5 "2022-09-02T19:11:52Z")

</div>

That’s not something I have direct experience doing, but here is an older answer form another topic:

> [@Why my discourse postgres\_data is too big](https://meta.discourse.org/t/why-my-discourse-postgres-data-is-too-big/91657/5):
>
> You can run the following commands to see which tables are taking up the most disk space
> 
> ```plaintext
> ./launcher enter app
> su - postgres
> psql discourse
> 
> ```
> 
> ```plaintext
> SELECT nspname || '.' || relname AS "relation",
> pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
> FROM pg_class C
> LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
> WHERE nspname NOT IN ('pg_catalog', 'information_schema')
> AND C.relkind <> 'i'
> AND nspname !~ '^pg_toast'
> ORDER BY pg_total_relation_size(C.oid) DESC
> LIMIT 20;
> 
> ```

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 2, 2022, 7:12pm UTC](https://meta.discourse.org/t/how-much-extra-disk-space-is-required-for-chat/237965/6 "2022-10-02T19:12:46Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
