Re: [Vserver] Q:Would "guest suspend to disk" work?

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Fri 08 Dec 2006 - 04:02:00 GMT
Message-ID: <20061208040159.GA5603@MAIL.13thfloor.at>

On Thu, Nov 30, 2006 at 03:56:40PM +0100, Robert Michel wrote:
> Salve Herbert!
>
> Herbert Poetzl schrieb am Dienstag, den 28. November 2006 um 16:03h:
>
> > On Mon, Nov 27, 2006 at 04:24:10PM +0100, Robert Michel wrote:
> > > Salve *, Herbert!
> > >
> > > I like the power of linux-vserver and I do not to
> > > want to _nag_ you with the question:

> In the sence of asking only for new features...
> Linux-verserver is already powerfull, great and AFAIK very stable ;)

tx, sorry for the delayed answer ...

> > > would "guest suspend to disk" work?
>
> > ah, you mean a single guest
> yes

> > ... well that's a completely
> > different thing, and yes, it is possible to do that,
> already to do it today?

yes, but not with linux-vserver, because of the
sharing and isolation, which makes 'recreating'
the saved image in a different context very hard

> > but it requires some efford
> sone efford for vserver modification or "just" administration?

either you go for full virtualization, as other
solutions do, or you have to be extra careful
in what 'shared' resources you create/reinstate

> > and increases the overall
> > overhead significantly, as you cannot use sharing or
> > isolation anymore ...
>
> Overhead for the image or for the running system.

again, depends on the approach

> Some application will load some kernel modules or
> libaries - when a guest is used for one application
> only, the ram image on the disc would save with a
> brute force methode all needed and cost disc memory.

kernel modules are out of question, they cannot
be virtualized proeprly in an OS-level approach
libraries and shared files in general are one
problem, the host side network stack is definitely
another complication ...

> But how to run the image again - by invoke it "brute
> force" to 100% it may could run, but then would some
> parts (driver, library) would run twice.

either that or they would suddenly clash, which
is not what you want, but all this issues are
solveable, just is it worth the efford?

> I think to suspend a guest a UserModeLinux would
> be easyer to handle - but that would be not so smart,

that can work out of the box, at least it works
with almost all full and para virtualization
approaches, it's 'just' saving and restoring
one consistent state ...

> not so efficent, especialy on embedded systems.

that's the problem ...

> > > - could be remove from stock/RAM to free resources
> > happens automagically via system paging (swap)
>
> Is there a tool to manage it?

basically you can control the kernel swappiness
and thus somewhat the amount of pages swapped
out when there is no actual need to swap

> E.g. I start working with A, then work with B and C.
> But C isn't so important for me - can I manualy swap
> C to have more system recources for A or D?

it would be easy to add a 'swap priority' per
guest, and use that for decisions what is swapped
out when memory is needed ...

> Or when A is very important for my, can I avoid A
> from being swaped?

that would be the beforementioned priority, but
that is not yet implemented ...

> By using different guests I would have a system to
> manage recources for A, BC and D.
>
> > > - could be moved to other (host) systems
> >
> > require the other systems to have identical structures
> > and/or resources, that's why suspend to disk with
> > different boxes does not work either ...
>
> Saving a meta file for system/scructures and/or ressources
> information and start QEMU with this meta file?

well, you can do that with QEMU vm states, and
in the future, the linux kernel will support
something similar at least for fully virtualized
containers ...

> > > - could be cloned (for training or productive enviroments)
> >
> > in this case putting it into 'some' virtual machine
> > is definitely the simpler approach ..
>
> But wouldn't the virtual machine eat more system power?

of course, not many features go without cose :)

> > btw, you can achieve all that and more by adding
> > a Xen wrapper around Linux-VServer ...
>
> "Xen wrapper" I found a one year old news that sun whant's
> to run redhed binaries compiled for x86 on solaris (x86)
> http://www.techworld.com/opsys/features/index.cfm?featureid=1989&inkc=0
> Interesting - this sounds less recources consumpting then
> emulation or running a second operating system...

yes, and similar is implemented for running solaris
binaries on linux, as long as there is something
mapping or wrapping the syscalls, that can be
done, but I don't see how that is related ...

> Would Xen-Wrapper would be smart and efficent when I just
> want to use the *same* kernel? Are ther some other recources
> (more detailed) about xen wrapper?

no, Xen is paravirtualization and requires one
kernel per guest ...

> But my thought was that - a live linux like Knoppix could
> attack the data on the flash memory - especialy when it
> is not protected with encryption/hash functions.

probably .. how is that related?

> So to avoid that an demonstration of another developer
> will attack my system - but maybe also that i can try his
> demonstration and switch back to my used version on the same
> smartphone without a newstart and without losing to much
> performances...

> I like that I can sleep/swap this demonstration when I don't
> need it - so that I run 1-2 of 10 different demonstrations
> at the same time - and when I suspend one to disk, I could
> continuing at the same point...

ah, you can actually do that (or similar) with
the hard scheduler, i.e. put a context on 'pause'
the system will then swap out unused memory

best,
Herbert

> To suspend one guest and migrate it to a workstation and
> migrate it back would be the next step - I think a workstation
> has more power so emulation would be no problem for it.

> Imagine some application would have infrequent bug - the tester
> could suspend the guest to disk and share this image with other
> developers to have a better chance to find out what has gone wrong
> ....
>
> So even when suspend to disk solution would not be efficent to
> save - because it would save everythink
> and the wakeing up wouldn't efficent, because some driver/libaries
> would run twice on the machine - what would you guess how much
> work would it be?
> Not to please the vserver developer to do this - maybe the OpenMoko
> community becomes big enough that enough people would love to
> use linux-vserver with a guest suspent to disk function that they
> would hack it ;)
>
> Would Xen-Wrapper would be smart and efficent when I just want
> to use the same kernel?
>
> Other ideas what to do now or maybe in the future with linux-vserver
> on smartphones?
> Running a vserver guest parallel on a mobil and a workstation at
> the same time?
> Other "sick" or smart ideas?
>
> Cheers,
> rob
>
>
>
>
>
>
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Fri Dec 8 04:02:54 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 08 Dec 2006 - 04:03:01 GMT by hypermail 2.1.8