# What is tombstone\_compaction\_interval mean?

**URL:** <https://forum.scylladb.com/t/what-is-tombstone-compaction-interval-mean/2028>\
**Category:** ScyllaDB\
**Tags:** data-model, compaction, tombstone\
**Created:** [May 16, 2024, 2:15am UTC](https://forum.scylladb.com/t/what-is-tombstone-compaction-interval-mean/2028 "2024-05-16T02:15:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chih-hao\_wang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/chih-hao_wang/32/921_2.png) [@chih-hao\_wang](https://forum.scylladb.com/u/chih-hao_wang)\
**Post date:** [May 16, 2024, 2:15am UTC](https://forum.scylladb.com/t/what-is-tombstone-compaction-interval-mean/2028/1 "2024-05-16T02:15:19Z")

</div>

I read the doc  
troubleshooting/pointless-compactions

here is my table schema

```auto
ALTER TABLE foo.bar WITH compaction = {'class' : 'LeveledCompactionStrategy','tombstone_threshold' : 0.1,'sstable_size_in_mb' : 160, 'tombstone_compaction_interval': 60} 
AND gc_grace_seconds = 60 ;

```

I expected scylla will check sstable’s `Estimated droppable tombstones`  
every 60s  
if `Estimated droppable tombstones` \> 0.1  
then will exec minor compact for this table

but in my test  
after I delete data  
scylla don’t exec minor compact

or should I write same primary key, when scylla flush to sstable then will trigger minor compact ?

---

<div class="post-metadata">

**Author:** ![Botond\_Denes](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/botond_denes/32/163_2.png) [@Botond\_Denes](https://forum.scylladb.com/u/Botond_Denes)\
**Post date:** [May 30, 2024, 11:22am UTC](https://forum.scylladb.com/t/what-is-tombstone-compaction-interval-mean/2028/2 "2024-05-30T11:22:53Z")

</div>

`tombstone_compaction_interval` is a lower-bound on the earliest time a new tombstone compaction can be started. Meaning that if an sstable was compacted at time `X`, the earliest time it will be considered for tombstone compaction again is `X + tombstone_compaction_interval`. This is not a guarantee that sstables will be considered for compaction immediately after `tombstone_compaction_interval` time has elapsed.

I think in your test, you might have too little data or too little tombstones. It is hard to say why tombstone compaction is not triggering, without more details.

---

<div class="post-metadata">

**Author:** ![bybywph](https://avatars.discourse-cdn.com/v4/letter/b/8797f3/32.png) [@bybywph](https://forum.scylladb.com/u/bybywph)\
**Post date:** [August 19, 2024, 6:42am UTC](https://forum.scylladb.com/t/what-is-tombstone-compaction-interval-mean/2028/3 "2024-08-19T06:42:22Z")

</div>

@denesb I want to understand the trigger mechanism for compaction. I tested it by setting `tombstone_compaction_interval` to 120, which is 2 minutes, but I’ve observed that sometimes the compaction doesn’t happen at fixed intervals. What is the logic in the source code for this? How often does it scan?
