Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Aperture 3 Library Fragmentation causes problems

Hi All,

I have read a number of the complaints in A3 conversion, and I think this may help solve some of them.

We have 6 systems with Libraries from 500GB to 1.2TB here and converted them all last weekend without serious problems, and all are enjoying superb increases in performance as I write this.

We did not have the conversion problems others have suffered, and I think I know why:

1) Disable Faces - Saves time in conversion, can be done afterwards.

2) DO NOT reprocess masters in the conversion, it can be done as needed once you are running, PLUS - WARNING - it will adversely effect many v2 images, changing exposure and colors, etc. PLUS, the conversion will go MUCH faster, as you have given it less to do. Check out the Apple Knowledgebase piece: "Aperture 3: Discussion about differences in exposure levels with Aperture 3 RAW decoding"
http://support.apple.com/kb/HT3948

3) Use an EMPTY freshly formatted volume that is at least double the size needed.

4) When conversion is complete, COPY your converted library to to another new freshly-formatted volume with at least 40% free space before you use it.

Why?.....

The normal operation of Aperture has always resulted in some disk fragmentation, the larger the libraries the worse the problem. Always working from a copy that has just been made eliminates the great majority of the fragmentation, and ensures it does not become a performance issue.

Conversely, if someone just keeps using the same Library, it will just get more fragmented, and slower and slower until real problems develop. If they are also running out of disk space, then the fragments become fragments as the file system feverishly tries to fit all your data into a shrinking space. All this eats time, and given the size and number of files to deal with it has become a problem that NO AMOUNT of fast hardware will fix entirely. We need to deal with some database best practices....but trust me it works and A3 simply screams on our systems here 2-3 times as fast as A2.

To test this premise that conversion of a large library is going to result in a tremendously fragmented mess on the volume, I reconverted my last Aperture 2 library today from a backup from last week. It is 500GB and it completed conversion to A3 as described above in about 4.5 hours. I then looked at the volume with iDefrag, and over 50% of the file was fragmented. My original A2 file, was not fragmented of course as it had come from a backup. I then opened the converted file in A3, and it began to process previews VERY slowly, with really lousy disk activity read/written numbers reported in Activity monitor.

I stopped the process, quit Aperture3 and made a copy of the file to a fresh volume. I immediately noted the backup was going VERY slowly...I had not noticed this last week as all our first backups were done overnight. As a benchmark, an unfragmented 500GB file will copy in about 2.5 hours and a bit....this backup took over 6 hours! It had a lot of file fragments to assemble to put the copy together, and it all takes time and resources.

When the copy was complete, I opened it again in A3, and the preview processing raced right along. Even before it was complete, the data was snappy and available...when the preview finished, it was a screamer....as our systems are today.

We use iDefrag, by Coriolis Systems to look at the fragmentation on these large files. It is a $30USD utility, and invaluable in providing some reality into why your system is slow. I invite you view you Library and see where your performance is gone. http://www.coriolis-systems.com/iDefrag.php

Apple tries to make all of their programs looks simple and carefree to use...fine...I submit when a database is hundreds of gigs NOTHING is simple and carefree. Performance requires understanding and some simple maintenance. Would you buy a Porsche and not change the oil, run it in a small parking lot and then complain to Porsche about performance? Kinda the same thing...

For those who are interested...

Our basic daily operation has the Aperture library running from a volume that consists of a RAID 0 pair in slots 1 and 2 an 5-bay eSATA array. There is an identical RAID 0 pair that carries a backup of the first one in slots 3-4. There is a rotating single backup mechanism that is used for daily offsite rotation in bay 5.

Every night a full finder copy is made from the day's working RAID 0 pair to the other pair, and to the offsite disk.

The next morning, the operator will verify the backups have occurred without incident, swap the offsite mechanism out and then start the day's work ON THE OTHER RAID 0 PAIR that was the backup of yesterday's data. Why?.....The normal operation of Aperture has always resulted in some disk fragmentation, the larger the libraries the worse the problem. Always working from a copy that has just been made eliminates the great majority of the fragmentation, and ensures it does not become a performance issue. We actually use 3 pairs to have redundant backups, but I won't confuse the basic issue here with that discussion.

Conversely from our methods, if someone just keeps using the same Library every day, it will just get more fragmented, gradually becoming slower and slower until real problems develop. If on top of that they are running out of disk space, then the fragments become fragments as the file system feverishly tries to fit all your data into a shrinking space. All this eats time, and given the size and number of files to deal with it has become a problem that NO AMOUNT of fast hardware will fix entirely.

