VMmanager OVZ: Сontainers compression

From ISPWiki
Jump to: navigation, search

This feature is available starting from version 5.48.0

Optimization of disk space occupied by VM containers is essential for servers with small disks (SSD) when using overselling.

On OpenVZ virtual machines using ploop, files-containers with file system images are be created on the host-machine. Container size will be enlarged dynamically withing quota provided when enlarging the number/size of VM files. However when decreasing the number/size of VM files, container size won't decrease automatically.

To decrease container size, you should first change location of blocks of the VM file system in the container's file to clear disk space at the end of the file.

Important note: Optimization of blocks location in the container's file (container compression) consumes much resources.

VMmanager OVZ enables to compress disk images both maually by selecting a VM and clicking the "Compress" button, and by creating a cron job in the "Cluster settings/Policy" module -- "Containers compression". This function is disabled by default.

Container compression on the cluster node is performed with the "vzctl" utility. It is started with low CPU usage (15) and hard drive priority.