# Faster disk space calculation for upload heavy instances

**URL:** <https://meta.discourse.org/t/faster-disk-space-calculation-for-upload-heavy-instances/318997>\
**Category:** Feature\
**Tags:** performance, uploads, completed\
**Created:** [July 29, 2024, 11:17am UTC](https://meta.discourse.org/t/faster-disk-space-calculation-for-upload-heavy-instances/318997 "2024-07-29T11:17:03Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)\
**Post date:** [July 29, 2024, 11:17am UTC](https://meta.discourse.org/t/faster-disk-space-calculation-for-upload-heavy-instances/318997/1 "2024-07-29T11:17:03Z")

</div>

The ‘du’ command, which is used to retrieve disk space used by uploads, was causing performance issues for my admin dashboard. Yes, we have a LOT of image uploads. Rather than disabling it altogether (we have grafana/prometheus dashboard after all), I decided to replace it with a much faster _very rough_ approximation using ‘df’. This change is of course selectable by the admin with the default being ‘du’.

I have submitted a PR for this change. It is my first PR, so please go easy on me :))

You can view the PR here:

[https://github.com/discourse/discourse/pull/28113](https://github.com/discourse/discourse/pull/28113)

---

_[View the full topic](https://meta.discourse.org/t/faster-disk-space-calculation-for-upload-heavy-instances/318997)._