Given the volume of data we digital photographers keep collecting, we need to take responsibility and deal with some database best practices....but trust me it works and A3 simply screams on our systems here 2-3 times as fast as A2.

Will this fix everything, for everyone???

Of course not...the wide variety of machines and configs make it impossible to predict this. I do feel pretty confident I can reliably make A3 run really fast on our systems here... and to note, the 6 workstations I have discussed are operating on 2008 MBPs (4,1) 6G RAM with 30" displays, not even Mac Pros and we are enjoying excellent throughput.

Hope this helps,

Sincerely,


K.J. Doyle

MBP 17" Glossy HiRes 2.6 6GB RAM, NVIDIA 8600 GT Video w 512MB, Mac OS X (10.6.2), 30" Cinema Display and External eSATA RAID for Library

Posted on Feb 19, 2010 7:43 PM

Reply
164 replies

Mar 28, 2010 3:42 PM in response to Kevin J. Doyle

I too have been suffering *really bad* performance with Aperture 3.

I ran hfsdebug to see what my fragmentation was like and the results are astounding. Displaying the top 50 fragmented files, I found that 49 of them were Aperture thumbnail files, #1 had 7707 extents, and #50 had more than 600.

(An extent is a piece of a file that is stored as a contiguous section of the disk, so with more than one extent, when the file system reads a file it has to seek to get to the other parts -- very slow)

My disk is generally very fragmented. The largest free space is 9G (on a partition 650G in size that is 60% full).

I had installed Aperture 3 over Aperture 2 and it had done the library conversion in-place.

My solution is to repartition the drive into a system partition and an Aperture partition. It's an iMac, so I have FW800 or internal as my only storage choices.

No results from this change yet, since I'm still moving data around, making backups, etc. in preparation.

Mar 28, 2010 4:13 PM in response to Kevin J. Doyle

Wishing to export my project I get the following message "The library could not be created Because the file system of the destination volume is not supported". I have three hard drives and I do not understand the truth which may be the problem. I tried to find more information in support of the program but there is not nothing.
By trying to import my old projects I get a similar message. For me it is necessary to save my projects in order to continue with my work. Now I have the HD almost full.

I remember in previous version was possible to store opening projects. There is another command in Aperture 3 to perform this operation? HELP ME

Mar 28, 2010 10:12 PM in response to Kevin J. Doyle

Kevin J. Doyle wrote:


Our basic daily operation has the Aperture library running from a volume that consists of a RAID 0 pair in slots 1 and 2 an 5-bay eSATA array. There is an identical RAID 0 pair that carries a backup of the first one in slots 3-4. There is a rotating single backup mechanism that is used for daily offsite rotation in bay 5.


Why not just use a 4 disk RAID10 array? That way you have the speed increases from the striping and the redundancy of the mirroring. Rather than just having two arrays with no real-time redundancy. You also save the backup time transferring one RAID0 to the other.

Mar 28, 2010 10:22 PM in response to Zaph

Zaph wrote:
Kevin J. Doyle wrote:


Our basic daily operation has the Aperture library running from a volume that consists of a RAID 0 pair in slots 1 and 2 an 5-bay eSATA array. There is an identical RAID 0 pair that carries a backup of the first one in slots 3-4. There is a rotating single backup mechanism that is used for daily offsite rotation in bay 5.


Why not just use a 4 disk RAID10 array? That way you have the speed increases from the striping >and the redundancy of the mirroring. Rather than just having two arrays with no real-time >redundancy. You also save the backup time transferring one RAID0 to the other.


Mirrored Raid is NOT the same as a back up.
Mirrored Raid protects against HD failure ONLY.
A separate backup protects against file corruption, human error etc etc
Mirrored Raid will instantly put the file corruption or human error straight on to the "backup" as well!

Mar 29, 2010 2:57 AM in response to Kevin J. Doyle

Hi Kevin,
Just an amateur here- home photo bug. I have learned a lot from your posts- Thanks!! One question. I have all my photos backed up into a seperate HD. However, the masters are also in my pix file on the old laptop hd. How do I transfer all my masters to a different HD, and yet work with them when I get a chance? Do I have a seperate HD that I carry around and work out of? Then back it up when finished? Are these then "Referenced Masters?"

