Re: Live memory allocation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avi Kivity schrieb:
Tomasz Chmielewski wrote:

What about cache/buffers sharing between the host kernel and running processes?


If I'm not mistaken, right now, memory is "wasted" by caching the same data by host and guest kernels.

For example, let's say we have a host with 2 GB RAM and it runs a 1 GB guest.
If we read ~900 MB file_1 (block device) on guest, then:
- guest's kernel will cache file_1
- host's kernel will cache the same area of file_1 (block device)

Now, if we want to read ~900 MB file_2 (or lots of files with that size), cache for file_1 will be emptied on both guest and host as we read file_2. Ideal situation would be if host and guest caches could be "shared", to a degree (and have both file_1 and file_2 in memory, doesn't matter if it's guest or host).

Double caching is indeed a bad idea. That's why you have cache=off (though it isn't recommended with qcow2).

cache= option is about write cache, right?

Here, I'm talking about read cache.

Or, does "cache=none" disable read cache as well?


--
Tomasz Chmielewski
http://wpkg.org

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux