Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-34198 Add RocksDB StateStore implementation
  3. SPARK-36236

RocksDB state store: Add additional metrics for better observability into state store operations

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.2
    • 3.2.0
    • Structured Streaming
    • None

    Description

      Proposing adding following new metrics to customMetrics under the stateOperators in StreamingQueryProgress event These metrics help have better visibility into the RocksDB based state store in streaming jobs.

      • rocksdbGetCount number of get calls to the DB (doesn’t include Gets from WriteBatch - in memory batch used for staging writes)
      • rocksdbPutCount number of put calls to the DB (doesn’t include Puts to WriteBatch - in memory batch used for staging writes)
      • rocksdbTotalBytesReadByGet/rocksdbTotalBytesWrittenByPut: Number of uncompressed bytes read/written by get/put operations
      • rocksdbReadBlockCacheHitCount/rocksdbReadBlockCacheMissCount indicates how much of the block cache in RocksDB is useful or not and avoiding local disk reads
      • rocksdbTotalBytesReadByCompaction/rocksdbTotalBytesWrittenByCompaction: How many bytes the compaction process read from disk and written to disk.
      • rocksdbTotalCompactionTime: Time (in ns) took for compactions (both background and the optional compaction initiated during the commit)
      • rocksdbWriterStallDuration Time (in ns) the writer has stalled due to a background compaction or flushing of the immutable memtables to disk.
      • rocksdbTotalBytesReadThroughIterator Some of the stateful operations (such as timeout processing in FlatMapGroupsWithState and watermarking) requires reading entire data in DB through iterator. This metric tells the total size of uncompressed data read using the iterator.

      Attachments

        Activity

          People

            vkorukanti Venki Korukanti
            vkorukanti Venki Korukanti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: