Virtual machines as containers
A longstanding approach to this problem is balloon drivers, which will
"expand" by allocating memory from the guest and returning it to the host
system. Ballooning is effective for extracting memory from guests, but it
doesn't answer one important question: when should this be done? Despite
years of experience with virtualization, we don't really know how to do
this sort of memory balancing.
James Bottomley suggested that it might be a good idea to use paravirtualization to move some memory-management decisions from the guest to the host. The Clear Containers project, for example, is using the DAX mechanism — implemented to allow direct access to file data stored in persistent memory — to share file pages with the host. That works well, though sharing of anonymous pages would be harder. Perhaps the guest could share its LRU list with the host; the host could then see what the guest is trying to do and make more intelligent memory-balancing decisions.
It should be possible to share all cached file data across the guests and the host if we had a paravirtualized page cache, James said: "how hard can it be?"
Even if page caching is moved out of guests, though, there would still need
to be a way to put memory pressure on guests. Other caches, such as the
inode and dentry caches, could still expand to fill all available memory.
So the need for a way to quantify memory pressure and communicate it
between the host and the guests does not go away. As the session wound
down, it was agreed that there were some interesting ideas in play. How
soon those ideas will be turned into code remains to be seen, though.
Index entries for this article | |
---|---|
Kernel | Containers |
Conference | Storage, Filesystem, and Memory-Management Summit/2016 |
Posted Apr 28, 2016 18:00 UTC (Thu)
by eternaleye (guest, #67051)
[Link] (1 responses)
Posted Apr 28, 2016 20:58 UTC (Thu)
by hansendc (subscriber, #7363)
[Link]
Virtual machines as containers
Virtual machines as containers