Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
Description
HeapKeyedStateBackend is one of the two KeyedStateBackends in Flink, since state lives as Java objects on the heap and the de/serialization only happens during state snapshot and restore, it outperforms RocksDBKeyedStateBackend when all data could reside in memory.
However, along with the advantage, HeapKeyedStateBackend also has its shortcomings, and the most painful one is the difficulty to estimate the maximum heap size (Xmx) to set, and we will suffer from GC impact once the heap memory is not enough to hold all state data. There’re several (inevitable) causes for such scenario, including (but not limited to):
- Memory overhead of Java object representation (tens of times of the serialized data size).
- Data flood caused by burst traffic.
- Data accumulation caused by source malfunction.
To resolve this problem, we propose a solution to support spilling state data to disk before heap memory is exhausted. We will monitor the heap usage and choose the coldest data to spill, and reload them when heap memory is regained after data removing or TTL expiration, automatically.
More details please refer to the design doc and mailing list discussion.
Attachments
Attachments
Issue Links
- relates to
-
FLINK-6054 Add new state backend that dynamically stores data in memory and external storage
- Closed
- links to
- mentioned in
-
Page Loading...
1.
|
Store state per key-group in CopyOnWriteStateTable | Closed | PengFei Li |
|
|||||||||
2.
|
Implement a HeapAccountingManager | Open | Unassigned | ||||||||||
3.
|
Implement a HeapStatusMonitor | Open | Unassigned | ||||||||||
4.
|
Implement a MmapManager | Open | Unassigned | ||||||||||
5.
|
Support on-disk state storage for spill-able heap backend | Resolved | Yu Li |
|
|||||||||
6.
|
Implement a SpillLoadManager | Open | Unassigned | ||||||||||
7.
|
Reduce CPU consumption when snapshot/restore the spilled key-group | Open | Unassigned | ||||||||||
8.
|
Create a module for spill-able heap backend | Resolved | Yu Li |
|
|||||||||
9.
|
Introduce a HybridStateTable to combine everything together | Open | Unassigned | ||||||||||
10.
|
Introduce SpillableHeapKeyedStateBackend and all necessities | Open | Unassigned | ||||||||||
11.
|
Implement the SpaceAllocator | Open | Unassigned |
|