Re: Linux, RT and virtualisation

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

 



Hi Jan,

On Tue, Jun 22, 2010 at 08:29:03PM +0200, Jan Kiszka wrote:
> luis.henrix@xxxxxxxxx wrote:
> > Hi,
> > 
> > I have the following scenario: a legacy application with RT constraints
> > that needs to be replicated.  Basically, I need to run several instances
> > of this application on a single multi-core box.  However, this is not as
> > simple as it sounds because the application assumes several things such
> > as exclusive access to HW, etc.
> > 
> > So, instead of re-designing the application to co-exist with different
> > instances, I was wondering whether this could be done using a lazy
> > approach: running each instance within a virtual machine.
> > 
> > I have enough cores available so that I can actually dedicate 1 or more
> > cores to each VM, but the problem is: will the application still be able
> > to meet its RT requirements?
> 
> What are those RT requirements (order of magnitude, hard/soft, ie. what
> may happen if some deadline is missed)?

We're talking about 1 ms deadline -- there is a task that needs to "do
some work" every millisecond.  And we're talking about a hard RT system
(although I suspect the old software actually.... well, never mind :) )

> >  I guess that, if two VMs share the same
> > core(s), meeting the deadlines will not be possible without having a
> > special scheduler on the VMs manager.  But what about if all the VMs have
> > their own cores?
> > 
> > Of course there is still the issue with the shared access to the HW,
> > but since this HW (Ethernet NICs) also have support for virtualisation,
> > I could create virtual NICs for each of the VM instances.
> 
> For the tests Frank cited, I tried to avoid device emulation as far as
> possible because it can be a bottleneck in QEMU (i.e. also KVM),
> specifically if you go below the millisecond and there is other guest
> I/O running in parallel. Still, if that may hurt you, depends on your RT
> requirements.

It looks like it is going to hurt me.  But still, this is something I
still need to measure.  There is always the option to re-design the old
app and not to use virtualisation at all.

> > 
> > Any experiences/thoughts/links?  Would preemptrt+Xen be able to do this?
> 
> Xen uses QEMU (a variant of it) in Dom0 for device emulation. Moreover,
> you would have to merge Xen's Dom0 patches with Preempt-RT patches -
> well, challenging, I bet.

Ouch!  Here's something I was not planning to do :)

> > preemptrt+kvm? Other options?
> 
> Preempt-RT + kvm will at least allow you to tweak a lot, benefit from
> ongoing optimizations of both projects, or maybe even apply some "dirty
> tricks" to the hypervisor. IMO, a good starting point unless your
> requirements are way off.

Agree, it looks like the easiest way.  But still need to take a look at
XtratuM (suggested by Nicholas).

Thanks!

--
Luis Henriques

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux