Memory and IOPS Deduplication
Parallels Cloud Server provides memory and IOPS deduplication that helps save memory and IOPS on the Hardware Node and increases the maximum number of running Containers per Hardware Node.
Deduplication is provided by Parallels File Cache which includes the
pfcached
daemon and a ploop image mounted to a directory on the Hardware Node. The PFCache ploop contains copies of eligible files located inside Containers. To be eligible for caching, files in Containers must meet certain configurable requirements, e.g., be read in a certain number of Containers, be of certain size, be stored in certain directories in Containers.
When the kernel gets a request to read a file located in a Container ploop, it searches the PFCache ploop for a copy of that file by the SHA1 hash stored as file’s extended attribute. If successful, the copy in the PFCache ploop is read instead of the original file in the Container ploop. Otherwise, the original file in the Container ploop is read.
To populate the PFCache ploop with most requested files,
pfcached
periodically obtains Container files read statistics from kernel, analyzes it, and copies files which are eligible to the PFCache ploop. If the PFCache ploop is running out of space, the least recently used files are removed from it.
Parallels File Cache offers the following benefits:
-
Memory deduplication. Only a single file from the PFCache ploop needs to be loaded to memory instead of loading multiple identical files located in multiple Containers.
-
IOPS deduplication. Only a single file from the PFCache ploop needs to be read instead of reading multiple identical files located in multiple Containers.
If the Hardware Node has storage drives of various performance, e.g., SATA and SSD, the PFCache ploop performs better if located on the fastest storage drive on the Node, e.g., SSD. In any case:
-
If the Hardware Node memory is not overcommitted, Parallels File Cache mostly helps speed up Container start during which most files are read. In this case caches residing in memory are not cleaned often, so copies in the PFCache ploop, once read during Container start, do not need to be reread often during Container operation.
-
If the Hardware Node memory is overcommitted, Parallels File Cache helps speed up both Container start and operation. In this case caches residing in memory may be cleaned often, so files in the PFCache ploop need to be reread as often.
Parallels File Cache can be managed with the
pfcache
utility described in the
Parallels Cloud Server 6.0 Command Line Reference Guide
.
|