You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Scott Schenkein (Jira)" <ji...@apache.org> on 2023/10/04 13:45:00 UTC

[jira] [Created] (SPARK-45415) RocksDB consumes excessive disk space when many concurrent streaming queries are using dedup

Scott Schenkein created SPARK-45415:
---------------------------------------

             Summary: RocksDB consumes excessive disk space when many concurrent streaming queries are using dedup
                 Key: SPARK-45415
                 URL: https://issues.apache.org/jira/browse/SPARK-45415
             Project: Spark
          Issue Type: Bug
          Components: Structured Streaming
    Affects Versions: 3.3.2
         Environment: Apache spark on AWS EMR, local spark on a laptop on Linux.  Does not impact MacOS due to missing support in RocksDB for pre-allocation (MacOS does not support the fallocate system call).
            Reporter: Scott Schenkein


Our spark environment features a number of parallel structured streaming jobs, many of which use state store. Most use state store for dropDuplicates and work with a tiny amount of information, but a few have a substantially large state store requiring use of RocksDB. In such a configuration, spark allocates a minimum of {{spark.sql.shuffle.partitions * queryCount}} partitions, each of which pre-allocate about 74mb (observed on EMR/Hadoop) disk storage for RocksDB. This allocation is due to pre-allocation of log files space using [fallocate|https://github.com/facebook/rocksdb/blob/main/include/rocksdb/options.h#L871-L880], requiring users to either unnaturally reduce shuffle partitions, split running spark instances, or allocate a large amount of wasted storage.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org