Skip to content

Hardlink optimize#6

Open
ChengyuZhu6 wants to merge 1 commit intomainfrom
hardlink-optimize
Open

Hardlink optimize#6
ChengyuZhu6 wants to merge 1 commit intomainfrom
hardlink-optimize

Conversation

@ChengyuZhu6
Copy link
Owner

No description provided.

@ChengyuZhu6 ChengyuZhu6 force-pushed the hardlink-optimize branch 21 times, most recently from eff8332 to 0926600 Compare March 31, 2025 10:51
This commit adds a hardlink system for the Stargz Snapshotter cache to optimize
storage and improve performance. The system intelligently creates hardlinks between
identical content chunks, significantly reducing disk space usage in environments
with many containers using the same base layers.

Key changes:
- Add new HardlinkManager that tracks files by chunk digest
- Enable hardlinking between chunk files with same content
- Add configuration option `EnableHardlink` to control the feature
- Preserve file digest mapping across snapshotter restarts
- Add documentation on hardlink usage and configuration

The implementation includes:
- Chunk-level digest tracking for optimizing cache lookups
- Background persistence of hardlink mappings to survive restarts
- Automatic cleanup of unused digest mappings
- Test suite for hardlink functionality

Signed-off-by: ChengyuZhu6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant