* Orit Wasserman (owass...@redhat.com) wrote:
> On 01/30/2014 08:23 PM, Dr. David Alan Gilbert wrote:
> >* Orit Wasserman (owass...@redhat.com) wrote:
> >>Signed-off-by: Orit Wasserman <owass...@redhat.com>
> >>---
> >>  migration.c | 7 +++++++
> >>  1 file changed, 7 insertions(+)
> >>
> >>diff --git a/migration.c b/migration.c
> >>index 46a7305..25add6f 100644
> >>--- a/migration.c
> >>+++ b/migration.c
> >>@@ -479,6 +479,13 @@ void qmp_migrate_set_cache_size(int64_t value, Error 
> >>**errp)
> >>          return;
> >>      }
> >>
> >>+    /* Cache should not be larger than guest ram size */
> >
> >Why? (It's admittedly odd, but does it actually break something if it's 
> >larger?)
> >
> 
> Because how XBZRLE works, the idea is that for workload that changes the same 
> pages
> frequently, we can reduce the amount of transferred data sent by sending only 
> the diff.
> We also compress the diff itself.
>
> The cache is used to store the previous page so we can calculate the diff, so 
> at most it will
> contain all the guest pages.

It's a hash based cache though isn't it - so there will be some contention for
a cache size==ram size case?

Also this does mean that you have to be a little careful to pick a sane XBZRLE 
cache
size, since one that's too large will now fail; I can only see that being
a problem on a machine with a mix of huge and tiny VMs.

( I sent the reviewd-by tag separately.)

Dave
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Reply via email to