The invention relates to the technical field of
cloud computing containers, and provides a container thermal migration method based on memory snapshot difference compression, which comprises the following steps: in a normal operation stage of a container, initiating pre-migration preparation through a CRIU framework, continuously capturing dirty pages marked by a copy-on-write mechanism in a fixed period to form a difference page set, and storing the difference page set in a
database; calculating the access popularity of each
dirty page; dividing dirty pages of the difference page set into hot pages, warm pages and cold pages according to access popularity, and compressing the hot pages, the warm pages and the cold pages by adopting a self-
adaptive compression strategy; constructing a three-level priority sending
queue at a source node, and entering a network stack according to a priority sequence of a hot page, a warm page and a cold page; and when a convergence condition is met, suspending the container, only transmitting the last group of hot pages and necessary warm pages, and decompressing and rearranging memory pages at a target node according to a serial number to complete container
recovery. According to the method, online container migration with high
compression ratio, low CPU overhead, short
downtime and high migration success rate is realized.