The invention relates to the technical field of containers, in particular to a GPU (
Graphics Processing Unit)
video memory dynamic isolation method based on a container technology, which comprises the following steps of: intercepting a
video memory allocation request instruction of a GPU driving layer according to a container
virtualization runtime environment, establishing a circular
queue structure, generating a container
video memory occupation
time sequence queue, and calling the container video memory occupation
time sequence queue. And calculating and generating a video memory
pressure sensing fluctuation index. According to the method, scattered occupied video memory blocks are moved and merged on the
physical level by hanging up the container
instruction stream and calling the GPU internal copy instruction, fragment holes in a physical video memory are eliminated, then a virtual
address mapping pointer is updated, instruction execution is recovered, the space
layout of the video memory is dynamically optimized on the premise that the container does not need to be restarted or service logic does not need to be interrupted, and therefore the space
layout of the video memory is optimized. The continuous distribution capability and the overall utilization efficiency of the GPU video memory are improved, and the calculation stability and the
resource isolation effect in a multi-task concurrent scene are guaranteed.