qemu-discuss
[Top][All Lists]
Advanced

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

Re: Snapshot customizing


From: Jayakrishna Vadayath
Subject: Re: Snapshot customizing
Date: Wed, 27 Jul 2022 10:45:02 -0700

Hi,

Yes I did profile it afterwards and found that the majority of time is being spent on loading the RAM.
I'm running QEMU with "-m 1G" and I do see that there's close to 1 gigabyte of memory being loaded from the snapshot.

In my use case, I need to repeatedly revert back to a snapshot after executing a small user-space program.
I was wondering if it would be possible to identify the dirty pages in RAM after this execution and only restore those pages from the snapshot when a restore is encountered.

I understand that this scenario might be very unique, but I just wanted to know if such an idea would be feasible or not.

Thank you. Regards

On Wed, Jul 27, 2022 at 3:30 AM Peter Maydell <peter.maydell@linaro.org> wrote:
On Tue, 26 Jul 2022 at 23:11, Jayakrishna Vadayath <jay@forallsecure.com> wrote:
> I'm very new to QEMU and I'm still trying to figure my way out through the source code.
> Currently I'm using the QEMU snapshot restore mechanism and I've noticed that it usually takes close to 200 milliseconds to restore a small snapshot.
>
> I was thinking of ways to optimize this for my use case and I was wondering if it would be possible to only snapshot and restore specific devices (for example just the RAM).

Have you profiled to find out where the time is being spent?
For your average VM I would expect the RAM to be most of the
time taken, because there's so much data to store to the
snapshot.

More generally, restoring only specific devices tends to
result in the restored snapshot not working, because the
virtual machine is no longer in a consistent state on restore.

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]