Ring Buffer Memory Replication for VM High Availability

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing virtual machine (VM) memory replication systems face inefficiencies due to buffer overflow issues, leading to prolonged suspension times and increased resource usage, as they require frequent synchronization between read and write threads and rely on large buffers to prevent overflow, which are costly and resource-intensive.

Innovation Solution

A special ring buffer is introduced that operates with a lockless scheme, prioritizing the copy process over the transmission process, allowing both to run simultaneously, and employs a notification threshold to manage data transmission independently of the VM's status, separating the copying and sending processes into parallel threads to prevent buffer overflow and reduce synchronization overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a large local memory buffer is used to prevent overflow, then buffer overflow is avoided, but memory resource usage increases significantly

Engineering Contradiction:
Improvebuffer overflow preventionVSAvoidmemory resource usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent implements a dynamic buffer management mechanism where the buffer size is not fixed but adapts based on the actual replication needs. The buffer dynamically adjusts its capacity during operation, allowing it to prevent overflow during peak dirty page generation while releasing resources during low-activity periods, thus resolving the contradiction between reliability and resource consumption

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the parameter of buffer capacity from a static large allocation to a dynamic value that adjusts based on replication progress and dirty page generation rate. This parameter change allows the buffer to maintain sufficient size for reliability while avoiding permanent allocation of excessive memory resources

Inventive Principle:
Principle #35Parameter changes

2Reliability

If the VM is suspended to copy all dirty pages to the buffer, then complete replication is ensured, but suspension time increases

Engineering Contradiction:
Improvereplication completenessVSAvoidVM suspension time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by starting to transmit dirty pages to the standby host before the VM suspension is complete. The transmission process is initiated in advance and continues during the suspension period, ensuring that replication is already in progress when the VM resumes, thereby reducing the effective suspension time while maintaining completeness

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent maintains continuity of the replication action by overlapping the dirty page copying and transmission processes. Instead of completing all copying before transmission starts, the system continues the useful action of data movement throughout the suspension period, ensuring replication completeness while minimizing the time the VM is non-operational

Inventive Principle:
Principle #20Continuity of useful action

3Reliability

If frequent synchronization between read and write threads is performed, then data consistency is maintained, but system performance decreases

Engineering Contradiction:
Improvedata consistencyVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the buffer into multiple regions or chunks that can be independently managed by read and write threads. This segmentation allows threads to operate on different segments simultaneously without requiring frequent global synchronization, maintaining data consistency within each segment while improving overall system performance through reduced synchronization overhead

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8656388B2Method and apparatus for efficient memory replication for high availability (HA) protection of a virtual machine (VM)
Publication Date: 2014.02.18 AVAYA INC
  • US8656388B2 patent drawing
  • US8656388B2 patent drawing
  • US8656388B2 patent drawing

AI summary

High availability (HA) protection is provided for an executing virtual machine. At a checkpoint in the HA process, the active server suspends the virtual machine; and the active server copies dirty memory pages to a buffer. During the suspension of the virtual machine on the active host server, dirty memory pages are copied to a ring buffer. A copy process copies the dirty pages to a first location in the buffer. At a predetermined benchmark or threshold, a transmission process can begin. The transmission process can read data out of the buffer at a second location to send to the standby host. Both the copy and transmission processes can operate asynchronously on the ring buffer. The ring buffer cannot overflow because the transmission process continues to empty the ring buffer as the copy process continues. This arrangement allows for using smaller buffers and prevents buffer overflows, and thereby, it reduces the VM suspension time and improves the system efficiency.