On Fri, Aug 09, 2013 at 10:20:49AM +0000, Chijianchun wrote: > Now in KVM, when RAM snapshot, vcpus needs stopped, it is Unfriendly > restrictions to users. > > Are there plans to achieve ram live Snapshot feature? > > in my mind, Snapshots can not occupy additional too much memory, So when the > memory needs to be changed, the old memory page is needed to flush to the > file first. But flushing to file is too slower than memory, and when > flushing, the vcpu or VM is need to be paused until finished flushing, so > pause...resume...pause...resume............., more and more slower. > > Is this idea feasible? Are there any other thoughts?
A few people have looked at live vmsave or guest RAM snapshots. The idea that was discussed on qemu-devel@nongnu.org uses fork(2) to capture the state of guest RAM and then send it back to the parent process. The guest is only paused for a brief instant during fork(2) and can continue to run afterwards. The child process is a simple loop that sends the contents of guest RAM back to the parent process over a pipe or writes the memory pages to the save file on disk. It performs no logic besides writing out guest RAM. Stefan