Tencent Updates Their "Direct Memory File-System" Proposal For Linux
Back in October there were engineers from Tencent proposing DMEMFS as the "Direct Memory File-System" for Linux. DMEMFS is about reserving some RAM that is not managed by the kernel to avoid that overhead and in turn expose it directly to virtual machines in the cloud. Those initial DMEMFS kernel patches have now been updated by Tencent as they continue working to get this functionality into the Linux kernel.
The focus of Tencent's DMEMFS is all about avoiding the bits of memory saved by removing the struct page that is traditionally associated with each physical memory. It's tiny and not much overhead for even high-end desktops today, but when it comes to massive servers and other deployments by hyperscalers, the memory savings can be beneficial. Tencent engineers estimate that by avoiding the struct page for each physical page for guest memory on a server with 320G of RAM, they can save roughly 5G of memory with DMEMFS.
DMEMFS allows carving out a defined portion of the system memory that is then reserved and can be mounted for user-space access like a traditional Linux file-system. QEMU can then be configured to use that mounted DMEMFS area as the memory backing store when launching virtual machines.
With this first updated patch-set to DMEMFS since October, the Direct Memory File-System patches have been re-based against Linux 5.10 Git and other low-level improvements made.
This implementation amounts to just over 3k lines of code. That's where things are at right now while awaiting a second round of review on these patches for possible inclusion into mainline in the future.
The focus of Tencent's DMEMFS is all about avoiding the bits of memory saved by removing the struct page that is traditionally associated with each physical memory. It's tiny and not much overhead for even high-end desktops today, but when it comes to massive servers and other deployments by hyperscalers, the memory savings can be beneficial. Tencent engineers estimate that by avoiding the struct page for each physical page for guest memory on a server with 320G of RAM, they can save roughly 5G of memory with DMEMFS.
DMEMFS allows carving out a defined portion of the system memory that is then reserved and can be mounted for user-space access like a traditional Linux file-system. QEMU can then be configured to use that mounted DMEMFS area as the memory backing store when launching virtual machines.
With this first updated patch-set to DMEMFS since October, the Direct Memory File-System patches have been re-based against Linux 5.10 Git and other low-level improvements made.
This implementation amounts to just over 3k lines of code. That's where things are at right now while awaiting a second round of review on these patches for possible inclusion into mainline in the future.
7 Comments