B-tree Leaf Node Free Space Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

B-trees with variable size values in file systems face increased complexity and performance issues due to the need for frequent memory repacking during updates, and the use of bitmaps for free space management introduces additional complexity and CPU costs.

Innovation Solution

The B-tree leaf nodes are designed without bitmaps, using a directory section with fixed-size slots to index key-value pairs and free spaces, allowing for efficient management of free space without repacking values on every update, by using cursors to monitor region sizes and shifting slots as needed for insertions and deletions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If variable size values are used in B-tree leaf nodes, then free space management becomes simpler without bitmaps, but memory repacking is required on every update which increases CPU cost

Engineering Contradiction:
Improvefree space management complexityVSAvoidB-tree update performance
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The leaf node is segmented into a directory section with fixed-size slots and a data section with variable-size values. Each slot in the directory section acts as an independent index entry that can be individually updated without affecting other slots, eliminating the need for complete memory repacking during updates.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Fixed-size slots are pre-allocated in the directory section to index variable-size values. This preliminary structuring allows for efficient free space management and enables direct insertion and deletion operations without requiring repacking of the entire leaf node memory.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If bitmaps are used to manage free space, then memory movement is minimized, but additional space is required and complexity and CPU time increase

Engineering Contradiction:
Improvememory movement efficiencyVSAvoidfree space management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The bitmap mechanism is extracted and replaced with fixed-size slots in the directory section. Each slot directly indexes a variable-size value or free space region, eliminating the need for separate bitmap data structures and their associated complexity while maintaining efficient free space tracking.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Fixed-size slots serve as intermediaries between the fixed-size index structure and variable-size values. Each slot contains a pointer to either a variable-size value or a free space region, mediating the relationship between structured indexing and flexible data storage without requiring bitmaps.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Device complexity

If all values are repacked before writing to disk, then free space management is simplified, but excessive memory movement occurs which reduces update performance

Engineering Contradiction:
Improvefree space management simplicityVSAvoidCPU time for memory movement
Core Design Contradiction:
Device complexityVSLoss of time

Solution Approach 1:

The directory section uses dynamic slot pointers that can be individually updated without repacking. When values are inserted or deleted, only the affected slots and their pointers are updated in memory, while the rest of the leaf node structure remains static and can be written to disk without complete repacking.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

Each fixed-size slot in the directory section independently manages its own pointer to a variable-size value or free space region. This self-contained structure allows individual slots to be updated without requiring coordination or repacking of the entire leaf node, enabling efficient in-place updates.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10698865B2Management of B-tree leaf nodes with variable size values
Publication Date: 2020.06.30 VMWARE INC
  • US10698865B2 patent drawing
  • US10698865B2 patent drawing
  • US10698865B2 patent drawing

AI summary

System and method for managing leaf nodes of a B-tree for a file system of a computer system utilize used slots in a directory section of a leaf node to index variable size key-value pair entries stored in a data section of the leaf node and free spaces slots in the directory section to index contiguous free spaces in the data section. Contents of the free space slots in the directory section are updated in response to changes in the contiguous free spaces in the data section to manage free space in the data section of the leaf node.