Hardware-Assisted Memory Management Unit (MMU) Virtualization


Database applications and database management systems typically use large amounts of memory. Maintaining application working sets in memory helps reduce storage I/O. In addition, data access patterns can cause large changes in the contents of the working set. These two factors make efficient memory management a determinant factor in database performance.

Memory management in virtual machines differs from physical machines in one key aspect: virtual memory address translation. Guest virtual memory addresses are translated to guest physical addresses using the guest operating system page tables. ESX then translates the guest physical addresses into machine physical addresses on the host. ESX maintains mappings from the guest virtual addresses to the machine physical addresses in shadow page tables. The shadow page tables allow ESX to avoid doing two levels of translation for every memory access and are cached in the hardware’s TLB. However, creating and maintaining the shadow page tables causes some overhead.

Hardware support for memory management unit virtualization is available in current processors. Offerings from Intel and AMD are called EPT and RVI, respectively. This support consists of an additional level of page tables implemented in hardware. These page tables contain guest physical to machine physical memory address translations.

While this hardware support obviates the need for maintaining shadow page tables (and the associated performance overhead) it introduces some costs of its own: TLB miss costs, in the form of increased latency, are higher because of the extra level of page tables. The number of TLB misses can be reduced by using large memory pages, a feature which has been available since ESX 3.5. Because TLB miss latency is higher with this hardware virtualization assist, use of large pages by the application in the virtual machine and availability of
large pages at the ESX level are a prerequisite for good database performance.

The following papers contain detailed descriptions of the hardware assist mechanisms and performance results from several benchmarks:

Advertisements

About PiroNet

Didier Pironet is an independent blogger and freelancer with +15 years of IT industry experience. Didier is also a former VMware inc. employee where he specialised in Datacenter and Cloud Infrastructure products as well as Infrastructure, Operations and IT Business Management products. Didier is passionate about technologies and he is found to be a creative and a visionary thinker, expressing with passion and excitement, hopefully inspiring and enrolling people to innovation and change.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s