cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

State store configuration with applyInPandasWithState for optimal performance

PushkarDeole
New Contributor III

Hello,

We are using a stateful pipeline for data processing and analytics. For state store, we are using applyInPandasWithState function however the state needs to be persistent across node restarts etc. 

At this point, we are not sure how the state can be made persistent with applyInPandasWithState. There are some articles where it is mentioned around usage of RocksDB state store for persistence

Couple of questions:

1. What configurations is required to enable RocksDB state storage with applyInPandasWithState ?

2. What are the tuning parameters for RocksDB state store that can be tuned to provide optimal performance?

Any guidance around these would be appreciated. 

 

1 REPLY 1

@Retired_mod  thanks for the response. As I understand, there are 3 options to be explored to get optimal performance out of rocksdb based state management: 

1. specify a local directory 'rocksdb.localdir' 

--> will you be able to guide how (through which configuration) this can be specified? 

2. implement asynchronous checkpoints

--> I looked more into the details of asynchronous checkpoints through this article https://learn.microsoft.com/en-us/azure/databricks/structured-streaming/async-checkpointing

As mentioned in the limitations, cluster resizing might not work well with asynchronous checkpointing. Since we are using auto scaling feature for our databricks cluster, does that mean that we won't be able to use asynchronous checkpointing as it will frequently resize the cluster?

3. Databricks' state rebalancing

--> will explore this more

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group