Dedupe File System Garbage Collection State Machine

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In dedupe file systems, reference counting mechanisms for garbage collection increase file creation time and backup window due to serialization overhead, necessitating alternative approaches to minimize these impacts.

Innovation Solution

A state machine is implemented to coordinate concurrent data ingestion and deletion in the dedupe file system, with three states (dormant, data gathering, and data deletion) that synchronize the garbage collection thread with reader and writer threads, allowing for efficient garbage chunk management without interrupting backup operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If reference counting mechanism is used for garbage collection, then garbage data chunks can be detected and removed, but file creation time increases due to serialization overhead

Engineering Contradiction:
Improvegarbage collection functionalityVSAvoidfile creation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

A state machine is introduced as an intermediary to coordinate between the garbage collection thread and backup writer threads. The state machine manages three states (dormant, data gathering, data deletion) and uses signaling mechanisms (semaphores, events) to mediate access to shared data structures, eliminating the need for reference counting while preventing data corruption during concurrent operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The garbage collection process is segmented into distinct phases managed by the state machine: dormant state (no GC activity), data gathering state (identifying garbage chunks), and data deletion state (removing garbage chunks). This segmentation allows backup operations to proceed freely during dormant periods and only synchronize during active GC phases, reducing overall time loss.

Inventive Principle:
Principle #1Segmentation

2Reliability

If reference counting mechanism is used for garbage collection, then garbage data chunks can be detected and removed, but backup window increases due to locking overhead

Engineering Contradiction:
Improvegarbage collection functionalityVSAvoidbackup window
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The state machine acts as a mediator that coordinates access to the dedupe file system during garbage collection. Instead of requiring locks on individual chunks, the state machine uses global signals (semaphores, events) to notify backup threads of GC activity, allowing them to adjust their behavior without expensive locking operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The garbage collection operates periodically through the state machine cycles, transitioning between dormant, data gathering, and data deletion states. During dormant periods, backup operations proceed without any GC interference. The periodic nature allows backup windows to be maintained while GC performs its function at scheduled intervals.

Inventive Principle:
Principle #19Periodic action

3Productivity

If GC thread and backup writer threads run concurrently without coordination, then system throughput is maximized, but data corruption can occur

Engineering Contradiction:
Improvesystem throughputVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The state machine serves as a central mediator that both the GC thread and backup writer threads must consult. It maintains the authoritative state of the dedupe file system and coordinates their actions through signals and events, ensuring data consistency while allowing both threads to operate concurrently without direct conflict.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The state machine implements feedback mechanisms where GC thread transitions trigger events that notify backup writer threads, and backup thread operations can influence GC state transitions. This bidirectional feedback ensures both threads are aware of each other's activities and can adjust their behavior to maintain data consistency.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10621143B2Methods and systems of a dedupe file-system garbage collection
Publication Date: 2020.04.14 PERSISTENT SYSTEMS INC
  • US10621143B2 patent drawing
  • US10621143B2 patent drawing
  • US10621143B2 patent drawing

AI summary

In one embodiment, a computer-implemented method of implementing a dedupe file system with constant ingestion and retrieval times for objects in dedupe file system achieved by synchronizing a garbage collection (GC) thread and reader (restore), writer (backup) threads in a dedupe file system includes generating, with at least one processor, a state machine for dedupe file system that coordinates concurrent data ingestion due to writers and data deletion due to garbage collector. The state machine has three states. “Dormant” state when the GC thread is inactive and all writers freely ingest data into dedupe file system without any need for synchronization with GC. “Data gathering” state when the GC thread determines the dedupe chunks for deletion in a garbage list and writers check for data chunks in the garbage list and filters out processed data.