Compute Array Data Reduction Ratio From Chunk Fingerprints
Last updated: November 29, 2026
Quick Overview
Given each volume's list of chunk fingerprints and a fixed chunk size, compute the array-wide deduplication ratio (logical bytes over unique physical bytes) and, for each volume, how many physical bytes would be reclaimed if that volume were deleted.
Pure Storage
November 29, 20260
0
0 solved
Given each volume's list of chunk fingerprints and a fixed chunk size, compute the array-wide deduplication ratio (logical bytes over unique physical bytes) and, for each volume, how many physical bytes would be reclaimed if that volume were deleted.
Purity reports a data reduction ratio on every FlashArray, and customers constantly ask why deleting a big volume freed almost nothing. This warm-up checks that you can reason about reference counts and shared chunks with clean hash map code before the harder data path rounds.
What the Interviewer Expects
- Separates logical bytes (every reference) from physical bytes (unique fingerprints)
- Explains that only chunks referenced by a single volume are reclaimable on delete
- Uses a hash map from fingerprint to owner set or refcount, linear time overall
- Handles empty volumes and an empty array without dividing by zero
- Notices that a chunk repeated inside one volume is still reclaimable by that volume
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would the answer change if snapshots share chunks with their parent volume?
- Fingerprints for a 1 PB array do not fit in memory. How would you compute the same report?
- How would you add compression, where each unique chunk has its own compressed size?
- Why might the reported ratio differ from what the customer sees on the host?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: volumes maps volume name to an ordered list of chunk fingerprints, and every chunk has the same chunk_size. Output: the array data reduction ratio (logical / physical, rounded to two places...
High-Level Design
One pass builds two maps: refcount[fp] and owners[fp] (the set of volumes referencing it). Physical bytes are len(refcount) * chunk_size. A chunk is reclaimable by volume V exactly when V is its...