Patent ID: 9600317
Date: 2017-03-21
CPC Classifications: G06F

Claim:
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; 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.