public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* stopping the system clock
@ 2009-07-30 17:02 Roman Steiner
  2009-08-03 15:05 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Roman Steiner @ 2009-07-30 17:02 UTC (permalink / raw)
  To: kvm

hej hej,

i've a question about the virtual time implementation in kvm/qemu.  
with the monitor commands stop / continue you can stop and start the  
guest system, but the system clock is still running.

i\ve done the following experiment:
* start the guest system
* display the system time by running 'date' in the guest system
* stop via the monitor
* way for a minute or so
* continue via the monitor
* display the system time with 'date' in the guest system
result: the system clock of the guest system was running the whole time

for what i need it:
i'm working on a simulation of a wireless network with at least 100  
nodes (routers). each node should be represented by a kvm instance  
with a minimal os and some daemons (mainyl routing deamons). because  
the system gets overloaded some processes (kvm instances) are starving  
and the simulation is not working any more. so i would like to stop  
and start the guest system by the simulation program to keep them in  
order. therefore stopping and starting must be fast and it must be a  
full stop.

if i have to write a patch for qemu, that's fine for me. i just have  
no idea which parts of the source-code i have to change.

thx for your help,
roman


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: stopping the system clock
  2009-07-30 17:02 stopping the system clock Roman Steiner
@ 2009-08-03 15:05 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-08-03 15:05 UTC (permalink / raw)
  To: Roman Steiner; +Cc: kvm

On 07/30/2009 08:02 PM, Roman Steiner wrote:
> hej hej,
>
> i've a question about the virtual time implementation in kvm/qemu. 
> with the monitor commands stop / continue you can stop and start the 
> guest system, but the system clock is still running.
>
> i\ve done the following experiment:
> * start the guest system
> * display the system time by running 'date' in the guest system
> * stop via the monitor
> * way for a minute or so
> * continue via the monitor
> * display the system time with 'date' in the guest system
> result: the system clock of the guest system was running the whole time
>
> for what i need it:
> i'm working on a simulation of a wireless network with at least 100 
> nodes (routers). each node should be represented by a kvm instance 
> with a minimal os and some daemons (mainyl routing deamons). because 
> the system gets overloaded some processes (kvm instances) are starving 
> and the simulation is not working any more. so i would like to stop 
> and start the guest system by the simulation program to keep them in 
> order. therefore stopping and starting must be fast and it must be a 
> full stop.
>

Essentially, the scheduler is also stopping and starting the guests.  So 
I think that instead of writing another scheduler to pause and unpause 
guests, you can adjust qemu to run time in slow motion.  That should 
reduce the interrupt rate and therefore the system load.

Not sure where exactly this needs to change, probably where qemu reads 
the host time and sets host timers.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-03 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 17:02 stopping the system clock Roman Steiner
2009-08-03 15:05 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox