In this article
Compare logical size, allocated usage and supported hole reporting independently; sparse layout does not establish artifact integrity or unique media use.
A model cache reports a large file size while its allocated storage is much smaller. Sparse layout can explain this difference, but a sparse file is not automatically an incomplete or compressed model. Distinguish logical length, allocated blocks and the filesystem’s reported hole map before estimating capacity or deciding that an artifact transfer finished correctly.
Preserve logical length
The file size describes the logical byte range visible to readers. Holes within that range read as zeros under normal sparse-file semantics. A format can contain legitimate zero-filled regions, but file length alone does not establish that the intended bytes were downloaded. Keep the accepted artifact identity and integrity check separate from every storage-layout observation used to explain the size difference.
Compare allocated accounting
File status exposes allocated-block information, while du distinguishes apparent size from estimated storage usage. Retain units and tool options rather than comparing unlabeled numbers. The preferred I/O block size is another field and must not be substituted as the allocation count. Record the relevant filesystem and file identity, since observations collected while a downloader is still writing need not describe one stable layout.
Interpret hole discovery cautiously
SEEK_DATA and SEEK_HOLE allow supported filesystems to expose data and hole boundaries. The documented interface permits implementations that do not reveal every physical hole precisely. A reported data region can also contain zero bytes. Consequently, the map is useful for supported traversal behavior, not a universal physical-allocation microscope or a replacement for hashing the logical artifact contents.
Keep sharing and copies distinct
Allocated accounting for individual files need not equal unique physical media occupied by the whole cache, especially when storage supports shared extents or other accounting behavior. A copy can also change sparse representation while preserving logical contents. Do not promise a destination-space requirement or SSD write volume from apparent source size alone; evaluate the actual copying method and destination filesystem.
Validate both questions
For an isolated representative artifact, retain logical checksum, file length, allocated usage and observed hole behavior before and after the intended copy. Confirm content correctness independently from capacity planning. A useful report explains the difference between logical and allocated size. It does not establish compression ratio, unique device occupancy or NAND endurance from one file’s sparse representation.
Primary references
Linux File Status and Allocated Blocks.
Linux SEEK_DATA and SEEK_HOLE.
GNU du Apparent and Allocated Size.
Related reading: Model caches and SSD endurance: downloads, host writes and NAND; Validate safetensors weight artifacts separately from repository code.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.