Right now all my projects and masers are in the AP3 lib. Sorry!

Mar 30, 2010 5:08 PM in response to Mike Boreham

Mike Boreham wrote:
Kevin,

Your screenshot of the UPS energy saver settings triggered me to ask a question I have been wondering about all the years since Apple put the UPS shut down options in OSX:

You have ticked all three shut down options:

1. Shut down after 7 mins on UPS power
2. Shut down when time left on UPS is 3 mins
3. Shut down when UPS power level is 35%

Obviously one of these is going to take priority. Does it do which ever happens first?

I have always only ticked the first box and used 5 mins, plenty of time (if I am at machine) to stop whatever and shut down manually. I have always thought that option 1 is the most trustworthy, being a simple timer. The other two require some estimation/calculation. OTOH, if the battery is near the end of its life, and unable to do 5 mins, then options 2 and 3 would be take over. So if I knew it was "whatever happens first" I would tick all three.

BTW a small tip about replacing the UPS battery which I have just done after four years on my APC Smart 1500. (The weekly self test process failed). I accidentally ordered a cheaper third party battery made by a company called CSB, instead of a genuine APC one (I usually go for the OEM part).

After replacing the battery, I had a look at the original APC one I had taken out, and peeled off the APC sticker, and guess what it had a CSB sticker underneath !

Message was edited by: Mike Boreham

Message was edited by: Mike Boreham

Hi Mike,

"Does it do which ever happens first?"

YES

Since the UPS is all about capacity, it will try to do your first request unless the load vs the battery will not cut it based on the other 2 terms.

You can also put only one term in, and it will either execute the term as written or quit early if it runs out of capacity before the threshold is reached.

Hope this helps,

Sincerely,

K.J. Doyle

Mar 30, 2010 5:20 PM in response to Zaph

Zaph wrote:
Kevin J. Doyle wrote:


Our basic daily operation has the Aperture library running from a volume that consists of a RAID 0 pair in slots 1 and 2 an 5-bay eSATA array. There is an identical RAID 0 pair that carries a backup of the first one in slots 3-4. There is a rotating single backup mechanism that is used for daily offsite rotation in bay 5.


Why not just use a 4 disk RAID10 array? That way you have the speed increases from the striping and the redundancy of the mirroring. Rather than just having two arrays with no real-time redundancy. You also save the backup time transferring one RAID0 to the other.


HI Zaph,

First reason not to do it is that I would not have an identical backup system to operate from immediately in the event of a media failure. Given my setup, if there is a problem I just point Aperture to the other striped pair and I am working with no downtime.

The second biggest reason not to do any system that involves live mirroring is that the mirror will happily copy corrupted data as it would validated date, making a duplicate corrupted copy in real time. This is not very useful. For this reason, all backups need to be initiated by the operator after validating the data file.

Part of my archive system...offline from Aperture...uses 3 mirror elements to make backups. I simply designate 2 drives as mirror members, and when they are inserted the SoftRAID array will automatically make these two drives identical to the main archive volume.

Sincerely,

K.J. Doyle

Mar 30, 2010 5:30 PM in response to takross

takross wrote:
Hi Kevin,
Just an amateur here- home photo bug. I have learned a lot from your posts- Thanks!! One question. I have all my photos backed up into a seperate HD. However, the masters are also in my pix file on the old laptop hd. How do I transfer all my masters to a different HD, and yet work with them when I get a chance? Do I have a seperate HD that I carry around and work out of? Then back it up when finished? Are these then "Referenced Masters?"

Right now all my projects and masers are in the AP3 lib. Sorry!


Hi there,

Frankly, the most important thing as far as I am concerned is to get all your data off the laptop an onto a disk that you will store somewhere else an update periodically.

The concept of offsite backup is the most critical thing I preach, because god forbid your laptop bag gets stolen they got your irreplaceable photos.

A lot of what I have discussed in the posts refers to large data storage requirements. If your whole library will fit on a laptop drive, Masters and all, you are probably better off just keeping the library format as is, because it will not make that much difference at this size.

Just get an maintain an offsite copy of your work as job #1.

Sincerely,

K.J. Doyle

Mar 31, 2010 6:43 AM in response to Kevin J. Doyle

Kevin J. Doyle wrote:

First reason not to do it is that I would not have an identical backup system to operate from immediately in the event of a media failure. Given my setup, if there is a problem I just point Aperture to the other striped pair and I am working with no downtime.



