The most important Virtual PC performance factor is the Mac hardware capabilities. The following is a list of hardware considerations to take into account when purchasing a new machine or upgrading your existing Mac. The most important considerations (with respect to Virtual PC performance) are listed first.
The raw processing power of the main CPU is the most important performance factor. Assuming all other parts of the computer system scale with the CPU speed (including cache and memory speeds), a 500MHz G3 is going to emulate a PC about 20% faster than 400MHz G3.
Level-2 Cache Size & Speed
The “L2” cache is a piece of fast memory that helps reduce the average transfer time between the processor and main memory. Both G3 and G4 processors have “back side” caches which run at a clock frequency that is a small multiple (usually 1-to-1 or 1-to-2) of the CPU clock rate. Virtual PC makes extensive use of the L2 cache because of its relatively large “working set” (i.e. the amount of memory it accesses on a frequent basis). Virtual PC works best with an L2 cache that is at least 512K in size. Most of today’s Macs come with 512K of L2 cache, but older Macs may not.
System Bus Speed
The system bus is the connection between the processor and the main memory. When applications like Virtual PC attempt to access memory, they processor first checks its first-level (L1) cache. If the access “misses” in the L1, the L2 is checked. If the accesses also “misses” in the L2, the access is made across the system bus to main memory. The speed with which this access can be completed is dependent on the speed of the RAM and the clock rate of the bus. Newer Macs have system bus speeds of 75MHz or greater. Older Macs that have been upgraded to G3’s or G4’s may have buses as slow as 40–50MHz.
Virtual PC attempts to use the Mac’s available memory in an intelligent way, maximizing the emulation performance. If there is very little memory remaining for Virtual PC, it will not be able to create a “code cache” of adequate size. The code cache is used to store snippets of code that have been recently translated from x86 to PowerPC.
The G4’s AltiVec unit is used by Virtual PC to speed up certain operations. In particular, AltiVec is used in the emulation of MMX instructions. It is also used to speed up the transfer of pixels to the Mac’s video screen, resulting in a “snappier” feel.
Frame Buffer Access Speed
Most programs on the Mac use a system software service called QuickDraw to draw their graphics to the screen. QuickDraw, in turn, makes use of video acceleration features of the Mac’s video card to speed up drawing operations (e.g. filling in a rectangle with a solid color or drawing a string of text). Because Virtual PC is emulating a video card itself, it doesn’t use QuickDraw to perform each video command. Rather, it performs its own drawing and “blits” (i.e. transfers the pixels) to the Mac’s screen itself. This results in very accurate emulation of the PC’s video, but means that the Mac’s video acceleration features are not used. The important consideration for Virtual PC video performance is how fast the program can access the Mac’s “frame buffer”. The frame buffer is just an area of video memory that the MacOS and programs can use to directly access the pixels on the Mac’s screen. Newer Macs contain on-board or AGP video cards. Some Macs may use PCI-based video cards. Virtual PC can access the frame buffer faster on machines with on-board or AGP cards than it can with PCI cards.
What about MP (multiple processors)?
A number of VPCCentral readers have asked about MP support. Most of Apple’s current high-end line of Macs feature dual G4 processors. Why doesn’t Virtual PC take advantage of this extra hardware? It turns out that MP systems only speed up computing tasks that are “parallelizable” — i.e. they can be broken into pieces that can be executed at the same time. Some operations, such as video compression or graphic editing, are easily parallelizable. Unfortunately, processor emulation is not. The execution of instructions, which make up computer programs, is a serial process. Therefore, there is little benefit to be gained by rewriting Virtual PC to take advantage of MP systems.