--- "Kevin P. Lawton" wrote:
> Jens Nerche wrote:
> > Unless the host does swapping to hard disk, we can
> assume that
> > it has enough memory.
This is not necessarily true..........., by default
linux, windows, dos (with the swapping driver
installed), and probably many other OS' automatically
swap some of their libraries, modules, and other
components out into the swap file/partition--just
because it is more efficient than searching for them
on the main mass storage unit every time that they
need to be swapped back into real memory.
>>Think, most os kernels will
> provide
> > information about used space on swap
> partitions/files. And also
> > the user can give hints whether a host application
> would run
> > much faster if it would have more memory...
>
> Agreed. The ratio SwapFree/SwapTotal with total
> system
> memory factored in, seems like a reasonable
> controlling parameter.
This sounds right to me also....., we just must
remember that there will always be some stuff swapped
out due to space restrictions in the real memory
department. I am no coding guru, but it might not be
a bad idea to make -some- of the guest pages
virtualized directly by the monitor and to cache out
those pages into a local swap file--catching their
page faults internally (if it wasn't done
already????). This offloads some of the page swapping
from the kernel and its already hard-working page
swapper--the question is: "Is is worth the work and
possible performace hit?" Also, how does the monitor
decide which pages are less "dangerous" to swap out?
I haven't seen much on this that makes sense to me--as
the monitor is only concerned with making sure that
the guest doesn't find out that it is running in
something other than reality.
> Even without any knowlege of the virtual memory
> demands
> on the host-side, I think we can do fairly well. If
> we
> keep a little extra info about the guest pages, such
> as
> a time stamp (say from RDTSC), then we can decide
> intelligently not to put actively used pages in the
> can-be-swapped pool.
Ok, this sounds good, but is it really the cleanest
way? Also I forget what the page size is here. If we
are virtualising something running windows we may
never see a page that is not "touched" at least
periodically. In such a case the above scheme would
fall flat on its face--there would end up being no
pages eligible for swapping, ever.
> Worst case, is that not-used-in-awhile guest pages
> cause
> a page fault the first time they are used again.
> What the user could tweek here, is the time delta
> controlling
> what the swapping elgibility algorithm thinks is
> 'not-use-in-awhile'. Perhaps a value of 0 (meaning
> infinity)
> would mean don't bother - keep all pages locked
> down. Other
> values mean how many seconds before a page is
> considered old.
Neat idea, but would it work with something that
assumes that it can hog as much memory as exists
(....at all times)?
>
> Of course, we don't need to implement this at the
> moment,
> but it's good to think about along the way. Though,
> for
> some uses, I think this is going to be
> useful/important:
>
> - For the casual single VM user, I'm sure they
> would appreciate
> if they could just leave a VM running in the
> background, sleeping
> for the most part. To them it's just an icon on
> their desktop.
> This way they don't have to boot Windows for
> every small use.
> Our algorithm would work well, since a lot of
> the guest would be
> inactive, and thus marked elgible for host
> paging. If we can
> save CPU cycles like I mentioned before, the
> user has a really
> low VM system impact in "sleep mode".
If we want to do some sort of sleep mode then things
get very hairy very fast. First off: ACPI. Windows
expects to be told when its host's processor speed
changes or when the machine stops--even for a few
seconds. I assume that linux and other unices want to
know such things also. Second off: how do we prevent
the guest from going ape when it comes back up from
the depths of virtual sleep? Even if we can prevent
the system from crashing when we bring it back up, it
might still be so badly misaligned with reality that
it starts to generate garbage--which (conceivibly)
could decimate the monitor itself, and crash it cold.
>
> - For the power multiple VM (ab)user. Perhaps
> people will even
> set up VM server machines, and run a good number
> of VMs.
> We'll need to be able to run our VM without all
> the pages
> being locked down, or we'll quickly carve up and
> lock down
> all the system memory.
>
> -Kevin
I do that already....... granted all on the same
system running sw 4.0 through VNC, but it is a neat
idea. What ever did happen about that VNC plugin?
Has anybody heard about that lately?
Drew Northup, N1XIM
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com