![]() The most significant difference here is performance with an encrypted disk image, which in previous testing could fall below 0.1 GB/s even on the faster internal SSD of a Mac Studio. Those are essentially the same for APFS on both unencrypted and encrypted (128-bit) disk images, and for HFS+J as the file system in the image. When measured on a Thunderbolt 3 external SSD normally delivering around 3 GB/s read and write speeds to a regular APFS volume, read speeds for these sparse UDRW disk images are close to native at 2.8 GB/s, and write speeds are about a third of native at 1.0 GB/s. Interestingly, when I last looked at that, there were anomalies depending on whether the image had been mounted before, which probably correlate with their conversion from flat to sparse file. One longstanding problem with most disk image formats is their poor performance when writing to them. ![]() While unmounting and mounting the disk image in the Finder brings about its conversion to an APFS sparse file, the hdiutil attach command doesn’t appear to have the same effect, and leaves the disk image as a flat file. There is disappointment, though, for those who prefer using the command line. You can opt for the disk image to be encrypted, and for its internal file system to be APFS or HFS+J, but not ExFAT, which doesn’t result in conversion to an APFS sparse file. This also works for some other variants of UDRW format. Delete those and the space taken on disk will drop back to 334 MB without your having to compact it or do anything else by way of housekeeping. Here it is with over 53 GB of files from a disk performance test. When you write files to that disk image, it will grow in size to accommodate them, and when they’re deleted it will shrink again. It has become an APFS sparse file, as you can verify using either of my free utilities Precize or Sparsity. Now unmount it again and Get Info.Īlthough the Size given for that disk image remains at 100 GB, it now takes much less space on disk, here a mere 334 MB. Once it has mounted, verify that it appears empty (apart from its hidden. Now double-click the disk image to mount it again. Once complete, unmount that disk image, select it in the Finder and Get Info.Īs expected, your disk image is a regular flat file, in this case of 100 GB and takes up 100 GB on disk. Open Disk Utility, and with its File/New Image/Blank Image… menu command create yourself an empty read/write disk image in APFS format of substantial size, anything between 5-100 GB.ĭisk Utility takes a few moments to create that, then automatically mounts it. What if I were to tell you that a UDRW disk image is really sparse storage that works more efficiently than regular sparse disk images (UDSP format) or sparse bundles (UDSB format)? All you need to know is how to unlock that potential. This can be desirable, for example if you want to reserve a certain amount of space for the disk image’s use.” This is less efficient than a sparse disk image because the file size is determined by the capacity of the disk image rather than by the amount of data currently stored on it. ![]() The disk image is stored as a single file. ![]() This is summarised well in C-Command’s documentation for DropDMG: “.dmg - constant file size. For example, if a USB device or volume is 80GB with 10GB of data, the disk image will be 80GB in size and include data and free space.” For instance, Apple states: “You can create a disk image that includes the data and free space on a physical disk or connected device, such as a USB device. Conventional wisdom, aided by the lengthy documentation for hdiutil and Apple’s help page for Disk Utility, is that regular read/write disk images (UDRW format) are of fixed size, and neither grow nor shrink. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |