Check out the new USENIX Web site. next up previous
Next: Modifying the Guest OS Up: Performance Enhancements Previous: Performance Enhancements

Reducing CPU Virtualization Overhead

The optimized profile of Table 2 still shows significant overhead for ``core CPU virtualization'' overheads such as delivering virtual IRQs to a guest operating system, handling IRET instructions, and the MMU overheads associated with context switches. However, a discussion of any of these topics in enough detail to make concrete suggestions requires an understanding of VMware Workstation's core virtualization technology, and is beyond the scope of this paper.

The profile does however suggest one easy optimization to reduce virtualization overhead. Guest OS accesses to the virtual PIC (interrupt controller) accounts for 2.5% of VMM time. A network card saturating a 100 megabit link is transmitting around 8000 packets per second and, in the case of TCP, receiving a steady flow of incoming ACK packets as well. This causes the virtual machine to receive a high rate of virtual IRQs. For each IRQ, the Linux guest IRQ handler issues five accesses to the virtual PIC. Since the virtual PIC is independent of the real PIC, it is handled in the VMM without requiring world switches. We can further optimize these accesses. One of the five accesses has memory semantics and can be inlined as a MOV instruction (just like the Lance address register). The other four accesses cause the current virtual PIC implementation to completely recalculate its internal state in a very general way - this can be specialized to reduce the overhead of those accesses.


next up previous
Next: Modifying the Guest OS Up: Performance Enhancements Previous: Performance Enhancements
Beng-Hong Lim 2001-05-01