Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've got a bunch of Mac disk images (.dmg files) that are 100 GB or larger. I'm currently on an iMac with a few hundred gigabytes of free space, but I'm going to be moving to a Mac laptop with 128 GB storage.

So, I'm wondering, would that be a problem when I have less than 100 GB of free space on my computer, but I'm opening a disk image larger than 100 GB? My guess would be no, but is ANY space on the internal drive used at all when mounting an image?

How exactly does mounting an image work, does it just change the way the operating system sees the files as one file (the disk image) rather than the actual files within the disk image, until it is mounted? Therefore, no internal space is necessary for the mount operation?

Follow-up question: Is it any slower to read from a DMG on an external drive than it is to read from any other files on the same external drive? Basically, is there any performance hit from having files in a DMG?

share|improve this question

1 Answer 1

There certainly isn't the same amount necessary as the DMG, so you sure can mount a 100GB DMG into a file system that has less (there will be trivial consumptions, maybe a few kb, but nothting that you'll notice).

The whole thing works in the way, that the system attaches a file-system driver to the file with the DMG. The driver will present the DMG file to the system like an "external" drive and perform file requests on behalf of the system on the contents of the file.

Essentially the driver will says to MacOS: We have a new volume here. So MacOS will then ask the driver. "Give me a list of content in it", and then the driver examines the inside of the file and presents the list of files organized inside the DMG. Etc.

share|improve this answer
    
Okay thanks. And a follow-up question: Is it any slower to read from a DMG on an external drive than it is to read from any other files on the same external drive? Basically, is there any performance hit from having files in a DMG? –  Gary Jun 8 '13 at 14:55
    
There will certainly be a performance penalty for that, but I have no idea (or good data) on how much. It will maybe even vary case to case (e.g. DMG with few large files vs. DMG with many small files), but I would not be surprised if you just got half the speed out of it. –  Nicholaz Jun 8 '13 at 16:37
    
Okay thanks. I rarely use DMG as a consistent file storage method, anyway. It's only for archiving stuff and then accessing it maybe once every six months, so it shouldn't be a problem for me. For the filesystem, it seems easier to move DMG files than 10,000 individual files. –  Gary Jun 8 '13 at 16:39
    
I agree. For that use case a DMG is a good solution IMO (and will probably even take less space than storing the files individually). –  Nicholaz Jun 8 '13 at 16:50
    
The interface you use to connect your external drive will make a huge performance difference. Try to use USB 3.0, Firewire or Thunderbolt instead of USB 2.0 if you can. –  erikcw Mar 28 at 16:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.