I’ve been conducting an experiment over the last month in a bid to radically improve the performance of iTunes. The specific issue I was having was incredibly slow response times when doing simple actions such as clicking a playlist, sorting and changing from one view to another. Ripping CDs and syncing were not an issue.
Computer: PowerMac G5, dual 1.8GHz
Hard Drive: 2 x 320Gb, RAID-striped on SATA bus (1.5gbps)
iTunes Folder: Approx 450Gb
Before I begin, I’d like to mention that I’m not an expert by any means. I put together this theory based on my general knowledge.
For a G5, 1Gb is not a lot of RAM, especially as this machine is a real workhorse, often ripping a DVD, converting recorded TV and running iTunes all at the same time. The hard drive is also a bottleneck, because the iTunes database, the iTunes media files and the system were all on the same volume. If all three had to be accessed at the same time, the requests would compete. Compound the insufficient RAM which generates a very active virtual RAM file, and performance is severely compromised.
Phase One: Isolate the iTunes Database
My first experiment was to put the iTunes database (contents of ~me/Music/iTunes/ minus the iTunes Music folder) on a USB drive. My reasoning was that isolation of the database itself, which has to be written out in full every time you change the slightest tag, would improve performance because it would no longer compete for access on the main hard drive volume. There were no other files on this drive. The iTunes media files were left on the main volume.
Result: The only performance benefit was slightly faster database load time on launching iTunes. On closing iTunes, sometimes the saving of the database seemed to take longer. The 480mbps bus may have been a factor, as it is more than three times slower than the onboard SATA.
Phase Two: Isolate the iTunes Media Files
I bought an external Western Digital MyBook Pro 1Tb drive. This drive consists of two 500Gb drives, RAID-striped using hardware RAID built into the box. Hardware RAID is always better than software RAID, and if the box does it instead of the computer, even better. The drive is connected via FireWire 800 (800mbps). Only the media files are located on this drive. The database is still on the USB drive.
Result: Still no change in database performance, however, overall system performance seems slightly better.
Phase Three: Move the Database to the External Drive
Frustrated with no real performance boost from the dedicated USB drive, I moved the database to the external FireWire 800 drive to test.
Result: Launch times, save on close and general interface improved, better than in both the original configuration and Phase One.
Phase Four: Increase RAM
I upgraded my RAM to the maximum that the system can take: 8Gb. I didn’t change the location of the database and media files.
Result: Performance about twice as good as that of Phase Three.
It really does matter where you put your database and your media files. I didn’t expect this much improvement from FireWire 800 as it’s still a lot slower than SATA. However, the computer seems to really like having those files on an external drive. If I had more bays inside the machine I would have used them instead of an external drive.
I was really disappointed that the database-on-USB experiment didn’t yield results. I thought that it would work better because the file isn’t that big (38Mb) and the bus should be fast enough for that one operation.
RAM helps a lot, as expected. I’m not sure how to check, but it seems obvious to me that the virtual RAM file would be smaller and/or less-often accessed.
I am pleased with the performance improvement. I’ve noticed multiple operations that used to choke iTunes seem to be much better handled. An example of this is syncing Apple TV while downloading a podcast while ripping a CD and deleting a song. However, the initial issue that I wanted to eliminate as much as possible–pausing when I click anything (e.g. changing from Music to TV Shows)–is still present, although the pausing is not as long as it used to be. I have concluded that this is due to 2 factors: the age of the machine (4 years old) and the database design. I think the database design is the key factor. I’ve posted earlier that it needs to change.
If you want to improve your own iTunes performance and it still seems a little pokey, as I’ve discovered, please tell Apple about it. If enough of us report this, they will make changes to improve it.