---
title: "IO Activity Tagging"
description: "RocksDB automatically tags every IO operation with an `IOActivity` enum value (flush, compaction, DB open, Get, MultiGet, iterator, checksum verification, entity reads and others) and propagates it through `IOOptions` to the file system."
url: "https://swe.quest/articles/io-activity-tagging-2c1c0aefff706db2"
canonical: "https://rocksdb.org/blog/2025/09/25/io-tagging.html"
source: "RocksDB Blog"
published: "2025-09-25"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 2
tags: ["storage-engines","observability","performance","c-cpp"]
---

# IO Activity Tagging

A post on [RocksDB Blog](https://swe.quest/sources/rocksdb.md), published 2025-09-25, 2 min read, Deep dive. Original: [https://rocksdb.org/blog/2025/09/25/io-tagging.html](https://rocksdb.org/blog/2025/09/25/io-tagging.html)

## Summary

RocksDB automatically tags every IO operation with an \`IOActivity\` enum value (flush, compaction, DB open, Get, MultiGet, iterator, checksum verification, entity reads and others) and propagates it through \`IOOptions\` to the file system. Custom FileSystem implementations can switch on this tag to prioritize latency-sensitive user reads, throttle background compaction, or track DB-open IO. RocksDB also exposes per-activity read and write latency histograms such as FILE\_READ\_GET\_MICROS and FILE\_WRITE\_COMPACTION\_MICROS for diagnosing bottlenecks. Values 0x80–0xFE are reserved for custom use.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Storage engines](https://swe.quest/tags/storage-engines.md) (Data & databases)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [C & C++](https://swe.quest/tags/c-cpp.md) (Languages)

## Prerequisites

- RocksDB FileSystem API ([easy posts on Storage systems](https://swe.quest/tags/storage-systems.md?difficulty=easy))
- LSM compaction and flush ([easy posts on Storage engines](https://swe.quest/tags/storage-engines.md?difficulty=easy))
- C++ basics ([easy posts on C & C++](https://swe.quest/tags/c-cpp.md?difficulty=easy))

## Keywords

RocksDB, IOActivity, IOOptions, FileSystem

## Related posts

- [Timeseries indexing at scale](https://swe.quest/articles/timeseries-indexing-at-scale-cbd6b9bd5fe12d35.md): Datadog Engineering · 2024-06-28 · Medium · 20 min read · Storage engines, Search, Databases, Observability, Scaling
  Datadog replaced its timeseries index, which auto-generated materialized indexes from a log of slow queries, with an inverted index that unconditionally indexes every metric;tag pair, much like search engines map words to documents.
- [Evolving our real-time timeseries storage again: Built in Rust for performance at scale](https://swe.quest/articles/evolving-our-real-time-timeseries-storage-again-built-in-rust-for-performance-cbd41a18b9630cd7.md): Datadog Engineering · 2025-08-04 · Hard · 21 min read · Storage engines, Rust, Performance engineering, Databases, Concurrency
  Datadog's sixth-generation real-time timeseries database (RTDB) is a Rust rewrite that unifies two earlier engines, one for scalar metrics and one for DDSketch distributions, after earlier generations built on Cassandra, Redis, MDBM, a Go B+ tree and RocksDB.
- [Husky: Efficient compaction at Datadog scale](https://swe.quest/articles/husky-efficient-compaction-at-datadog-scale-eba7e7c7e1831aee.md): Datadog Engineering · 2025-01-29 · Hard · 18 min read · Storage engines, Analytics & OLAP, Observability, Performance engineering, Distributed databases
  Husky, Datadog's observability event store layered over object storage, keeps query cost low by controlling fragment count and layout through streaming compaction.
- [Native Async/Coroutine Reads in RocksDB](https://swe.quest/articles/native-async-coroutine-reads-in-rocksdb-a16f6ef8c30162a7.md): RocksDB Blog · 2026-08-24 · Hard · 10 min read · Storage engines, Concurrency, C & C++, Performance engineering, Databases
  RocksDB 11.10.0 adds experimental native asynchronous Get/MultiGet APIs (callback-based GetAsync/MultiGetAsync and Folly-task-based CoroDB::CoGet/CoMultiGet) that suspend a read at the SST block-miss filesystem boundary and resume it on the same io\_uring-backed EventBase thread, so a small read executor can sustain high storage queue depth without one parked thread per read.
- [Performance improvements in the Datadog Agent metrics pipeline](https://swe.quest/articles/performance-improvements-in-the-datadog-agent-metrics-pipeline-2d01cccf9e289314.md): Datadog Engineering · 2023-01-31 · Medium · 11 min read · Performance engineering, Go, Observability, Algorithms
  Profiling the Go-based Datadog Agent under heavy DogStatsD load showed that computing a unique context key per metric, especially sorting and deduplicating tags, dominated CPU.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
