Why copying to encrypted disk images SO damn long?

Discussion in 'macOS' started by Loa, Dec 22, 2014.

  1. Loa macrumors 65816

    Loa

    Joined:
    May 5, 2003
    Location:
    Québec
    #1
    Hello,

    I've been experimenting with Apple Encrypted Disk Images for the first time, and I'm completely baffled as to why it takes so long to copy things into them. It's essentially impractical for things above a couple of GB. What it more surprising is that my SSD is only reading 20MB/s of activity, and that my CPU is about 10% of 800%.

    What is taking so damn long if my CPU and SSD are not bottlenecks?

    Loa
     
  2. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #2
    I do not have an answer. I only have one really large sparsebundle image, and that is on an old second-generation Drobo. The Drobo is so slow that I do not think I ever noticed any impact from using the disk image.

    As an experiment, I created a 1TB sparsebundle (with AES-256) and copied the Yosemite installer into it, and then onto the same disk that the image is on. In that scenario using the image caused the copy to go from 7.6 seconds to 32 seconds, which is significantly more than I expected.

    n.b.: I do not really use encrypted images much any more now that OS X supports whole-drive encryption. Although it can take quite a while to convert an existing drive, empty drives can be formatted with encryption in Disk Utility very quickly.

    A.
     
  3. Loa thread starter macrumors 65816

    Loa

    Joined:
    May 5, 2003
    Location:
    Québec
    #3
    Hello,

    Something's off with my system then. I tried copying 9GB and I had a couple of **days** of (calculated) expected time. Just *creating* a 500GB image took hours.

    Very strange.

    Loa
     
  4. octothorpe8 macrumors 6502

    Joined:
    Feb 27, 2014
    #4
    That doesn't sound right. I've used encrypted disk images a fair amount, and MUCH bigger ones than that, and nowhere hear that kind of lag.
     
  5. Loa thread starter macrumors 65816

    Loa

    Joined:
    May 5, 2003
    Location:
    Québec
    #5
    That's why I asked my question. If it's not the CPU or SSD that's slowing things down, I didn't know what could cause such crappy performance.

    Any idea how I could troubleshoot this?

    Loa
     
  6. octothorpe8 macrumors 6502

    Joined:
    Feb 27, 2014
    #6
    Well I guess I'd start by running Disk Utility to check out your volume and make sure there isn't something fundamentally awry.

    If that passes, I'd try restarting and firing up a separate user account and see if that helps. If it does, you know it's some software issue probably in your own account.
     
  7. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #7
    I'd start by evaluating the SSD performance with an unencrypted disk image. It should have all the same parameters as the encrypted disk image (sparse bundle, size, file-system format, etc.), but not be encrypted.

    If that dmg has similar speed copying to it, then the problem isn't with the encryption, it's something else.

    If the speed is similar, I suggest making unencrypted disk images with smaller sizes, starting at the low end (e.g. 250MB) and doubling the size for each test. Time how long it takes to make each one. Post the data; maybe there's a discernible pattern.
     
  8. Loa thread starter macrumors 65816

    Loa

    Joined:
    May 5, 2003
    Location:
    Québec
    #8
    I'll try it. I know the SSD works fine, at 350MB/s using my cheap sata3 card. I've tested it with benchmark apps and real-world copy tests.

    Given that it's Xmas, I'm going to be busy for the next week or so, but I'll post back when I try.

    Loa
     
  9. astrodog macrumors newbie

    Joined:
    Jan 17, 2011
    Location:
    Australia
    #9
    I've noted the same - I'm copying a 700MB file into an encrypted .dmg, Finder reporting an hour to complete....
    I've used encrypted .dmg's for years, and have never noted this until recently. I wonder if it is a filevault issue? I also use large truecrypt volumes, they do not suffer this slowdown at all, so I assume my hardware is fine.
     
  10. Loa thread starter macrumors 65816

    Loa

    Joined:
    May 5, 2003
    Location:
    Québec
    #10
    Hello,

    Cleaned up a few things and made sure my drives were all working optimally. The volume on which I created the encrypted disk image has been tested at 140MB/s (both read and write).

    The creation process for a 500GB encrypted disk image, using 128bit aes, has taken hours. Once created, copying 40GB onto it had a estimated copy time of 20 hours.

    That just doesn't seem right... In fact, it makes those disk images unusable.

    Loa
     

Share This Page