DMEMFS Is A Proposed Virtual File-System For Linux To Help Save Memory

Written by Michael Larabel in Linux Kernel on 8 October 2020 at 07:00 AM EDT. 10 Comments
LINUX KERNEL
Tencent developers have proposed "DMEMFS" as a virtual file-system with the intent of helping to save system memory on large servers such as in public cloud environments.

DMEMFS is the Direct Memory File-System and allows for reserving portions of the system RAM and it will not be managed by the kernel. The aim is to remove the struct page normally associated with each physical memory page. For desktop users and even most server users this doesn't equate to much in the way of memory savings, but for hyperscalers and other large server deployments it can equate to some TCO savings.

With DMEMFS, the dmem= kernel parameter can be used for reserving a portion of the system memory. The benefits of DMEMFS are most pronounced on large capacity servers - "Theoretically for each 4k physical page it can save 64 bytes if we drop the 'struct page', so for guest memory with 320G it can save about 5G physical memory totally."

Once a portion of the system memory has been carved out for DMEMFS, it can then be mounted like a conventional file-system and in turn with QEMU can be configured to use that mounted DMEMFS area as the backing store using the memory-backend-file option already supported by QEMU.

Those curious about DMEMFS can learn more via the patch proposal.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week