iTunes: Still Slowing Down Windows PCs After All These Years
colinneagle sends this quote from an article at NetworkWorld:
"I run a very nifty desktop utility called Rainmeter on my PC that I heartily recommend to anyone who wants to keep an eye on their system. One of its main features is it has skins that can monitor your system activity. Thanks to my numerous meters, I see all CPU, disk, memory and network activity in real time. the C: drive meter. It is a circle split down the middle, with the right half lighting up to indicate a read and the left half lighting up for write activity. The C: drive was flashing a fair amount of activity considering I had nothing loaded save Outlook and Word, plus a few background apps. At the time, I didn't have a Rainmeter skin that lists the top processes by CPU and memory. So instead, I went into the Task Manager, and under Performance selected the Resource Monitor. Under the Processes tab, the culprit showed its face immediately: AppleMobileDeviceService.exe. It was consuming a ridiculous amount of threads and CPU cycles. The only way to turn it off is to go into Windows Services and turn off the service. There's just one problem. I use an iPhone. I can't disable it. But doing so for a little while dropped the CPU meters to nothing. So I now have more motivation to migrate to a new phone beyond just having one with a larger screen. This problem has been known for years. AppleMobileDeviceService.exe has been in iTunes since version 7.3. People complained on the Apple boards more than two years ago that it was consuming up to 50% of CPU cycles, and thus far it's as bad as it always has been. Mind you, Mac users aren't complaining. Just Windows users."
Sorry, can someone explain to a Linux/Android guy how having an iPhone implies you can't kill misbehaving software on your Windows box?
Tom Swiss | the infamous tms | my blog
You cannot wash away blood with blood
That's SIGKILL yourself in shame.
Mod me down, my New Earth Global Warmingist friends!
You can use the SC in the command line to enable the service when you need it and disable it when you don't using a BAT file.
(sc config servicenamehere start= disable)
Just saying... and thanks for the head up on Rainmeter
The service runs in the background and launches iTunes when the phone is plugged in. It's quite handy.
That feature is built into Windows (at least Vista+). A user can decide which action to take when a specific device is plugged in; no extra services required.
I hate how these companies seem to think that they can take over my machine; HP seems to think that all I do is print. Office seems to think that I type all day. AV software usually seems to think that all I do is want to hunt viruses. iTunes seems to think that I just screw with my iPad/iPhone all day. BlackBerry violates your machine. Java seems to think that it should check for an upgrade 100% of the time.
The last few updates from Apple have this hidden MRT process that goes made for hours after the upgrade. But the MRT gives no hint that it is installing, and no hint that it is running. Your machine grinds to a halt so you slowly bring up the list of active services and find that it is using all your CPU and that of your neighbor plus so much memory that it is worse than the viruses that it is hunting.
I wish that people would have an OS that has a simple sandbox keeping software installation tools from installing whatever they want. Then when I run Office or iTunes or even my AV it will then run. When I shut it down it will stop. The same for drivers. When I go to print it should run the driver and then go away.
But another critical tool that could be created right now would be to have an activity monitor that differentiates vital services from crap from Acer or HP. With this tool you would bring up a list of services running and not only kill them now but disable them for all time. No more kill the service only to have some daemon pop it back up seconds later. I don't want to go digging through any config/startup/hidden file nonsense.
Must be to compete with Microsoft. Their Office for Mac is a piece of junk and often doest adhere to the HID guide of development software. Hell, I cant even cut & paste images dragging and dropping them as in other Apple software. And it is SLOW.And lets not get started about Outlook. I have been trying to take a coworker out of it.
Clearly the problem is that he's using Windows. If he's bought an iPhone, then the next step is to buy an iMac to plug the iPhone into, and then a new iPhone, because his old iPhone won't work with his new iMac. Also a black turtle neck. And a picture, "Steve Jobs 1955 - 2011" for his wall.
Personally I don't buy iCrap. I have a picture of Dennis Ritchie on my wall, and underneath, his widely celebrated comment: Steve Jobs is a cunt*.
* This is not an actual comment by Dennis Ritchie**.
** To my knowledge.
I'm pretty sure that it is real CPU load. It is caused by a conflict with some network filtering software (e.g. antivirus software, content filtering software, etc.). Try updating the relevant software.
Check out my sci-fi/humor trilogy at PatriotsBooks.
I have an iPod, not an iPhone. However, the AppleMobileDeviceService.exe process is running in the background. I have never seen it gobble up cycles. It normally sits at "00" CPU. When I plug in the iPod, it jumps to an incredible "01" for a very short interval and then returns to "00". So, does anyone else have this process gobbles up to 50% of the CPU?
Nos Morituri te salutamus
The iPhone does not show up as a SBP2 device on the USB bus, so therefore Windows cannot format it and will not ask to format it. In fact, if you hook it up to Windows 7, it loads a Microsoft driver that exposes a DCIM folder for you to peruse as a normal disk. On Windows XP, it shows up as a "Scanner or Camera" device, again, without having iTunes installed.
iTunes may suck, but don't make shit up.
I looked at my computer, and while it's had an uptime of probably since April's patch tuesday, that service has consumed a grand total of... 1m53s of CPU time.
He never mentions what version of iTunes he's using - perhaps it's still 10.x, which is horrible. iTunes 11 has actually fixed a LOT of stuff and is actually pretty decent and more importantly, fast. It's incredible how fast iTunes is nowadays. I'm not sure what Apple did, but damn it's fixed a lot of stutters, halts, and stalls.
But on the flip, Microsoft's hardware abstraction layer is a terrible, horrible, implimentation that makes every access from userspace terribly expensive.
And worse? Some of the documentation specifically says they want it that way! On purpose!
Citation needed.
Windows actually has a rather sophisticated driver model which allows many drivers to be implemented in user mode or at least be divided so that big parts can run in user mode. This improves both stability and security. A relevant type of drivers in this context is bus drivers, specifically bus drivers for USB. These drivers will discover new devices on the USB bus *regardless* of their make, capability etc. The bus driver til inform *your* driver when a device arrives. No need to scan or poll for devices. If you do it right you can just sit there and wait to be informed. No need to poll, no need to even tie up a thread in waiting state.
That is all in the documentation:
Types of WDM Drivers
Function drivers
An example
So which part of the documentation did you read?
Everytime I have to work with HAL I'm filled with a strong urge to strip all my clothes off, burn them, then take a cold shower while shivering up in the corner, scrubbing my skin raw, chanting "must...wash...away...the sin..."
Maybe you should find another line of work?
Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
Yep - and NOD32 is even on Apple's list of software that has issues with iTunes...
You still have not told us where Microsoft recommends polling, as per your claim:
And worse? Some of the documentation specifically says they want it that way! On purpose!
[HAL] it's a nightmare of convoluted and badly-documented objects and methods. I won't go as far as to say whoever decided to go with polling instead of event-driven made a great design choice, but I can understand how, after days and days of pouring over bad documentation, he decided it was either ritualistic suicide or go with the better-documented interface...
Windows device driver development has an entire site devoted to it. In there there is architectural guides, tools, development kits, samples, articles, process guidelines and best-practices. I really don't know what you'd expect? Would the source code be better documentation and provide better guidance?
but I can understand how, after days and days of pouring over bad documentation, he decided it was either ritualistic suicide or go with the better-documented interface...
I can't
1. iPhone connects over USB. Which means that Windows already has a bus driver in place which will notity the PnP manager about device arrivals on the USB bus. What one would need to create is probably a Function Driver. If iPhone used some standard protocol one could probably do with a built-in driver, but I suspect that some proprietary protocol are at work - so therefore a function driver.
2. The PnP manager will activate and notify the function driver upon device arrival. It will do so through the AddDevice message.
3. From the looks of it, what the iPhone requires is probably aptly covered by a user mode driver. Which flies in the face of your previous assertion that
Microsoft's hardware abstraction layer is a terrible, horrible, implimentation that makes every access from userspace terribly expensive
What exactly is it you feel is not documented? What is the documentation you are missing? You did download the Windows Driver Kit, right?
Still waiting for citation for Microsoft recommendation of polling...
Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
You know that mDNS /is/ a standard for network discovery, right? http://tools.ietf.org/html/rfc3927
Microsoft is listed in the RFC, but haven't bothered to implement, as they bet on the uPNP horse with WinXP way back when.
Slashdot still doesnâ(TM)t support Unicode after it was added to the HTML standard in 1997.
(3) The Windows APIs for device arrival notification suck and require polling rather than blocking a thread to wait
Thanks so much for sharing your knowledge. I'll call up our software engineers immediately and let them know that processing a DBT_DEVICEARRIVAL message in the message pump, or using RegisterDeviceNotification() in our service, can't possibly work and we should re-write those sections of code to poll for device change.
I have mod points, but there's no "-1 - ignorant" mod.
You do that.
Tell them to make a version of DBT_DEVICEARRIVAL that doesn't require you to have a window handle to get the callback to the message pump so that you don't have to poll using PeekMessage(). The notifications need to be able to go to windowless services. If they can't go to windowless services running and paused in the background, they are no good for causing the launching of a specific program when a device of a specific type arrives.
Then tell them that RegisterDeviceNotification() is useless for detecting new iPod/iPhone/iPad devices because it require matching a GUID that has not been defined at the time that the service was written, and that having to update the service by having to update iTunes each time you buy a new device before the plugged in device is recognized as launching iTunes because you don't get a broadcast notification in that case, which you can then use to open up the device temporarily to probe it further ("Hi, USB device, are you an Apple Device?") rather than using a stinking GUID.
Then call up the IronKey and other encrypted USB storage device folks and tell them about it, too, because, hey, they have to do a crypto handshake and need to be able to aske the same question AFTER the handshake.
Then you can call up Motorola, and tell them so they can update their PhoneTools Software, because they have the same problem.
Then call the DataPilot folks, who have no idea in heck what the phone GUID would be when you plug in your stupid random phone, particularly if you are using their DataPilot Universal PRO Kit, which connect up to almost all the phones from Apple, Motorola, LG, Samsung, Sanyo,
Sony Ericsson, and Audiovox.
I have more concrete examples, but I think you get the point.
This is a general problem. The current Microsoft APIs do not solve this general problem; they require either an open application window, or they require a service which polls. They are insufficient. If you can indeed call up your engineers, do so. Tell them the problem space their APIs are not solving, and request they fix the existing APIs or add new ones to address the problem.