3 ms·
No - heap fragmentation actually leaves memory unusable by the workload. It may or may not slow down allocation depending on the design of the allocator. (The
by dgacmu 4y ago
No - heap fragmentation actually leaves memory unusable by the workload. It may or may not slow down allocation depending on the design of the allocator.
(The analogy to file system fragmentation for memory is that when physical pages are allocated in a discontinuous manner, it prevents some optimizations like coalescing them into hugepages, which for some workloads can help with TLB hit rate.)
- yakubin 4y agoFilesystem may also run out of inodes, even though there is still plenty of space.
- wongarsu 4y agoI don't think either FAT32 or NTFS suffer this problem, they allow metadata to become fragmented instead. Certainly a different design philosophy to the unixy file systems.
- magicalhippo 4y agoNTFS most definitely suffers from this[1]. We ran into it with a customer who had a particularly fragmented database file. IIRC it's due to a combination of relying on fixed-sized "pages" to hold fragment pointers and a limited number of page indirections. That is the root page can point to a sub-pages, which again can point to sub-pages, but those sub-sub-pages have to point to the actual fragments. Or something along those lines. [1]: https://support.microsoft.com/en-au/topic/a-heavily-fragmented-file-in-an-ntfs-volume-may-not-grow-beyond-a-certain-size-da1c0dfd-a5a1-90b4-4bf7-b65b13ef9d35 https://support.microsoft.com/en-au/topic/a-heavily-fragment...
- cryptonector 4y agoOr you should use ZFS and not worry about that.