I would love to know what the difference between our systems is. On my 1.67GHz PB G4 (1.5 GB RAM), as I've said before, I typically see around 20% when idle or playing music. Playing videos, it can max out the processor. As I'm running Leopard, is it possible that this is a Leopard issue, not an iTunes issue? Could you check to see what you get under Leopard? Otherwise, I just don't see the difference between our systems that would account for my system seeing such a high iTunes load.
Thanks.
OK, I've booted into 10.5.5 with the latest System Updates added. After waiting for MDS to finish its Spotlight update, I got 0.1% for iTunes in idle and again around 3.2% for iTunes while playing an Apple Lossless file with an occasional 6% spike. I then proceeded to update Firefox in Leopard to 3.0.3 as it offered when I started Firefox and now with Firefox running and another Apple Lossless file playing, I'm now getting between 2.5 and 2.9% from iTunes in Activity Monitor with no spikes. As I type, an MP3 file started playing (Back in Black) and iTunes is averaging between 2.4 and 2.5% solid while playing. If I turn on the visualizer, it jumps between 68% and 72%, which is lower than Tiger, but I see an occasional stutter that didn't happen in Tiger.
After turning off the visualizer, iTunes started jumping between 3.5% and 5.5% and seems to still be jumping between them with the same MP3 playing. iTunes started off using 49 MB of real memory and jumped to 51 when playing the first music file. After turning on the visualizer and then off again it's now using 58 MB, which makes me wonder if the visualizer has a memory leak or something associated with it. It's now playing Hell's Bells MP3 and the numbers are the same as a moment ago at 58MB and 3.5% jumping around to 5.5% and even an occasional 7.3%.
Keep in mind these are numbers for iTunes itself in Activity Monitor. If you're looking at the overall CPU use or availability, it reads different, which here jumps between 4.8% and 12% with occasional 16% jumps in User%. Idle is jumping between 80%-88% with an occasional 78% dip and 90% spike. System% is sitting around 6%.
I started an AAC 256kbit song (Don't Dream It's Over by Crowded House purchased from the iTunes Store as an iTune Plus song) and iTunes is now reporting 3.3-3.5% solid with a 6% spike about once every 6 or 7 seconds or so. This cycle is repeating steadily. Memory usage has increased to 59MB real.
I started "Cloudbreak" Apple Lossless by Alan Parsons from the On Air album. Memory usage jumped to 64MB (still wondering about a memory leak in iTunes but thinking now it's not the visualizer). CPU use is jumping between 3.2% and 5.5%. I switched to "Wine From The Water" by Alan Parsons off Try Anything Once. Memory usage jumped to 66MB. CPU use is still steady between 3.2 and 5.5%. I changed to "Losing Grip" by Avril Lavigne. CPU use is steady as before, but memory use jumped to 78MB. I would venture there is DEFINITELY a memory leak in iTunes 8.0.1 and it's pretty significant. I can imagine iTunes eventually crashing or making the system unstable after a day or two of constant playing if the trend continues. I'll have to compare in Tiger and see if the problem is there as well.
Ok, I started "Complicated" lossless and it jumped to 88MB and then dropped to 78MB, which is the first time I've seen a drop in memory usage after starting a song. I'll try a series of songs next. CPU use is still 3.5% on average. Ok, I jumped 9-10 more songs through and it's now at 93.8MB real memory use. I do see some spikes in memory usage and then drops so it's possible there's some kind of memory buffer or something in use and not an actual memory leak being witnessed. It's too soon to tell, I would say. I'll try more songs. CPU use is still steady at around 3.4% with occasional jumps to 5.5%. OK, 33 song jumps later and real memory usage is at 133.85MB and CPU usage is still at 3.4% for iTunes.
I can't say why others have significantly higher CPU usage, but I do think iTunes has a significant memory leak as it continually consumes more memory the more songs you play with no major corrections over time with around 50 songs through. I'll try some more tests with Tiger next and see if memory leaks through as well. But first I'll try playing a few music videos for comparison.
Ok, I'm playing the music video for Winter by Tori Amos which I encoded using Handbrake on my PC from her Fade to Red DVD set with a setting for AppleTV. It's using around 70% CPU and 158MB of memory (en total since I have not quit and restarted iTunes yet). Ok, correction, memory use is now in flux as the video is playing and is actually dropping and rising between 150 and 154MB or so. I switched to Caught a Lite Sneeze video and memory usage spiked to 178 briefly followed by a drop back to 154MB. CPU useage is still hanging around the 70% range. I switched to a music video I bought from the iTunes store instead, which is Sheryl Crow's "If It Makes You Happy" and it's averaging around 70% CPU also, but memory usage dropped to 152MB. I'm now running "Atom Bomb" by Fluke also purchased at the iTunes store and memory usage stayed the same, but CPU use dropped to around 60%. Ok, I thought I'd try a widescreen video so I put on "Touch My Body" by Mariah Carey and CPU use dropped to 55% and memory usage to 148MB.
Switching back to an Apple Lossless file, memory usage dropped to 139MB, which is still higher than where it left off before I started trying music videos. CPU use is back to 3.4% or so. I jumped through another 10 music files or so and memory usage is up to 167MB (so it's STILL RISING).
I just quit iTunes and will now restart and see what happens to memory usage. It's back to 0.1% CPU use at idle and 48MB of memory. So it apparently does at least release its memory when you quit it. The only problem it could cause me is that I run iTunes 24/7 as part of my whole house audio server. I'll see what it does after having it running for a few days or a week. Of course, if you don't use it, it won't use any more memory, though.
This ends Leopard testing. I'll now see if it behaves any different under Tiger for memory use.
Edit: Ok, I ran a similar set of songs and music videos under 10.4.11 Tiger and the results were extremely similar. The memory usage rose at similar rates and the CPU use was about the same.
I also ran iTunes 8.0.1.11 in WindowsXP SP3 on my AMD 5600+ machine with 2 Gigs of memory. Memory usage also increased there as well, but the CPU percentages were much lower. Considering it's a much more powerful dual-core CPU that shouldn't be surprising.