-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Daily Off‐peak Time Option
This feature is relevant only when periodic_compaction_seconds
is set. If there are files older than periodic_compaction_seconds
, RocksDB includes these files in the compaction process to ensure the SST files are updated and not older than periodic_compaction_seconds
. Periodic compactions, also known as TTL-based compactions, can occur anytime. They are often considered "low-priority" as they are not immediately essential for RocksDB to function correctly.
Since version 8.9, the off-peak period context allows users to restrict the hours during the day for processing low-priority compactions, preventing them from competing for resources during peak hours.
To enable this feature, set daily_offpeak_time_utc
in the HH:mm-HH:mm (00:00-23:59) format. This represents the start and end times (inclusive) of the day in UTC. As part of mutable_db_options
, it can be set via the SetDBOptions()
API, and a DB restart is not required.
The default value is an empty string, "", indicating no off-peak period.
Please note that when the option changes via the SetDBOptions()
API, the DB checks if a compaction needs to be triggered (similar to when max_background_flushes
, max_background_compactions
options change in flight).
When this feature is enabled, RocksDB pre-processes the periodic compactions during the off-peak period just before the start of the next peak cycle. For instance, if periodic_compaction_seconds
is set for 25 days, the files may be compacted during the off-peak hours of the 24th day.
Contents
- RocksDB Wiki
- Overview
- RocksDB FAQ
- Terminology
- Requirements
- Contributors' Guide
- Release Methodology
- RocksDB Users and Use Cases
- RocksDB Public Communication and Information Channels
-
Basic Operations
- Iterator
- Prefix seek
- SeekForPrev
- Tailing Iterator
- Compaction Filter
- Multi Column Family Iterator (Experimental)
- Read-Modify-Write (Merge) Operator
- Column Families
- Creating and Ingesting SST files
- Single Delete
- Low Priority Write
- Time to Live (TTL) Support
- Transactions
- Snapshot
- DeleteRange
- Atomic flush
- Read-only and Secondary instances
- Approximate Size
- User-defined Timestamp
- Wide Columns
- BlobDB
- Online Verification
- Options
- MemTable
- Journal
- Cache
- Write Buffer Manager
- Compaction
- SST File Formats
- IO
- Compression
- Full File Checksum and Checksum Handoff
- Background Error Handling
- Huge Page TLB Support
- Tiered Storage (Experimental)
- Logging and Monitoring
- Known Issues
- Troubleshooting Guide
- Tests
- Tools / Utilities
-
Implementation Details
- Delete Stale Files
- Partitioned Index/Filters
- WritePrepared-Transactions
- WriteUnprepared-Transactions
- How we keep track of live SST files
- How we index SST
- Merge Operator Implementation
- RocksDB Repairer
- Write Batch With Index
- Two Phase Commit
- Iterator's Implementation
- Simulation Cache
- [To Be Deprecated] Persistent Read Cache
- DeleteRange Implementation
- unordered_write
- Extending RocksDB
- RocksJava
- Lua
- Performance
- Projects Being Developed
- Misc