Re: To save or not to save
- From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: gnome-boxes-list <gnome-boxes-list gnome org>
- Subject: Re: To save or not to save
- Date: Fri, 16 Nov 2012 15:58:55 +0200
On Fri, Nov 16, 2012 at 11:06 AM, Daniel P. Berrange
<berrange redhat com> wrote:
> On Fri, Nov 16, 2012 at 12:57:27AM +0200, Zeeshan Ali (Khattak) wrote:
>> On Thu, Nov 15, 2012 at 10:32 PM, Zeeshan Ali (Khattak)
>> <zeeshanak gnome org> wrote:
>> > On Thu, Nov 15, 2012 at 9:31 PM, Daniel P. Berrange <berrange redhat com> wrote:
>> >> On Thu, Nov 15, 2012 at 07:49:46PM +0200, Zeeshan Ali (Khattak) wrote:
>> >>> Hi everyone,
>> >>> As you all know currently we save running local VMs when user quits
>> >>> Boxes UI. The reason for doing so were:
>> >>>
>> >>> 1. We want to reclaim all the resources (especially RAM, cause CPU
>> >>> could be saved by only pausing the VM)
>> >>> 2. VM state should not be lost across reboots/shutdowns of host
>> >>>
>> >>> However, saving of VM seems to have been a very heavy operation,
>> >>> especially on machines with not a lot of RAM (on my machine with only
>> >>> 4GB RAM, host more or less freezes completely for a few seconds). The
>> >>> reason AFAICT is that most of guest RAM being unused is swapped out so
>> >>> saving then involves copying GBs of data per running VM from one part
>> >>> of the drive to another.
>> >>
>> >> Have you tried making Boxes use the
>> >>
>> >> VIR_DOMAIN_SAVE_BYPASS_CACHE
>> >>
>> >> flag yet ? oVirt saw serious problems with host performance when
>> >> saving VMs to disk, unless they used VIR_DOMAIN_SAVE_BYPASS_CACHE
>> >> to avoid trashing the I/O cache.
>> >
>> > Not yet. I somehow forgot about that actually. :( Now added to top of
>> > my todo file so will do so soon enough. :)
>>
>> Now I tried many times with and without this flag on my machine. *If*
>> there is any difference, its that this flag makes the operation
>> slower: on average I measured a difference of 2 seconds between
>> hitting 'CTRL+Q" and boxes exiting.
>
> It makes sense that it would be slower, because this is making sure that
> we do direct I/O to the disk. Without this flag the I/O ends up in the
> page cache, not actually flushed to disk until some arbitrary time after
> the operation has finished.
>
> The difference should be what impact it has on other programs - since
> we're not filling the page cache with VM save data, other programs
> doing I/O should not be so badly affected if they try todo I/O too
> because they should be less likely to block on I/O while the kernel
> flushes the cache to disk.
I didn't see any difference in that respect either. :( My host was as
unusable (Couldn't quickly switch to shell's overview mode and switch
work spaces etc) as w/o the flag. It was only one VM being saved btw.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]