×

Page compressibility checker

  • US 9,600,317 B2
  • Filed: 04/16/2014
  • Issued: 03/21/2017
  • Est. Priority Date: 04/16/2014
  • Status: Active Grant
First Claim
Patent Images

1. A method for checking the compressibility of virtual machine (VM) memory pages for facilitating host swapping on a host system, the method comprising:

  • identifying a swap target VM that a hypervisor of the host system has determined to be a target for host swapping;

    determining, by the host system, a target number of swap candidate pages to be swapped to disk from an allocated memory space of the swap target VM;

    selecting, by the host system, a memory page at random from the allocated memory space of the swap target VM;

    determining, by the host system, a compression ratio for the memory page by compressing the memory page using a first compression algorithm;

    comparing, by the host system, the compression ratio to a threshold;

    if the compression ratio does not exceed the threshold;

    predicting, by the host system, that the memory page is compressible by a second compression algorithm that is distinct from the first compression algorithm, wherein on average the second compression algorithm is slower, but achieves a lower compression ratio, than the first compression algorithm; and

    adding the memory page to a list of swap candidate pages for the swap target VM;

    determining, by the host system subsequently to adding the memory page to the list of swap candidate pages, whether the target number of swap candidate pages has been reached;

    if the target number of swap candidate pages has not been reached, determining, by the host system, whether a maximum number of memory pages that the host system may check for compressibility has been reached; and

    if the maximum number of memory pages that the host system may check for compressibility has been reached, adding, by the host system, randomly selected memory pages from the allocated memory space of the swap target VM to the list of swap candidate pages until the target number of swap candidate pages is reached.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×