[libvirt] [PATCH 0/8] Avoid filesystem cache pollution during virsh save

Eric Blake eblake at redhat.com
Thu Jul 14 14:31:41 UTC 2011


On 07/14/2011 08:24 AM, Eric Blake wrote:
> Saving a domain's state creates a large file, which risks polluting
> the filesystem cache and slowing down a system.  If a system has
> a lot of domians simultaneously being saved (such as the libvirt-guests
> init script doing managed saves), then this can cause noticeable slowdown
> due to filesystem thrashing.
> 
> This patch series has been successfully tested to do 'virsh save
> dom file --direct', with lsof(1) used to verify that O_DIRECT was
> in use, and the resulting file was successfully used with 'virsh
> restore file'.

P.S. O_DIRECT is a pain.  I wish that
posix_fallocate(,POSIX_FADV_SEQUENTIAL) and
posix_fallocate(,POSIX_FADV_NOREUSE) were stateful - then libvirt could
just declare that the fd is intended to be used in order without leaving
behind any caching, then pass the fd on to qemu or the compression
program, and the kernel would remember the previous hints and
automatically handle the issue without having to go through the
libvirt_iohelper program.  But the Linux kernel isn't there yet.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110714/f699e437/attachment-0001.sig>


More information about the libvir-list mailing list