# Understanding Garbage Collection

**URL:** <https://discuss.dgraph.io/t/understanding-garbage-collection/15686>\
**Category:** Badger\
**Tags:** kind:question\
**Created:** [September 29, 2021, 4:50pm UTC](https://discuss.dgraph.io/t/understanding-garbage-collection/15686 "2021-09-29T16:50:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jkuki](https://avatars.discourse-cdn.com/v4/letter/j/97f17d/32.png) [@jkuki](https://discuss.dgraph.io/u/jkuki)\
**Post date:** [September 29, 2021, 5:38pm UTC](https://discuss.dgraph.io/t/understanding-garbage-collection/15686/2 "2021-09-29T17:38:29Z")

</div>

Realize my question was a bit misguided.

It looks like the compactors are running in the background, however, compaction only runs if the LSM tree needs compaction. Our application sees many duplicate writes to keys growing the value log, however, the LSM tree looks to be staying within the non-compact size. Is there a way to get discard stats updated even if the LSM tree does not need to be compacted?

---

_[View the full topic](https://discuss.dgraph.io/t/understanding-garbage-collection/15686)._