Well, not exactly. One of the drives in the RAID0 fails. You have a striped pair that has data from the last time you backed it up. That sounds like it's a daily thing, in which case if it happens in the afternoon you've just lost a days work. No?

One of the drives in the RAID10 fails, you can carry on working (all be it at a reduced speed) until you replace the drive. You lose nothing (theoretically <g>).

How does your manual backup to the second RAID0 array protect you from copying a corrupt file to that? If the file is corrupt, it's still corrupt when you copy it across. That's what the other archive backup is for.

Certainly not trying to convince you one way or the other, it just sounds like what you do now is less efficient than it could be (or I've misinterpreted something, which is quite possible).

Message was edited by: Zaph

Mar 31, 2010 8:06 PM in response to Zaph

Zaph wrote:
Kevin J. Doyle wrote:

First reason not to do it is that I would not have an identical backup system to operate from immediately in the event of a media failure. Given my setup, if there is a problem I just point Aperture to the other striped pair and I am working with no downtime.



Well, not exactly. One of the drives in the RAID0 fails. You have a striped pair that has data from the last time you backed it up. That sounds like it's a daily thing, in which case if it happens in the afternoon you've just lost a days work. No?

One of the drives in the RAID10 fails, you can carry on working (all be it at a reduced speed) until you replace the drive. You lose nothing (theoretically <g>).

How does your manual backup to the second RAID0 array protect you from copying a corrupt file to that? If the file is corrupt, it's still corrupt when you copy it across. That's what the other archive backup is for.

Certainly not trying to convince you one way or the other, it just sounds like what you do now is less efficient than it could be (or I've misinterpreted something, which is quite possible).

Message was edited by: Zaph


Hi Zaph,

"Well, not exactly. One of the drives in the RAID0 fails. You have a striped pair that has data from the last time you backed it up. That sounds like it's a daily thing, in which case if it happens in the afternoon you've just lost a days work. No?"

I neglected to mention Syncronize! Pro X is operating in the background, triggered hourly. The most I would lose is less than one hour's work.

"How does your manual backup to the second RAID0 array protect you from copying a corrupt file to that? If the file is corrupt, it's still corrupt when you copy it across. That's what the other archive backup is for."

No we do file validation before making the backup copy to prevent corrupted files from being duplicated, which is not an option running a conventional mirror.

"Certainly not trying to convince you one way or the other, it just sounds like what you do now is less efficient than it could be (or I've misinterpreted something, which is quite possible)."

Actually I am in the process of changing my operation to use referenced masters. I have uncovered some revalations in the way I though Aperture worked, and found out it is not so. I have chronicle a lot of this process in this post: http://discussions.apple.com/thread.jspa?threadID=2360456&start=0&tstart=0

Sincerely,

K.J. Doyle

Apr 23, 2010 5:38 PM in response to Kevin J. Doyle

Hey Kevin. Once again I'm in need of your expertise. This time the issue is a little more nerve racking than just a slow running Aperture 3. After following all of your hardware and database management advice Ap3 has been working pretty smoothly... for the most part. From time to time it does freeze up my whole computer and requires a restart. But, the major problem that's just popped up is that when I try to open any of my 3 identical librariee (all stored on separate striped drives) I get a warning from Aperture that says,

The library in “/Volumes/RAID B/Aperture Library.aplibrary” cannot be loaded because it is from a newer version of Aperture.

I'm freaking out because I can't open any of my libraries with Ap3, but at least I know that all of the files are still there. I tried restarting the computer, but still no success. What do you think is going on??? I did a software update and my Aperture version is 3.0.2, which is the most current. Why does it think that all of my libraries are from a newer version of Aperture than I'm currently using?

-Greg

Aug 25, 2010 5:03 PM in response to Kevin J. Doyle

Kevin,

If your still reading this...THANKS FOR ALL YOUR HELP. I opted for the new iMac. Running Aperture from dedicated drive using eSata. The FRESHLY FORMATTED VOLUME ALONG WITH INCREASED RAM DID THE JOB. Running on 10.6.4 as fast as ever. I'm backing up as per your instructions. You are a lifesaver.

I tried the techniques on my old iMac but I believe the 3mb limit in old iMac would never have done it for me.

THANKS,

Rick

Aperture 3 Library Fragmentation causes problems

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.