I have a Dell laptop with 8GB RAM and a dual core processor running Windows 7.I use my machine quite intensively.Quite often I run virtual images under Oracle’s VirtualBox.I’m currently using an image that contains an installation of the BizTalk Server 2010 beta.
For months, I found that every time I fired up images under VirtualBox, I would run into problems.I might be fine for a while, but then, at some point, problems would arise.The machine would become totally unresponsive for a few minutes.Task manager would report 100% CPU usage.After a while, things would revert to normal.A few minutes later, I would have to endure another period of unresponsiveness. This would continue for an hour or two, and then everything would revert to normal.
The same problem arose on my machine every Wednesday lunchtime, regardless of the use of VirtualBox.My machine is a company laptop.It has Forefront installed and scheduled to run a full scan at this time.I can’t change the schedule because of policies applied to the machine, although our systems people assure me they have been careful to ensure that Forefront excludes very large files such as virtual images from the scan.
I’ve lived with this issue for a long time.Normally, I would hope to be able to spot a rogue Windows process that is hogging all the processor cycles.However, in this case, there was never any indication of any process causing problems.The combined count of all CPU usage of all processes, including processes belonging to other users, was always substantially below 100%.This was true for processes on the host as well as those running under VirtualBox.Another strange thing was that, over many weeks, I kept on seeing the emergence of a pattern (not counting the Wednesday lunchtime issue, which had an obvious link to Forefront). I might have three days when the problem occurred at the same time each day.Then the pattern would always disappear and some different pattern would later emerge.
Of course, I used various tools to try to track down the problem.With no rogue processes, my best guess was that the problem must be occurring at a lower level, perhaps with some badly behaving driver.I found no hint of any problems with drivers, though.I’ve seen rather similar behaviour in the past due to interrupt conflicts, but again, no sign of any issues.I spent quite some time with SysInternals Process Explorer trying to track down the problem, but to no avail.
Then, a few days ago, I got my first solid clue as to what was happening. It was Process Explorer that helped.My attention was drawn to an instance of the Windows service host that I could see was using up a few % of CPU cycles.I opened it up and had a look. One of the nice things about Process Explorer is that it provides a graph of CPU usage at the process level. The graph I saw grabbed my full attention. There, before my eyes, was a lovely trace showing clearly that, at just the same time my machine had gone into 100% CPU usage, this process had suddenly started using a few % of CPU cycles.At the moment the CPU usage dropped back down, so did the graph.
Process Explorer allows you to see all the services that are running in an instance of the service host. I set things up and waited for the problem to re-emerge.Sure enough, after a minute or two, CPU usage rocketed sky high.I had previously discovered that if I paused VirtualBox, the CPU usage would drop back to about 80%.The machine was still very sluggish, but could be used. So, I paused VirtualBox, waiting an eternity for the mouse click event to be processed, and then got to work. As quickly as I could, I worked through the list of services.The host was running exactly ten Windows services.I stopped the Desktop Windows Management Session manager [UxSms] – bang went my Aero interface – I stopped the Distributed Link Tracking Client [TrkWks] service – no change – I killed the Human Interface Device Access [hidserv] – etc., etc.At last, on the seventh service, I stopped SuperFetch and, after taking ages to close, everything burst into life.
I have been running VirtualBox constantly since then, over several days. I have yet to see any reoccurrence of the issue.Last Wednesday, for the first time in a very long time, Forefront completed a full scan without issues. Wonderful.
Is SuperFetch at fault?I can’t say. Is it just a bad installation of Windows 7. Maybe.Perhaps VirtualBox is the true culprit.That’s possible. I have no idea. All I know is that my productivity is now significantly higher after switching SuperFetch off.To switch it off, I simply opened the ‘Services’ administration managament console anddisabled the SuperFetch Windows service.
I discussed my experience on the BizTalk Gurus newsgroup and two other people responded that they had been having similar issues. They have both switched SuperFetch off.One, Randal van Splunteren, got back to me to say that his VirtualBox problems were significantly reduced by switching SuperFetch off.However, as he pointed out, there was still a fairly high on-going CPU usage when VirtualBox is running (45-50% on my box).As I understand it, VirtualBox always soaks up CPU cycles, even when the image is idle, due to timing interrupts which I presume has something to do with synchronising the virtual image to the actual hardware.This is to be expected, but the CPU usage did seem too high for comfort. Randal investigated further and came up with a further improvement.Both he and I had configured our images to use two logical CPUs.You can control this on the Processor tab under Settings/System for a specific image.Reducing this to 1 significantly reduced the CPU usage.
Randal reports that this only really helped once he had reverted back to an older version of VirtualBox.Under Oracle’s ownership, we are currently at version 3.2.8. Randal recommends ditching this version in favour of version 3.1.8 which belongs to the Sun era.I experimented on my machine with both versions. My experience was that setting the number of logical processors to 1 made a significant different on both versions, but the effect was a little greater under the older version.I get about 20% CPU usage under 3.2.8, but perhaps only 15% under 3.1.8. Randal has decided to use the older version.I’ve decided to stick with the current version, at least for now.
So, a combination of disabling SuperFetch and configuring a single logical processor has made all the difference.If you have also been having problems running VirtualBox, then there may also be merit in reverting to an older version.