4.1 Index Structure: Directories, Buckets & Bucket Files
Key Takeaways
- A Splunk index is a set of bucket directories under $SPLUNK_DB/<index>: hot and warm buckets in db (homePath), cold buckets in colddb (coldPath), and restored buckets in thaweddb (thawedPath).
- Warm, cold, and thawed buckets are named db_<newest_time>_<oldest_time>_<localid>; hot buckets are named hot_v1_<localid>, and replicated cluster copies use the rb_ prefix.
- Each bucket holds a compressed rawdata journal (zstd by default) plus tsidx index files, a bloom filter, and Hosts/Sources/SourceTypes.data metadata files.
- Splunk's sizing rule of thumb: rawdata is about 15% of raw volume and index files about 35%, so a searchable bucket copy is roughly half the raw size.
- Only rawdata is needed to recreate a bucket; splunk rebuild regenerates the tsidx and metadata files from the journal.
Index Structure: Directories, Buckets, and Files
In Splunk Enterprise, an index is not a monolithic relational database table or flat log repository. Instead, an index is a logical collection of discrete filesystem directories called buckets. Each bucket encapsulates a self-contained slice of time, containing both the compressed raw event text and the inverted search indexes that allow Splunk to query billions of events in seconds.
Understanding bucket architecture and lifecycle progression is essential for designing resilient storage tiers, managing disk capacity, meeting compliance retention mandates, and maintaining peak search performance.
Anatomy of an Index: Bucket Tiers & Storage Paths
When splunkd indexes incoming event streams, it organizes buckets into five sequential lifecycle tiers based on the age and write state of the data:
- Hot Tier: Actively being written to by the indexing pipeline. Read/write.
- Warm Tier: Rolled from hot; no longer receives new data. Read-only.
- Cold Tier: Moved from warm to lower-cost, high-capacity storage. Read-only.
- Frozen Tier: Aged out from cold storage; removed from search indexes. Either archived or permanently deleted.
- Thawed Tier: Reconstructed from archived frozen data back into an active, searchable state.
$SPLUNK_DB/<index_name>/
├── db/ <-- Specified by homePath (Hot & Warm Buckets)
│ ├── hot_v1_0/ <-- Active Hot bucket (read/write)
│ ├── hot_v1_1/ <-- Active Hot bucket (read/write)
│ ├── db_1695427200_1695340800_1/ <-- Warm bucket (read-only)
│ └── db_1695340799_1695254400_0/ <-- Warm bucket (read-only)
├── colddb/ <-- Specified by coldPath (Cold Buckets)
│ ├── db_1695254399_1695168000_2/ <-- Cold bucket (read-only)
│ └── db_1695167999_1695081600_3/ <-- Cold bucket (read-only)
└── thaweddb/ <-- Specified by thawedPath (Restored Buckets)
└── db_1694000000_1693000000_99/ <-- Thawed bucket (read-only, manual cleanup)
Bucket Tier Characteristics
| Lifecycle Tier | Filesystem Path Setting | State | Read / Write | Searchable | Typical Storage Media |
|---|---|---|---|---|---|
| Hot | homePath | Active | Read / Write | Yes | Fast NVMe / PCIe SSD |
| Warm | homePath | Static | Read-Only | Yes | Fast NVMe / Enterprise SSD |
| Cold | coldPath | Static | Read-Only | Yes | High-Density HDD / Shared NAS |
| Frozen | coldToFrozenDir / Script | Archived | None | No | Tape / Object Storage (S3 / Blob) |
| Thawed | thawedPath | Restored | Read-Only | Yes | Standard Disk / Temporary Scratch |
[!IMPORTANT] Both hot and warm buckets reside in the exact same directory specified by the
homePathparameter (by default,$SPLUNK_DB/<index_name>/db). Cold buckets reside in a separate directory path defined bycoldPath(by default,$SPLUNK_DB/<index_name>/colddb), allowing administrators to place older, less frequently accessed data on less expensive, high-capacity storage tiers.
Deep Dive into Bucket Files
A bucket directory is a self-contained database unit. A warm or cold bucket on a standalone indexer contains files like these (exact names vary by version, and Splunk warns that bucket internals can change):
db_1695427200_1695340800_1/
├── rawdata/
│ ├── journal.zst <-- Compressed raw events (zstd by default; gzip/lz4 are alternatives)
│ └── l1Hashes / l2Hash <-- Present only when data integrity control is enabled
├── *.tsidx <-- Time-series index files (lexicon + postings)
├── bloomfilter <-- Lets searches skip buckets that cannot contain a term
├── Hosts.data <-- Hosts seen in the bucket, with counts and time ranges
├── Sources.data <-- Sources seen in the bucket
├── SourceTypes.data <-- Source types seen in the bucket
└── bucket_info.csv <-- Bucket-level metadata
1. Rawdata Journal (rawdata/journal.zst)
The rawdata directory holds the compressed journal of every event indexed into the bucket, together with each event's index-time metadata (_time, host, source, sourcetype).
journalCompressioninindexes.confdefaults tozstd. It affects only new buckets, and Splunk can search buckets compressed with different algorithms side by side.- The journal is the "source of truth". Everything else in the bucket can be regenerated from it with
splunk rebuild, which is why archiving keeps onlyrawdata/.
2. Time-Series Index Files (.tsidx)
The .tsidx files are Splunk's inverted index. They contain the lexicon (every indexed term) and postings that point from each term to the events that contain it. A search first uses the tsidx files to find candidate events, so it avoids decompressing the whole journal.
- A hot bucket that is actively receiving data creates many small tsidx files.
- The
splunk-optimizeprocess merges those small files into fewer, larger ones as the bucket grows and when it rolls.
3. Metadata Files (*.data)
Hosts.data, Sources.data, and SourceTypes.data record which hosts, sources, and source types appear in the bucket, with counts and first/last times. The metadata search command reads them, which is why | metadata type=hosts index=web answers quickly without scanning events.
4. Bloom Filters and Other Files
bloomfilter: A compact structure that lets a search rule a bucket out quickly. If the bloom filter says a term is not present, the bucket is skipped.bucket_info.csv: Bucket-level metadata used by the indexer.- Integrity hash files: When
enableDataIntegrityControl = true, Splunk writesl1Hashesandl2Hashfiles in the bucket'srawdatadirectory (see the data integrity section).
How Much Disk Does a Bucket Use?
Splunk's long-standing sizing rule of thumb is that compressed rawdata is about 15% of the original raw volume and index files are about 35%, so a searchable bucket copy is roughly 50% of the raw data it holds. The index files are the larger share, which is why archiving only rawdata/ saves so much space.
What is the standard naming syntax that Splunk Enterprise assigns to a bucket when it rolls from hot to warm in a standalone indexer?
Which files in a bucket let Splunk quickly decide that a bucket cannot contain a search term, so it can skip that bucket entirely?
An administrator wants the hot and warm buckets of the web index on fast SSD and older buckets on cheaper disk. Which indexes.conf settings control the two locations?